-
Notifications
You must be signed in to change notification settings - Fork 225
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
SqlSetup: Feature CONN is not detected correctly #1105
Comments
- Localized messages for Master Data Services no longer start and end with single quote. - When installing features a verbose message is written if a feature is found to already be installed. It no longer quietly removes the feature from the `/FEATURES` argument. - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105). - Cleaned up a bit in the tests, removed excessive piping.
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
I can replicate this, and I think this is bug in the SQL Server 2017 setup. 🤔 I can replicate this behavior locally, both with DSC and installing manually. I have used SQL Server 2017 RTM, but adding CU 5 during setup (through That the correct value exist can be tested with the following code
TL;DRWhen installing CONN together with all other features the correct registry entry is added. If feature 'CONN' is installed first, and then other Tools components are added, like the feature 'SDK' or feature 'BC', then the registry entry for the 'CONN' feature is removed. Test run 1If I install a instance with just Using command line
Using DSCSqlSetup 'Sql2017'
{
InstanceName = 'TEST2017'
Features = 'SQLENGINE,CON'
SQLCollation = 'SQL_Latin1_General_CP1_CI_AS'
SQLSvcAccount = $SqlServiceCredential
AgtSvcAccount = $SqlAgentServiceCredential
ASSvcAccount = $SqlServiceCredential
SQLSysAdminAccounts = 'COMPANY\SQL Administrators', $SqlAdministratorCredential.UserName
SourcePath = '\\fileserver.compant.local\images$\SQL2016RTM'
UpdateEnabled = 'True'
UpdateSource = '.\Updates\SQL2017CU5'
ForceReboot = $false
BrowserSvcStartupType = 'Automatic'
} ResultAfter the above configuration, the FeatureList in registry is:
Test run 2After the servers was rebooted from "Test run 1", the configuration was ran again, but this time adding Using command line
Using DSCSqlSetup 'Sql2017'
{
InstanceName = 'TEST2017'
Features = 'SQLENGINE,CONN,SDK'
SQLCollation = 'SQL_Latin1_General_CP1_CI_AS'
SQLSvcAccount = $SqlServiceCredential
AgtSvcAccount = $SqlAgentServiceCredential
ASSvcAccount = $SqlServiceCredential
SQLSysAdminAccounts = 'COMPANY\SQL Administrators', $SqlAdministratorCredential.UserName
SourcePath = '\\fileserver.compant.local\images$\SQL2016RTM'
UpdateEnabled = 'True'
UpdateSource = '.\Updates\SQL2017CU5'
ForceReboot = $false
BrowserSvcStartupType = 'Automatic'
} ResultAfter the above configuration, the FeatureList in registry is:
Test run 3On a clean server the configuration was ran for the first time with Using DSCSqlSetup 'Sql2017'
{
InstanceName = 'TEST2017'
Features = 'SQLENGINE,CONN,SDK'
SQLCollation = 'SQL_Latin1_General_CP1_CI_AS'
SQLSvcAccount = $SqlServiceCredential
AgtSvcAccount = $SqlAgentServiceCredential
ASSvcAccount = $SqlServiceCredential
SQLSysAdminAccounts = 'COMPANY\SQL Administrators', $SqlAdministratorCredential.UserName
SourcePath = '\\fileserver.compant.local\images$\SQL2016RTM'
UpdateEnabled = 'True'
UpdateSource = '.\Updates\SQL2017CU5'
ForceReboot = $false
BrowserSvcStartupType = 'Automatic'
} ResultAfter the above configuration, the FeatureList in registry is:
SummaryWhen installing CONN together with all other features the correct registry entry is added. If CONN is first installed, and then other Tools components are added, like the feature SDK, then the registry entry for the CONN feature is removed. |
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Localized messages for Master Data Services no longer start and end with single quote. - When installing features a verbose message is written if a feature is found to already be installed. It no longer quietly removes the feature from the `/FEATURES` argument. - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105). - Cleaned up a bit in the tests, removed excessive piping.
- Changes to SqlSetup - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105).
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to SqlSetup - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105).
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to SqlSetup - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105).
- Changes to integration tests - CONN feature was temporarily removed from the instances installed by the integration tests. This is due to issue dsccommunity#1105.
- Changes to SqlSetup - For SQL Server 2017 when installing feature CONN, and CONN already exist, the feature CONN was no longer detected. Now CONN is forcibly installed even if it already is installed (issue dsccommunity#1105).
I'm trying to wrap my head around how SQL Server detect how CONN is installed. There is no easy answer. It is not as easy as just a registry key obviously. |
In my tests, for SQL Server 2017, the feature CONN (Client Tools Connectivity, and SQL Client Connectivity SDK) install state is controlled by
If the 'Connectivity_Full' is I thinking of adding this new check under a feature flag to not break any older SQL Server edition. |
- Split integration tests into two jobs, one for running integration tests for SQL Server 2016 and another for running integration test for SQL Server 2017 ([issue dsccommunity#858](dsccommunity#858)). - A new optional parameter `FeatureFlag` parameter was added to control breaking changes. Functionality added under a feature flag can be toggled on or off, and could be changed later to be the default. This way we can also make more of the new functionalities the default in the same breaking change release ([issue dsccommunity#1105](dsccommunity#1105)). - Added a new way of detecting if the shared feature CONN (Client Tools Connectivity, and SQL Client Connectivity SDK), BC (Client Tools Backwards Compatibility), and SDK (Client Tools SDK) is installed or not. The new functionality is used when the parameter `FeatureFlag` is set to `'DetectionSharedFeatures'` ([issue dsccommunity#1105](dsccommunity#1105)). - Added a new helper function `Get-InstalledSharedFeatures` to move out some of the code from the `Get-TargetResource` to make unit testing easier and faster.
- Changes to SqlSetup - Split integration tests into two jobs, one for running integration tests for SQL Server 2016 and another for running integration test for SQL Server 2017 (issue #858). - Localized messages for Master Data Services no longer start and end with single quote. - When installing features a verbose message is written if a feature is found to already be installed. It no longer quietly removes the feature from the `/FEATURES` argument. - Cleaned up a bit in the tests, removed excessive piping. - Fixed minor typo in examples. - A new optional parameter `FeatureFlag` parameter was added to control breaking changes. Functionality added under a feature flag can be toggled on or off, and could be changed later to be the default. This way we can also make more of the new functionalities the default in the same breaking change release (issue #1105). - Added a new way of detecting if the shared feature CONN (Client Tools Connectivity, and SQL Client Connectivity SDK), BC (Client Tools Backwards Compatibility), and SDK (Client Tools SDK) is installed or not. The new functionality is used when the parameter `FeatureFlag` is set to `'DetectionSharedFeatures'` (issue #1105). - Added a new helper function `Get-InstalledSharedFeatures` to move out some of the code from the `Get-TargetResource` to make unit testing easier and faster.
Details of the scenario you tried and the problem that is occurring
This issue seems to happen for SQL Server 2017. This issue did not happen on SQL Server 2016. It was noticed when trying to change the integration tests from using SQL Server 2016 to SQL Server 2017 in PR #1103.
This happens only when CONN is already installed on the target node. On AppVeyor build worker there are already a Developer edition installed, hence CONN exist on the target node. When our integration test configuration runs with
Features = 'SQLENGINE,AS,CONN,BC,SDK'
, theSet-TargetResource
function sees thatCONN
is already installed, and will change the feature list to'SQLENGINE,AS,BC,SDK'
.Setup starts, and apparently uninstalls CONN, either because it is not in the list of features any longer, or it is still installed but the the registry entries are changed/removed so is looks like it no longer is installed (just as bad as uninstalling).
Below verbose output shows that first the
Test-TargetResource
function finds it, and also theSet-TargetResource
finds it, but afterSet-TargetResource
installed the rest of the featuresCONN
('Client Connectivity Tools feature') can no longer be detected.The DSC configuration that is using the resource (as detailed as possible)
Any configuration not installing CONN when CONN is already installed.
Version of the operating system and PowerShell the target node is running
AppVeyor Build worker: Windows Server 2016, SQL Server 2017
SQL Server edition and version the target node is running
SQL Server 2017 RTM
What SQL Server PowerShell modules, and which version, are present on the target node.
SQLPS
Version of the DSC module you're using, or write 'dev' if you're using current dev branch
Dev
The text was updated successfully, but these errors were encountered: