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

[sql-server-2022] SQL 2022 dev cluster install fails when adding additional nodes #168

Open
ccpDeNormalized opened this issue Jan 31, 2024 · 0 comments

Comments

@ccpDeNormalized
Copy link

When adding a secondary node to a sql 2022 dev cluster choco install fails with:

Exit message: The setting 'SQLSYSADMINACCOUNTS' is not allowed when the value of setting 'ACTION' is 'AddNode'.

This is because choco defaults to adding SQLSYSADMINACCOUNTS as current user if it is not included in the config file. However, SQL server does not support this param when adding a cluster node.

"/SQLSYSADMINACCOUNTS: - A username or group to add to the SQL SysAdmin role - defaults to current user. This option is only set if configurationfile.ini does not contain 'SQLSYSADMINACCOUNTS=' at the start of a line.

The problem code is within chocolatelyinstall.ps1 - this should only add if not present and action <> addnode

if (!$pp['SQLSYSADMINACCOUNTS']) {

Test for presence of "^SQLSYSADMINACCOUNTS=" in the ini - add the default only if not present

if (-not ((Get-Content -Path $($pp['CONFIGURATIONFILE'])) -match "^SQLSYSADMINACCOUNTS=")) {
$pp['SQLSYSADMINACCOUNTS'] = "$env:USERDOMAIN$env:USERNAME"
}
}

@flcdrg flcdrg changed the title SQL 2022 dev cluster install fails when adding additional nodes [sql-server-2022] SQL 2022 dev cluster install fails when adding additional nodes Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants