Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-5209) Prepare for 2.0.0 release #234

Merged
merged 62 commits into from Aug 4, 2017
Merged

(MODULES-5209) Prepare for 2.0.0 release #234

merged 62 commits into from Aug 4, 2017

Conversation

glennsarti
Copy link
Contributor

The PR prepares the module for a version 2.0.0 release.

tphoney and others added 30 commits May 9, 2017 09:53
Previously only SQL Server 2012 and 2014 could be used to run the acceptance
tests.  This commit modifies the helpers to support running the tests with
SQL Server 2016:
- Adding the ISO image for SQL Server 2016
- Adding the paths for SQL Server 2016 and SQL Serve 2014 to locate sqlcmd.exe
(MODULES-4257) Add SQL Server 2016 support in acceptance tests
Previously the module was updated to support SQL Server 2016 for acceptance
tests however one reference was missed.  This commit adds the install path
detection for SQL Server 2016, which is then used in acceptance tests, such
as sqlserver_instance.
(maint) Update test helper for SQL Server 2016
Previously the custom facts for the module only supported SQL Server 2012 and
2014.  This commit updates the facts to support usage on SQL Server 2016, and
adds additional feature detection for features that have been added in Server
2016, or missed out on Server 2014.
This commit deletes code which has been commented out for some time and serves
no purpose.
Previously the sqlserver_instance and sqlserver_feature acceptance tests were
failing.  This was mainly due to SQL Server 2016 not having a feature for the
SQL Management Studio (ADV_SSMS and SSMS).  However it was later found that the
super features called Tools and SQL were not providing an adequate abstraction
e.g. they were not rolled up in the Facter facts.  This commit adds support for
SQL Server 2016 by the following:
- Deprecating the use of 'Tools' in the sqlserver_features and 'SQL' in the
  sqlserver_instance custom types.  These super features will continue to
  function however use of them will generate a deprecation warning
- The acceptance tests for the super features was removed
- Most tests which referred to ADV_SSMS and SSMS were removed.  Where not
  possible, they were guarded to not be tested on SQL Server 2016.
- An installation media version detection method was added as Dot Net 3.5 is
  not required for SQL Server 2016 installation.  This is only applicable for
  SQL Server 2012 and 2014.
- Refactored the instances method for sqlserver_features to support multiple
  server editions on a server but until MODULES-5060 is resolved, only the first
  set is returned.
This commit removes the double underscore type error in the file names for the
puppet provider tests.
This commit updates the README with new features available for SQL Server 2016,
and adds notes about the deprecation of the super features.
…and-features

(MODULES-4257) Modify instance and features for SQL Server 2016
Previously the module would generate warnings that the ALL_SQL_VERSIONS constant
was already defined.  This commit changes the assignment so that it only assigns
the constant if it does not already exist.
Previously if dot Net 3 experienced an error during installation, no error
would be logged and instead the SQL Setup would then fail but not inform Puppet
as to why.  This commit changes the dot Net 3 installation method to instead
log the output from the installation process and fail the puppet run, with log
information, if the installation fails.
Previously the service_ensure parameter was defined in the type however it was
never implemented in the provider.  As such this param had no effect.  This
commit removes the parameter because:
- This parameter is confusing as it is only applicable at installation time,
  not constantly enforced
- Each service can have a different startup type.  This is already possible
  using the install_switches e.g. /BROWSERSVCSTARTUPTYPE=Disabled
- Ongoing Windows service state should really be managed by a puppet manifest
  not by an installation switch
Previously in commit 84f75b7 the feature list was extended however it missed
the SQL Native Client SDK.  This commit adds the SNAC_SDK as a detectable and
installable feature.  This commit also updates the README.
(FM-5389) Add missing shared feature SNAC_SDK
…nsure

(MODULES-5030) Remove service_ensure parameter
(MODULES-5092) Failures during .Net 3 installation should be obvious
Previously the sql_features was not idempotent when installing the SQL Native
Client SDK (SNAC_SDK).  This Due to the SQL Native Client not being unique
across SQL Server versions (e.g. SQL 2016 (v13) installs Native Client with a
version that matches for SQL 2012 (v11)).  Due to MODULES-5060 it is noted that
the SQL Server Module can not be used to manage different SQL Server versions
on the same host.  Knowing this it is safe to collate all of the SQL Server
shared features, regardless of version, and use that as the list of installed
features and is safely idempotent.

This commit also adds a README section to known issues about this issue.
…rror

