- From: Joshua Timberman <
>
- To:
- Subject: [chef] Re: Re: Re: sql_server cookbook errors w/gist
- Date: Mon, 20 Feb 2012 10:26:03 -0700
- Authentication-results: mr.google.com; spf=pass (google.com: domain of
designates 10.60.29.72 as permitted sender)
I released sql_server version 1.1.0 to the community site as well
based on this being resolved.
Thanks!
On Mon, Feb 20, 2012 at 10:05 AM, Sascha Bates
<
>
wrote:
>
I pulled the updated cookbook this morning and everything worked like a
>
charm. I am aboggle.
>
>
>
On Sat, Feb 18, 2012 at 4:08 PM, Seth Chisamore
>
<
>
>
wrote:
>
>
>
> Sasha,
>
> I just provisioned a new instance using this AMI:
>
>
>
> Microsoft Windows Server 2008 R2 Base (AMI Id: ami-f31ccb9a)
>
>
>
> I then bootstrapped the server using 'knife bootstrap winrm' and this role
>
> to the run list:
>
>
>
> name "sql_server"
>
> description "SQL Server database master"
>
> run_list(
>
> "recipe[sql_server::server]"
>
> )
>
> default_attributes(
>
> "sql_server" => {
>
> "accept_eula" => true
>
> }
>
> )
>
>
>
> Everything seems to have installed correctly. Did you remember to include
>
> the "accept_eula" attribute in your role?
>
>
>
> As a side note I also removed some unneeded code from the main
>
> `sql_server::server` recipe:
>
>
>
> https://github.com/schisamo/cookbooks/commit/12a28ea997a404265b62b11a56e82f716de6a37a
>
> http://tickets.opscode.com/browse/COOK-1049
>
>
>
> You may want to do the same in your local copy. I'll be sure to get
>
> Joshua and team to release an updated version of the sql_server next week
>
> with that change integrated.
>
>
>
> --
>
> Seth Chisamore
>
> Software Development Engineer, Opscode, Inc.
>
> IRC, Skype, Twitter, Github: schisamo
>
>
>
> On Saturday, February 18, 2012 at 12:21 PM, Sascha Bates wrote:
>
>
>
> gist: https://gist.github.com/739cb8e92f4e239c5949
>
>
>
> error starting on line 2902 of the gist:
>
> [Sat, 18 Feb 2012 17:08:30 +0000] ERROR: service[MSSQL$SQLEXPRESS]
>
> (sql_server::server line /chef/cache/cookbo
>
>
>
> oks/sql_server/recipes/server.rb) has had an error
>
>
>
> [Sat, 18 Feb 2012 17:08:30 +0000] ERROR: service[MSSQL$SQLEXPRESS]
>
> (c:/chef/cache/cookbooks/sql_server/recipes
>
>
>
> /server.rb:61:in `from_file') had an error:
>
>
>
> service[MSSQL$SQLEXPRESS] (sql_server::server line
>
> /chef/cache/cookbooks/sql_server/recipes/server.rb) had an
>
>
>
> error: Win32::Service::Error: The specified service does not exist as an
>
> installed service.
>
>
>
>
>
> On Sat, Feb 18, 2012 at 9:41 AM, Sascha Bates
>
> <
>
>
> wrote:
>
>
>
> Sorry, keyboard fumbles this morning. I ran a fresh install this morning
>
> and had no issues with the supporting set of cookbooks. I had the exact
>
> same issue again with sql_server. I examined the configuration file and
>
> the
>
> install directory which does not seem to be getting fully created. None of
>
> the SQL services are created. I found a restart.rb in the sql install
>
> folder and it notes the service name as MSSQL$SQLEXPRESS.
>
>
>
> I ran through a manual install and noted that the recipe appears to be
>
> using all default values except for the auth type which defaults to
>
> SQL-only
>
> but calls for mixed mode with the Chef recipe. I have been remote
>
> bootstrapping the instances which is convenient for administration, but
>
> crappy for debugging as the log lines just get cut off.
>
>
>
> I will run through another bootstrap install and run the client directly
>
> on the server in order to get maximum debug output. The only custom
>
> attribute I have is to accept the license. Maybe I will hardcode that in
>
> the recipe and see what that does for my mileage as well.
>
>
>
>
>
> On Sat, Feb 18, 2012 at 9:36 AM, Sascha Bates
>
> <
>
>
> wrote:
>
>
>
> 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.
>
>
>
> --
>
> Seth Chisamore
>
> Software Development Engineer, Opscode, Inc.
>
> IRC, Skype, Twitter, Github: schisamo
>
>
>
>
>
> [0] https://github.com/opscode/cookbooks/blob/master/sql_server/attributes/server.rb#L24
>
>
>
> [1] https://github.com/opscode/cookbooks/blob/master/sql_server/templates/default/ConfigurationFile.ini.erb#L21
>
>
>
> [2] https://github.com/opscode/cookbooks/blob/master/sql_server/recipes/server.rb#L23
>
>
>
> 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
>
> <
>
>
> 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!
>
>
>
> --
>
> Seth Chisamore
>
> Software Development Engineer, Opscode, Inc.
>
> IRC, Skype, Twitter, Github: schisamo
>
>
>
>
>
> [0] https://github.com/opscode/cookbooks/blob/master/chef_handler/recipes/default.rb#L25-27
>
>
>
> [1] https://github.com/opscode/cookbooks/blob/master/windows/recipes/reboot_handler.rb
>
>
>
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
--
Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman
Archive powered by MHonArc 2.6.16.