[chef] Re: Re: Re: Re: windows and the sql_server cookbook


Chronological Thread 
  • From: Sascha Bates < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: windows and the sql_server cookbook
  • Date: Sat, 18 Feb 2012 09:36:16 -0600
  • Authentication-results: mr.google.com; spf=pass (google.com: domain of designates 10.182.182.100 as permitted sender) ; dkim=pass

Y

On Sat, Feb 18, 2012 at 9:30 AM, Seth Chisamore < "> > wrote:
Sasha,
The sql_server cookbook doesn't actual create any services…it just uses the Chef service resource to wrap/interact with the underlying service created by the SQLServer installer.  The actual service name differs per installation of SQL Server and uses the form: 

MSSQL$ + SQL Server instance name

So if you installed SQL Server Express with all default options the service name would be 'MSSQL$SQLEXPRESS'.

One of the nice things about using Chef to install SQL Server is this actual instance name is configurable by a cookbook attribute [0] (i.e. you can set it in role).  This value is leveraged by by the installer response template file [1] [ (i.e. ConfigurationFile.ini) and the service resource in the recipe [2].

I would also recommend generating a full set of debug output (i.e. chef-client -l debug) and throwing it in a gist, as this will help the group debug your issue.

On Friday, February 17, 2012 at 8:18 PM, Sascha Bates wrote:

Thanks for the 411 on the handler.  That makes my life easier.  I'm in the early days of a proof of concept so I was just snagging cookbooks one by one as I needed them and forgot to audit the metadata before playing around, which is why I didn't notice deps right away.  

So then I'm back to my other issue which is why the SQL service isn't being created despite a dearth of failure messages.  I've already shut down my stuff for the evening, but if you could offer me any advice on what to look at for why it's failing, I'll take it up again in the morning.

On Fri, Feb 17, 2012 at 9:52 PM, Seth Chisamore < " target="_blank"> > wrote:
Sasha,
Try leaving the 'chef_handler::default' recipe off of your node's run list. It appears the remote_file resource declaration in that recipe [0] has a user and group of 'root' neither of which exist on a Windows machine and would explain the cryptic UID error.

You correctly observed the sql_server cookbook has a transitive dependency on the chef_handler cookbook.  This dependency occurs through the windows cookbook which relies on the chef_handler LWRP for registering the optional WindowsRebootHandler [1].  Although the windows cookbook expects the chef_handler cookbook to be present on the node (so the LWRP can be loaded) it does not need the chef_handler::default recipe in the run list.  As long as all cookbooks were uploaded to the Chef Server then chef-client will ensure all cookbooks are downloaded to the node by way of the 'depends' declarations in the metadata.rb of all cookbooks involved.

Also be sure to call 'knife cookbook upload' with a -d option to ensure a cookbook is uploaded along with all of the cookbooks it depends on.

Hope that helps!

On Friday, February 17, 2012 at 1:09 PM, Sascha Bates wrote:

Has anyone had any success with the sql_server cookbook on Windows Server 2008r2?

Issues I'm having: 

Running on ec2 WinServer 2008r2 32 bit, chef-solo with the node.save commented out:

line numbers are missing from error messages
[Fri, 17 Feb 2012 17:34:35 +0000] INFO: Processing remote_directory[c:/chef/handlers] action create (chef_handler::default line /chef/cache/cookbooks/chef_handler/recipes/default.rb)

sql_server not indicating that it's missing dependencies.  
I missed adding the chef_handler cookbook as the sql_server recipe didn't error on missing deps.  It just ran until I got to the next error which was a failure to restart the MSSQL$SQLEXPRESS service because the service didn't exist.

I have been unable to determine why the service isn't created - all the blocks prior to the restart notification complete successfully.

At this point I turned to my hosted chef to see if it was just chef-solo that hated me.
Running against hosted chef is where I discovered I was missing the chef_handler cookbook because the uploads to the cookbook repo errored at me.

In this setup, I bootstrapped an ec2 VM with the following command:
knife bootstrap windows winrm <host> -r 'role[sql]' -x Administrator 
and it failed with the known uid bug (chef-2633)


Which leads me to ask the questions:
Has anyone succeeded with a sql_server cookbook install and when is 10.10 going to be released so I can get past the uid bug?  Is there anything I'm missing?

Sascha







Archive powered by MHonArc 2.6.16.

§