Previously if the as_sysadmin_accounts parameter was set however the required
AS feature was not in the feature list, then the SQL installation would proceed
and not install AS.  This commit changes the behaviour of the provider to fail
the resource if the as_sysadmin_accounts is set in the sql_instance resource
without the required AS feature in the feature list on creation.
The SNAC_SDK feature can not be managed by the module as it is not able to be
uninstalled using the SQL Server installation media (particularly on SQL Server
2016).  This commit adds a note about this limitation in the README.
Previously the purge_members parameter of the sqlserver::role resource was not
taking effect.  This commit re-instates the acceptance test for this behaviour
and changes the sql query used to detect members which are no longer required.
It appears the table variable usage was returning zero results for the row
count.  Instead the detection is changed to just using the SELECT query, instead
of an INSERT INTO, which does not require any row count calculation.

This commit also modifies the role deletion as SQL Server requires any members
to be removed prior to a role being deleted.
(FM-5389) Fix sql_features when installing SNAC_SDK
(MODULES-2543) Purge members from SQL Server Role
(MODULES-2386) Using as_sysadmin_accounts without AS feature should error
Previously the name of file and log files were not escaped properly which caused
SQL Server to interpret incorrectly.  The dashes in the name were being seen as
a minus operator.  This commit changes the name of the Log and File files to be
seen as strings instead of identifiers.  This commit also updates the spec tests
to expect these names to be escaped.
Previously the module tried to connect to the SQL instance using the name
localhost.  This had the side effect of always using the TCP based connection.
If a customer used a non-default Port (common practice) then the sql_connection
would not connect.  This commit instead changes the Datasource to use the '.'
moniker which denotes the local machine.  However this instructs the OLE DB
provider to use the enabled protocols enabled for the native client instead of
only using TCP.  This means it will prefer to use the Shared Memory protocol if
enabled.  Also the Shared Memory protocol is required to be enabled for the SQL
Server Agent process on SQL Server 2016.
(FM-5021) Escaping identifiers when creating a database
…ct-info

(MODULES-4915) Remove forced TCP connection for SQL management
jpogran and others added 28 commits June 26, 2017 11:53
(maint) Add more advanced examples to documentation
(MODULES-4842) Update puppet compatibility with 4.7 as lower bound
(MODULES-5144) Prep for puppet 5
The Stdlib library from version 4.13.1 onwards is required for Puppet 4
compatibility.  This commit updates the metadata.json to enforce the correct
module version.
Previously this module used a lot of validation functions from stdlib which are
now deprecated due to Puppet 4 Data types.  This commit:
- Converts all manifest type resources to use Puppet 4 Data Types
- Removes any validation that is redundant due to using Data types
- Removes the sqlserver_validate_on_off function as it is no longer required
- Updates tests with different error messages due to Data Types
The sqlserver_validate_svrroles_hash function is no longer called and can be
removed.  This commit removes the function and its associated tests.
(MODULES-5126) Puppet4ing SQL Server
Previously the user acceptance test setup a database with a string for the
compatibility level, however the resource expects an Integer.  This commit
changes the value to an expected type.
(MODULES-5126) Use integer in acceptance test
Previously the PolyBase features were added to sql_instance however the config
settings for username and password were not surfaced on the type.  This commit:
- Adds the polybase_svc_account and polybase_svc_password parameters to the
  sql_instance
- Adds checks to the provider so an error is thrown if the polybase params are
  set, but no polybase feature is being installed
- Previously the code assumed the puppet parameter names directly lined up with
  SQL Server installation command line switches however for Polybase, this is
  not true.  This commit changes to using a simple lookup hashtable
- This commit also removes a shared example called 'run' and install helper as
  they were not being used in any tests.
(MODULES-5070) Add polybase parameters to sql_instance
As part of PUP-5659 relationship validation in the catalog now errors instead of
warning for missing required relationships.  Previously the spec tests were
passing as Puppet 4.x would ignore the required resource e.g. the
sqlserver::login::permissions resource required a sql::config resource in the
catalog.  However our test fixtures were not creating that but Puppet didn't
care.  Now that Puppet des validate these relationships, the specs were failing.
This commit adds the required resources into the test fixtures.
(MODULES-5187)(MODULES-52080) mysnc puppet 5 and ruby 2.4
some edits for sqlserver changes
(FM-6141) Add test-tiering, and README to spec directory
The commit prepares the module for a version 2.0.0 release.
This commit removes the OS mocking in two spec tests as it is not required.
@glennsarti glennsarti changed the title {WIP}(MODULES-5209) Prepare for 2.0.0 release (MODULES-5209) Prepare for 2.0.0 release Aug 4, 2017
@HAIL9000 HAIL9000 merged commit baf2b5c into puppetlabs:release Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants