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 fails to install when defining domain accounts for services? #164

Closed
JHBoricua opened this issue May 22, 2021 · 0 comments
Closed

SQL fails to install when defining domain accounts for services? #164

JHBoricua opened this issue May 22, 2021 · 0 comments

Comments

@JHBoricua
Copy link
Contributor

👻 Brief Description

Hello. I'm testing a cookbook via kitchen that calls the sql_server_install resource. The installation of SQL fails when I define a domain account to run the Sql server and Agent services, but succeeds when I don't.

🥞 Cookbook version

6.2.1

👩‍🍳 Chef-Infra Version

17.1.35

🎩 Platform details

Windows Server 2016

Steps To Reproduce

  • Create test kitchen instance, instance is domain joined as part of the creation process
  • converge cookbook

The cookbook does the following:

  • Maps network share containing setup files to X:
  • Calls the sql_server_install resource with the following params:
sql_server_install do
  accept_eula true
  agent_account 'mydomain\\sqlagent'
  agent_account_pwd '******'
  agent_startup 'Automatic'
  feature %w(SQLENGINE FULLTEXT CONN BC)
  install_dir 'S:\\Program Files\\Microsoft SQL Server'
  instance_dir 'S:\\Program Files\\Microsoft SQL Server'
  instance_name 'MSSQLSERVER'
  netfx35_install false
  product_key '88888-88888-88888-88888-88888'
  sa_password '***********'
  security_mode 'Mixed Mode Authentication'
  source_url 'X:\\setup.exe'
  sql_account 'mydomain\\sqlsrvr'
  sql_account_pwd '******'
  sql_backup_dir 'R:\\Backups'
  sql_collation 'SQL_Latin1_General_CP1_CI_AS'
  sql_temp_db_dir 'T:\\Data'
  sql_temp_db_log_dir 'G:\\Logs'
  sql_user_db_dir 'D:\\Data'
  sql_user_db_log_dir 'G:\\Logs'
  sysadmins ['mydomain\\dba', 'mydomain\\sqldm']
  version '2017'
end

🚓 Expected behavior

SQL should install successfully and the defined domain accounts above should be running the SQL server and Agent services. Instead the install fails.

If I call the install resource above without the agent_account, agent_account_pwd, sql_account and sql_account_pwd defined, which causes the install to use the built-in local accounts instead to run the services, the installation is successful.

The SQL bootstrap log (full output in link below) shows an access denied error:

Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2061762559
  Exit facility code:            1308
  Exit error code:               1
  Exit message:                  Access is denied.  
  Start time:                    2021-05-21 23:26:41
  End time:                      2021-05-21 23:27:40
  Requested action:              Install

➕ Additional context

  • I've verified the validity of the passwords for the domain service accounts
  • I've looked at the generated ConfigurationFile.ini that the cookbook generates and it looks correct when compared to one generated by a manual installation.
  • The chef run output is here: https://pastebin.com/6Qn6jUwr
  • The SQL bootstrap log is here: https://pastebin.com/JeDaqGKW
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

No branches or pull requests

1 participant