Chef 11.6 Windows, error with templates?

I tried booting up a new Windows Server instance today. Since the
knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com Error executing action create
on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Chef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.com -------------------------------
ec2-184-72-136-111.compute-1.amazonaws.com The system cannot find the path
specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- Begin Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.com System Error Message: The system
cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.com ---------------------
ec2-184-72-136-111.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com 16: cookbook_file
"/Progra~1/NSClient++/nsclient.ini" do
ec2-184-72-136-111.compute-1.amazonaws.com 17: source
"nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com 18: end
ec2-184-72-136-111.compute-1.amazonaws.com 19:
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.com ------------------
ec2-184-72-136-111.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file’
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comcookbook_file("/Progra~1/NSClient++/nsclient.ini")
do
ec2-184-72-136-111.compute-1.amazonaws.com provider
Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.com action “create"
ec2-184-72-136-111.compute-1.amazonaws.com retries 0
ec2-184-72-136-111.compute-1.amazonaws.com retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.com path
”/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com backup 5
ec2-184-72-136-111.compute-1.amazonaws.com atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.com source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.com recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.com end
ec2-184-72-136-111.compute-1.amazonaws.com

I disabled that recipe and got a similar error the first time it hit a
template.

I read the release notes about the file changes, but I didn’t think I was
doing anything that should cause trouble. Is there anything in that
compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian

Brian Anderson | Operations Engineer
Phone 781.696.1304

www.affectiva.com
http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

On Friday, July 26, 2013 at 10:37 AM, Brian Anderson wrote:

I tried booting up a new Windows Server instance today. Since the knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) Error executing action create on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) Chef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) -------------------------------
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) The system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ---- Begin Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) System Error Message: The system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ---------------------
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) # In c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) 16: cookbook_file "/Progra~1/NSClient++/nsclient.ini" do
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) 17: source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) 18: end
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) 19:
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) ------------------
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) # Declared in c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file'
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) cookbook_file("/Progra~1/NSClient++/nsclient.ini") do
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) provider Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) action "create"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) retries 0
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) path "/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) backup 5
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com) end
ec2-184-72-136-111.compute-1.amazonaws.com (http://ec2-184-72-136-111.compute-1.amazonaws.com)

I disabled that recipe and got a similar error the first time it hit a template.

I read the release notes about the file changes, but I didn't think I was doing anything that should cause trouble. Is there anything in that compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian
This is weird. I ran a bunch of cookbooks on windows when testing 11.6 and never saw anything like this. Can you post the contents of your chef-stacktrace.out file?

--
Daniel DeLeo

I had a similar problem with the sensu cookbook last night. Basically, its having problems with paths that start with /,

For me, it didn’t happen on the first run, but only on subsequent runs, basically because it seems to only happen if the target file already exists, but having looked into it, it could happen in a number of circumstances.

Problem seems to boil down to the fact that /something is being interpreted as an absolute path in some instances, where really its relative to the current drive, but the windows file api wrappers are prepending \?\ to the path names to support long path names, unfortunately in order for that to work, the path name must be absolute.

To work around it in my case for now, I overrode the default sensu directory from /etc/sensu to c:\etc\sensu, which stops the error occurring.

Here’s an example in chef\win32\file.rb ( method self.symlink? ) where its failing.

    path = encode_path(file_name)
    if ::File.exists?(file_name)
      if ((GetFileAttributesW(path) & FILE_ATTRIBUTE_REPARSE_POINT) > 0)
        file_search_handle(file_name) do |handle, find_data|

Basically, the file_name contains /etc/sensu, which encode_path turns into \?\etc\sensu<file:///\%3f\etc\sensu>, which isn’t a valid path, as it doesn’t include a drive specifier ( \?\ format paths must be fully qualified ),
GetFileAttributesW then returns -1 because the file doesn’t exist, ( but the File.exists? call succeeds as it uses the un-encoded path name. ) the -1 passes the & FILE_ATTRIBUTE_REPARSE_POINT check as -1 has all bits set, and so it goes into the file_search_handle method, which in turn does its own encode on the file_name, and finally that’s where the actual file not found error is raised.

Unfortunately I’m a total ruby & chef noob, so for now I’m avoiding the issue for now by changing my path to include the drive specifier. I’m posting the details in the hope that someone more familiar with the code can suggest a proper solution.

Thanks
Andrew McDonald

From: Brian Anderson [mailto:brian.anderson@affectiva.com]
Sent: Friday, July 26, 2013 10:38 AM
To: chef@lists.opscode.com
Subject: [chef] Chef 11.6 Windows, error with templates?

I tried booting up a new Windows Server instance today. Since the knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ================================================================================
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com Error executing action create on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ================================================================================
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com Chef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com -------------------------------
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com The system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ---- Begin Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com System Error Message: The system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ---------------------
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com # In c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com 16: cookbook_file “/Progra~1/NSClient++/nsclient.ini” do
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com 17: source “nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com 18: end
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com 19:
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com ------------------
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com # Declared in c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file’
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com cookbook_file(”/Progra~1/NSClient++/nsclient.ini") do
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com provider Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com action "create"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com retries 0
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com path "/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com backup 5
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com end
ec2-184-72-136-111.compute-1.amazonaws.comhttp://ec2-184-72-136-111.compute-1.amazonaws.com

I disabled that recipe and got a similar error the first time it hit a template.

I read the release notes about the file changes, but I didn’t think I was doing anything that should cause trouble. Is there anything in that compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian

Brian Anderson | Operations Engineer
Phone 781.696.1304
[http://www.finsmes.com/wp-content/uploads/2011/07/Affectiva_logo_JPG.jpg]
www.affectiva.comhttp://www.affectiva.com/
[http://www.snoitulosten.com/wp-content/uploads/2010/01/facebook-small.jpg]http://www.facebook.com/affectiva [http://www.snoitulosten.com/wp-content/uploads/2010/01/twitter-small.jpg] https://twitter.com/Affectiva [http://images4.wikia.nocookie.net/__cb20101115140837/finalfantasy/images/9/93/Youtube_icon_logo.gif] http://www.youtube.com/user/affectiva [http://brendanmitchell.files.wordpress.com/2009/03/blog-icon-200.png] http://www.affectiva.com/blog/ [http://www.itprosphilly.com/wp-content/uploads/2011/08/linkedin-icon-small.png] http://www.linkedin.com/company/affectiva_2 [http://www.thesimplerweb.com/wp-content/uploads/2012/08/google-plus-icon.jpg?cda6c1] https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

I'll have to boot up another one and try it again... these are AWS
instances and I terminated them on error.

I'll run through it today and post up the results.

Brian

On Fri, Jul 26, 2013 at 1:49 PM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, July 26, 2013 at 10:37 AM, Brian Anderson wrote:

I tried booting up a new Windows Server instance today. Since the
knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com Error executing action
create on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Chef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.com -------------------------------
ec2-184-72-136-111.compute-1.amazonaws.com The system cannot find the
path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- Begin Win32 API output

ec2-184-72-136-111.compute-1.amazonaws.com System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.com System Error Message: The
system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.com ---------------------
ec2-184-72-136-111.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com 16: cookbook_file
"/Progra~1/NSClient++/nsclient.ini" do
ec2-184-72-136-111.compute-1.amazonaws.com 17: source
"nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com 18: end
ec2-184-72-136-111.compute-1.amazonaws.com 19:
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.com ------------------
ec2-184-72-136-111.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file'
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comcookbook_file("/Progra~1/NSClient++/nsclient.ini") do
ec2-184-72-136-111.compute-1.amazonaws.com provider
Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.com action "create"
ec2-184-72-136-111.compute-1.amazonaws.com retries 0
ec2-184-72-136-111.compute-1.amazonaws.com retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.com path
"/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com backup 5
ec2-184-72-136-111.compute-1.amazonaws.com atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.com source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.com recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.com end
ec2-184-72-136-111.compute-1.amazonaws.com

I disabled that recipe and got a similar error the first time it hit a
template.

I read the release notes about the file changes, but I didn't think I was
doing anything that should cause trouble. Is there anything in that
compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian

This is weird. I ran a bunch of cookbooks on windows when testing 11.6 and
never saw anything like this. Can you post the contents of your
chef-stacktrace.out file?

--
Daniel DeLeo

--
Brian Anderson | Operations Engineer
Phone 781.696.1304

http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

Weird is right...

I just launched an instance using our standard AMI (Windows server 2008 r2,
latest updates as of maybe 4-6 weeks ago)

Running along, processing templates just fine, then breaks with a
permission denied error:

ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:05-04:00]
INFO: Processing template[/etc/sensu/conf.d/worker-interactive.json] action
create (affect_mon::sensu-x1interactive-checks line 14)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:05-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] created file
/etc/sensu/conf.d/worker-interactive.json
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] updated file
contents /etc/sensu/conf.d/worker-interactive.json
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] owner changed to
S-1-5-21-2359669852-410513563-3594093940-500
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] group changed to
S-1-5-32-544
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] permissions
changed to [AFFECTIVA-X1\Administrator/flags:0/mask:c0010000,
BUILTIN\Administrators/flags:0/mask:80000000,
Everyone/flags:0/mask:80000000]
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: Processing service[sensu-client] action nothing
(affect_mon::sensu-x1batch-checks line 10)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: Processing template[/etc/sensu/conf.d/worker-batch.json] action
create (affect_mon::sensu-x1batch-checks line 14)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-batch.json] created file
/etc/sensu/conf.d/worker-batch.json
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com================================================================================
ec2-184-72-146-236.compute-1.amazonaws.com Error executing action create
on resource 'template[/etc/sensu/conf.d/worker-batch.json]'
ec2-184-72-146-236.compute-1.amazonaws.com================================================================================
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Errno::EACCES
ec2-184-72-146-236.compute-1.amazonaws.com -------------
ec2-184-72-146-236.compute-1.amazonaws.com Permission denied -
/etc/sensu/conf.d/worker-batch.json
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-146-236.compute-1.amazonaws.com ---------------------
ec2-184-72-146-236.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/affect_mon/recipes/sensu-x1batch-checks.rb
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com 14: template
"/etc/sensu/conf.d/worker-batch.json" do
ec2-184-72-146-236.compute-1.amazonaws.com 15: source
"sensu-confd/worker-batch.json.erb"
ec2-184-72-146-236.compute-1.amazonaws.com 16: owner
node['sensu']['user']
ec2-184-72-146-236.compute-1.amazonaws.com 17: group
node['sensu']['group']
ec2-184-72-146-236.compute-1.amazonaws.com 18: mode "0644"
ec2-184-72-146-236.compute-1.amazonaws.com 19: notifies :restart,
"service[sensu-client]"
ec2-184-72-146-236.compute-1.amazonaws.com 20: only_if
{File.exists?("/etc/sensu/conf.d")}
ec2-184-72-146-236.compute-1.amazonaws.com 21: end
ec2-184-72-146-236.compute-1.amazonaws.com 22:
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-146-236.compute-1.amazonaws.com ------------------
ec2-184-72-146-236.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/affect_mon/recipes/sensu-x1batch-checks.rb:14:in
`from_file'
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.comtemplate("/etc/sensu/conf.d/worker-batch.json")
do
ec2-184-72-146-236.compute-1.amazonaws.com provider
Chef::Provider::Template
ec2-184-72-146-236.compute-1.amazonaws.com action "create"
ec2-184-72-146-236.compute-1.amazonaws.com retries 0
ec2-184-72-146-236.compute-1.amazonaws.com retry_delay 2
ec2-184-72-146-236.compute-1.amazonaws.com path
"/etc/sensu/conf.d/worker-batch.json"
ec2-184-72-146-236.compute-1.amazonaws.com backup 5
ec2-184-72-146-236.compute-1.amazonaws.com atomic_update true
ec2-184-72-146-236.compute-1.amazonaws.com source
"sensu-confd/worker-batch.json.erb"
ec2-184-72-146-236.compute-1.amazonaws.com cookbook_name "affect_mon"
ec2-184-72-146-236.compute-1.amazonaws.com recipe_name
"sensu-x1batch-checks"
ec2-184-72-146-236.compute-1.amazonaws.com owner "Administrator"
ec2-184-72-146-236.compute-1.amazonaws.com group "Administrators"
ec2-184-72-146-236.compute-1.amazonaws.com mode "0644"
ec2-184-72-146-236.compute-1.amazonaws.com only_if { #code block }
ec2-184-72-146-236.compute-1.amazonaws.com end
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Running queued delayed notifications before re-raising exception
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: template[C:/chef/client.rb] sending create action to
ruby_block[reload_client_config] (delayed)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Processing ruby_block[reload_client_config] action create
(chef-client::config line 86)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: ruby_block[reload_client_config] called
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] sending restart
action to service[sensu-client] (delayed)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Processing service[sensu-client] action restart
(affect_mon::sensu-x1batch-checks line 10)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
INFO: service[sensu-client] restarted
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
ERROR: Running exception handlers
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
ERROR: Exception handlers complete
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
FATAL: Errno:

The template definitions are identical for worker-batch and
worker-interactive:

This worked:

template "/etc/sensu/conf.d/worker-interactive.json" do
source "sensu-confd/worker-interactive.json.erb"
owner node['sensu']['user']
group node['sensu']['group']
mode "0644"
notifies :restart, "service[sensu-client]"
only_if {File.exists?("/etc/sensu/conf.d")}
end

This failed:

template "/etc/sensu/conf.d/worker-batch.json" do
source "sensu-confd/worker-batch.json.erb"
owner node['sensu']['user']
group node['sensu']['group']
mode "0644"
notifies :restart, "service[sensu-client]"
only_if {File.exists?("/etc/sensu/conf.d")}
end

/etc/sensu/conf.d/worker-batch.json was created but has no content.
/etc/sensu/conf.d/worker-interactive.json is correct as one would expect
based on the output.

And the stacktrace:

Generated at 2013-07-29 09:57:58 -0400
Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]
(affect_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:
Permission denied - /etc/sensu/conf.d/worker-batch.json
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in unlink' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in block in
remove_file'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1414:in
platform_support' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1405:in remove_file'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:515:in block in mv' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in block in
fu_each_src_dest'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in
fu_each_src_dest0' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in fu_each_src_dest'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:508:in mv' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/file_content_management/deploy/mv_windows.rb:78:in deploy'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:331:in
update_file_contents' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:350:in block in do_contents_changes'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in
call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in add_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:149:in
converge_by' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:349:in do_contents_changes'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:120:in
action_create' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:114:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in
run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in each'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:98:in block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in
call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:85:in
step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:96:in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:80:in
converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in
do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:212:in run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in
run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in block in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in
run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in <top (required)>'
C:/opscode/chef/bin/chef-client:23:in load' C:/opscode/chef/bin/chef-client:23:in '

On Fri, Jul 26, 2013 at 1:49 PM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, July 26, 2013 at 10:37 AM, Brian Anderson wrote:

I tried booting up a new Windows Server instance today. Since the
knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com Error executing action
create on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Chef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.com -------------------------------
ec2-184-72-136-111.compute-1.amazonaws.com The system cannot find the
path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- Begin Win32 API output

ec2-184-72-136-111.compute-1.amazonaws.com System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.com System Error Message: The
system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.com ---------------------
ec2-184-72-136-111.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com 16: cookbook_file
"/Progra~1/NSClient++/nsclient.ini" do
ec2-184-72-136-111.compute-1.amazonaws.com 17: source
"nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com 18: end
ec2-184-72-136-111.compute-1.amazonaws.com 19:
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.com ------------------
ec2-184-72-136-111.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file'
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comcookbook_file("/Progra~1/NSClient++/nsclient.ini") do
ec2-184-72-136-111.compute-1.amazonaws.com provider
Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.com action "create"
ec2-184-72-136-111.compute-1.amazonaws.com retries 0
ec2-184-72-136-111.compute-1.amazonaws.com retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.com path
"/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com backup 5
ec2-184-72-136-111.compute-1.amazonaws.com atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.com source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.com recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.com end
ec2-184-72-136-111.compute-1.amazonaws.com

I disabled that recipe and got a similar error the first time it hit a
template.

I read the release notes about the file changes, but I didn't think I was
doing anything that should cause trouble. Is there anything in that
compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian

This is weird. I ran a bunch of cookbooks on windows when testing 11.6 and
never saw anything like this. Can you post the contents of your
chef-stacktrace.out file?

--
Daniel DeLeo

--
Brian Anderson | Operations Engineer
Phone 781.696.1304

http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

And more. Re-running the same recipe now gives me an error on a file that
was created by Chef on the last run.

  • template[/etc/sensu/conf.d/base-checks.json] action
    create[2013-07-29T11:04:
    30-04:00] INFO: Processing template[/etc/sensu/conf.d/base-checks.json]
    action c
    reate (affect_mon::sensu-client line 40)

================================================================================

Error executing action create on resource
'template[/etc/sensu/conf.d/base-che
cks.json]'

Chef::Exceptions::Win32APIError

The system cannot find the path specified.
---- Begin Win32 API output ----
System Error Code: 3
System Error Message: The system cannot find the path specified.
---- End Win32 API output ----

Resource Declaration:

In C:/chef/cache/cookbooks/affect_mon/recipes/sensu-client.rb

40: template "#{node['sensu']['conf_dir']}/base-checks.json" do
41: source "sensu-confd/base-checks-win.json.erb"
42: owner node['sensu']['user']
43: group node['sensu']['group']
44: mode "0644"
45: end
46:

Compiled Resource:

Declared in

C:/chef/cache/cookbooks/affect_mon/recipes/sensu-client.rb:40:in `
from_file'

template("/etc/sensu/conf.d/base-checks.json") do
provider Chef::Provider::Template
action "create"
retries 0
retry_delay 2
path "/etc/sensu/conf.d/base-checks.json"
backup 5
atomic_update true
source "sensu-confd/base-checks-win.json.erb"
cookbook_name "affect_mon"
recipe_name "sensu-client"
owner "Administrator"
group "Administrators"
mode "0644"
end

[2013-07-29T11:04:30-04:00] INFO: Running queued delayed notifications
before re
-raising exception
[2013-07-29T11:04:30-04:00] ERROR: Running exception handlers
[2013-07-29T11:04:30-04:00] ERROR: Exception handlers complete
[2013-07-29T11:04:30-04:00] FATAL: Stacktrace dumped to
C:/chef/cache/chef-stack
trace.out
Chef Client failed. 2 resources updated
[2013-07-29T11:04:30-04:00] FATAL: Chef::Exceptions::Win32APIError:
template[/et
c/sensu/conf.d/base-checks.json] (affect_mon::sensu-client line 40) had an
error
: Chef::Exceptions::Win32APIError: The system cannot find the path
specified.
---- Begin Win32 API output ----
System Error Code: 3
System Error Message: The system cannot find the path specified.
---- End Win32 API output ----

Stacktrace:

Generated at 2013-07-29 11:04:30 -0400
Chef::Exceptions::Win32APIError:
template[/etc/sensu/conf.d/base-checks.json] (affect_mon::sensu-client line
40) had an error: Chef::Exceptions::Win32APIError: The system cannot find
the path specified.
---- Begin Win32 API output ----
System Error Code: 3
System Error Message: The system cannot find the path specified.
---- End Win32 API output ----

C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/win32/error.rb:69:in
raise!' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/win32/api/file.rb:478:in file_search_handle'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/win32/file.rb:75:in
symlink?' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:268:in real_file?'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:192:in
inspect_existing_fs_entry' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:105:in define_resource_requirements'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/template.rb:45:in
define_resource_requirements' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:103:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in
run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in each'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:98:in block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in
call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:85:in
step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:96:in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:80:in
converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in
do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:212:in run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in
run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in block in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in
run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in <top (required)>'
C:/opscode/chef/bin/chef-client:23:in load' C:/opscode/chef/bin/chef-client:23:in '

On Mon, Jul 29, 2013 at 10:21 AM, Brian Anderson <
brian.anderson@affectiva.com> wrote:

Weird is right...

I just launched an instance using our standard AMI (Windows server 2008
r2, latest updates as of maybe 4-6 weeks ago)

Running along, processing templates just fine, then breaks with a
permission denied error:

ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:05-04:00]
INFO: Processing template[/etc/sensu/conf.d/worker-interactive.json] action
create (affect_mon::sensu-x1interactive-checks line 14)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:05-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] created file
/etc/sensu/conf.d/worker-interactive.json
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] updated file
contents /etc/sensu/conf.d/worker-interactive.json
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] owner changed to
S-1-5-21-2359669852-410513563-3594093940-500
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] group changed to
S-1-5-32-544
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] permissions
changed to [AFFECTIVA-X1\Administrator/flags:0/mask:c0010000,
BUILTIN\Administrators/flags:0/mask:80000000,
Everyone/flags:0/mask:80000000]
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: Processing service[sensu-client] action nothing
(affect_mon::sensu-x1batch-checks line 10)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: Processing template[/etc/sensu/conf.d/worker-batch.json] action
create (affect_mon::sensu-x1batch-checks line 14)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:29-04:00]
INFO: template[/etc/sensu/conf.d/worker-batch.json] created file
/etc/sensu/conf.d/worker-batch.json
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com================================================================================
ec2-184-72-146-236.compute-1.amazonaws.com Error executing action
create on resource 'template[/etc/sensu/conf.d/worker-batch.json]'
ec2-184-72-146-236.compute-1.amazonaws.com================================================================================
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Errno::EACCES
ec2-184-72-146-236.compute-1.amazonaws.com -------------
ec2-184-72-146-236.compute-1.amazonaws.com Permission denied -
/etc/sensu/conf.d/worker-batch.json
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-146-236.compute-1.amazonaws.com ---------------------
ec2-184-72-146-236.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/affect_mon/recipes/sensu-x1batch-checks.rb
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com 14: template
"/etc/sensu/conf.d/worker-batch.json" do
ec2-184-72-146-236.compute-1.amazonaws.com 15: source
"sensu-confd/worker-batch.json.erb"
ec2-184-72-146-236.compute-1.amazonaws.com 16: owner
node['sensu']['user']
ec2-184-72-146-236.compute-1.amazonaws.com 17: group
node['sensu']['group']
ec2-184-72-146-236.compute-1.amazonaws.com 18: mode "0644"
ec2-184-72-146-236.compute-1.amazonaws.com 19: notifies :restart,
"service[sensu-client]"
ec2-184-72-146-236.compute-1.amazonaws.com 20: only_if
{File.exists?("/etc/sensu/conf.d")}
ec2-184-72-146-236.compute-1.amazonaws.com 21: end
ec2-184-72-146-236.compute-1.amazonaws.com 22:
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-146-236.compute-1.amazonaws.com ------------------
ec2-184-72-146-236.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/affect_mon/recipes/sensu-x1batch-checks.rb:14:in
`from_file'
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.comtemplate("/etc/sensu/conf.d/worker-batch.json") do
ec2-184-72-146-236.compute-1.amazonaws.com provider
Chef::Provider::Template
ec2-184-72-146-236.compute-1.amazonaws.com action "create"
ec2-184-72-146-236.compute-1.amazonaws.com retries 0
ec2-184-72-146-236.compute-1.amazonaws.com retry_delay 2
ec2-184-72-146-236.compute-1.amazonaws.com path
"/etc/sensu/conf.d/worker-batch.json"
ec2-184-72-146-236.compute-1.amazonaws.com backup 5
ec2-184-72-146-236.compute-1.amazonaws.com atomic_update true
ec2-184-72-146-236.compute-1.amazonaws.com source
"sensu-confd/worker-batch.json.erb"
ec2-184-72-146-236.compute-1.amazonaws.com cookbook_name "affect_mon"
ec2-184-72-146-236.compute-1.amazonaws.com recipe_name
"sensu-x1batch-checks"
ec2-184-72-146-236.compute-1.amazonaws.com owner "Administrator"
ec2-184-72-146-236.compute-1.amazonaws.com group "Administrators"
ec2-184-72-146-236.compute-1.amazonaws.com mode "0644"
ec2-184-72-146-236.compute-1.amazonaws.com only_if { #code block }
ec2-184-72-146-236.compute-1.amazonaws.com end
ec2-184-72-146-236.compute-1.amazonaws.com
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Running queued delayed notifications before re-raising exception
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: template[C:/chef/client.rb] sending create action to
ruby_block[reload_client_config] (delayed)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Processing ruby_block[reload_client_config] action create
(chef-client::config line 86)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: ruby_block[reload_client_config] called
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: template[/etc/sensu/conf.d/worker-interactive.json] sending restart
action to service[sensu-client] (delayed)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:56-04:00]
INFO: Processing service[sensu-client] action restart
(affect_mon::sensu-x1batch-checks line 10)
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
INFO: service[sensu-client] restarted
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
ERROR: Running exception handlers
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
ERROR: Exception handlers complete
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
ec2-184-72-146-236.compute-1.amazonaws.com [2013-07-29T09:57:58-04:00]
FATAL: Errno:

The template definitions are identical for worker-batch and
worker-interactive:

This worked:

template "/etc/sensu/conf.d/worker-interactive.json" do
source "sensu-confd/worker-interactive.json.erb"
owner node['sensu']['user']
group node['sensu']['group']
mode "0644"
notifies :restart, "service[sensu-client]"
only_if {File.exists?("/etc/sensu/conf.d")}
end

This failed:

template "/etc/sensu/conf.d/worker-batch.json" do
source "sensu-confd/worker-batch.json.erb"
owner node['sensu']['user']
group node['sensu']['group']
mode "0644"
notifies :restart, "service[sensu-client]"
only_if {File.exists?("/etc/sensu/conf.d")}
end

/etc/sensu/conf.d/worker-batch.json was created but has no content.
/etc/sensu/conf.d/worker-interactive.json is correct as one would expect
based on the output.

And the stacktrace:

Generated at 2013-07-29 09:57:58 -0400
Errno::EACCES: template[/etc/sensu/conf.d/worker-batch.json]
(affect_mon::sensu-x1batch-checks line 14) had an error: Errno::EACCES:
Permission denied - /etc/sensu/conf.d/worker-batch.json
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in unlink' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1406:in block in
remove_file'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1414:in
platform_support' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1405:in remove_file'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:515:in block in mv' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1515:in block in
fu_each_src_dest'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1531:in
fu_each_src_dest0' C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:1513:in fu_each_src_dest'
C:/opscode/chef/embedded/lib/ruby/1.9.1/fileutils.rb:508:in mv' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/file_content_management/deploy/mv_windows.rb:78:in deploy'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:331:in
update_file_contents' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:350:in block in do_contents_changes'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in
call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/mixin/why_run.rb:52:in add_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:149:in
converge_by' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:349:in do_contents_changes'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider/file.rb:120:in
action_create' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/provider.rb:114:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource.rb:625:in
run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:49:in run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in each'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:81:in
block in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:98:in block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in
call' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:116:in call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:85:in
step' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:104:in iterate'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/resource_collection.rb:96:in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/runner.rb:80:in
converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:429:in converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:494:in
do_run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/client.rb:212:in run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:183:in
run_chef_client' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:302:in block in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in
loop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application/client.rb:294:in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/lib/chef/application.rb:66:in
run' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.6.0/bin/chef-client:26:in <top (required)>'
C:/opscode/chef/bin/chef-client:23:in load' C:/opscode/chef/bin/chef-client:23:in '

On Fri, Jul 26, 2013 at 1:49 PM, Daniel DeLeo dan@kallistec.com wrote:

On Friday, July 26, 2013 at 10:37 AM, Brian Anderson wrote:

I tried booting up a new Windows Server instance today. Since the
knife-windows plugin always installs the latest version of Chef, I got 11.6.

My chef run blew up pretty quickly at the first cookbook_file I hit:

ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com Error executing action
create on resource 'cookbook_file[/Progra~1/NSClient++/nsclient.ini]'
ec2-184-72-136-111.compute-1.amazonaws.com================================================================================
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comChef::Exceptions::Win32APIError
ec2-184-72-136-111.compute-1.amazonaws.com-------------------------------
ec2-184-72-136-111.compute-1.amazonaws.com The system cannot find the
path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- Begin Win32 API output

ec2-184-72-136-111.compute-1.amazonaws.com System Error Code: 3
ec2-184-72-136-111.compute-1.amazonaws.com System Error Message: The
system cannot find the path specified.
ec2-184-72-136-111.compute-1.amazonaws.com ---- End Win32 API output ----
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Resource Declaration:
ec2-184-72-136-111.compute-1.amazonaws.com ---------------------
ec2-184-72-136-111.compute-1.amazonaws.com # In
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com 16: cookbook_file
"/Progra~1/NSClient++/nsclient.ini" do
ec2-184-72-136-111.compute-1.amazonaws.com 17: source
"nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com 18: end
ec2-184-72-136-111.compute-1.amazonaws.com 19:
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.com Compiled Resource:
ec2-184-72-136-111.compute-1.amazonaws.com ------------------
ec2-184-72-136-111.compute-1.amazonaws.com # Declared in
c:/chef/cache/cookbooks/nagios/recipes/client-win.rb:16:in `from_file'
ec2-184-72-136-111.compute-1.amazonaws.com
ec2-184-72-136-111.compute-1.amazonaws.comcookbook_file("/Progra~1/NSClient++/nsclient.ini") do
ec2-184-72-136-111.compute-1.amazonaws.com provider
Chef::Provider::CookbookFile
ec2-184-72-136-111.compute-1.amazonaws.com action "create"
ec2-184-72-136-111.compute-1.amazonaws.com retries 0
ec2-184-72-136-111.compute-1.amazonaws.com retry_delay 2
ec2-184-72-136-111.compute-1.amazonaws.com path
"/Progra~1/NSClient++/nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com backup 5
ec2-184-72-136-111.compute-1.amazonaws.com atomic_update true
ec2-184-72-136-111.compute-1.amazonaws.com source "nsclient.ini"
ec2-184-72-136-111.compute-1.amazonaws.com cookbook_name "nagios"
ec2-184-72-136-111.compute-1.amazonaws.com recipe_name "client-win"
ec2-184-72-136-111.compute-1.amazonaws.com end
ec2-184-72-136-111.compute-1.amazonaws.com

I disabled that recipe and got a similar error the first time it hit a
template.

I read the release notes about the file changes, but I didn't think I was
doing anything that should cause trouble. Is there anything in that
compiled resource that looks wrong?

I rolled back to 11.4.4 on the instance and everything ran as expected.

Brian

This is weird. I ran a bunch of cookbooks on windows when testing 11.6
and never saw anything like this. Can you post the contents of your
chef-stacktrace.out file?

--
Daniel DeLeo

--
Brian Anderson | Operations Engineer
Phone 781.696.1304

www.affectiva.com
http://www.facebook.com/affectiva https://twitter.com/Affectiva http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

--
Brian Anderson | Operations Engineer
Phone 781.696.1304

http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

On Monday, July 29, 2013 at 8:12 AM, Brian Anderson wrote:

And more. Re-running the same recipe now gives me an error on a file that was created by Chef on the last run.

  • template[/etc/sensu/conf.d/base-checks.json] action create[2013-07-29T11:04:
    30-04:00] INFO: Processing template[/etc/sensu/conf.d/base-checks.json] action c
    reate (affect_mon::sensu-client line 40)

================================================================================

Error executing action create on resource 'template[/etc/sensu/conf.d/base-che
cks.json]'

As Andrew said before, this is a bug that's triggered when you use paths without drive letters on Windows:

https://tickets.opscode.com/browse/CHEF-4419

For now, the best thing to do is add the drive letter to the paths, or else you can specify --bootstrap-version 11.4.4 when installing.

--
Daniel DeLeo

Hm... I must have missed something. I don't know what you are referring to
when you say "As Andrew said". But, that bug does make perfect sense.

For now I'm installing 11.4.4 and that is keeping things happy. I'll have
to think about whether or not we want to go through and do conditional
paths on all of our code (Our infrastructure is about an 80/20 mix of
Linux/Windows, so having /etc/ is correct for most use cases).

Thanks!
brian

On Mon, Jul 29, 2013 at 11:34 AM, Daniel DeLeo dan@kallistec.com wrote:

On Monday, July 29, 2013 at 8:12 AM, Brian Anderson wrote:

And more. Re-running the same recipe now gives me an error on a file that
was created by Chef on the last run.

  • template[/etc/sensu/conf.d/base-checks.json] action
    create[2013-07-29T11:04:
    30-04:00] INFO: Processing template[/etc/sensu/conf.d/base-checks.json]
    action c
    reate (affect_mon::sensu-client line 40)

================================================================================

Error executing action create on resource
'template[/etc/sensu/conf.d/base-che
cks.json]'

================================================================================

As Andrew said before, this is a bug that's triggered when you use paths
without drive letters on Windows:

https://tickets.opscode.com/browse/CHEF-4419

For now, the best thing to do is add the drive letter to the paths, or
else you can specify --bootstrap-version 11.4.4 when installing.

--
Daniel DeLeo

--
Brian Anderson | Operations Engineer
Phone 781.696.1304

http://www.facebook.com/affectiva https://twitter.com/Affectiva
http://www.youtube.com/user/affectiva
http://www.affectiva.com/blog/ http://www.linkedin.com/company/affectiva_2
https://plus.google.com/b/115885368219797754125/115885368219797754125/posts

On Monday, July 29, 2013 at 12:52 PM, Brian Anderson wrote:

Hm... I must have missed something. I don't know what you are referring to when you say "As Andrew said". But, that bug does make perfect sense.

This reply:

http://lists.opscode.com/sympa/arc/chef/2013-07/msg00418.html

For now I'm installing 11.4.4 and that is keeping things happy. I'll have to think about whether or not we want to go through and do conditional paths on all of our code (Our infrastructure is about an 80/20 mix of Linux/Windows, so having /etc/ is correct for most use cases).

Thanks!
brian

A probably-minor thing, but Windows uses the drive of the CWD for ambiguous paths like that, so /etc can mean c:\etc or n:\etc (for example) depending on your CWD. We plan to standardize this to system drive in the future:

http://tickets.opscode.com/browse/CHEF-4427

--
Daniel DeLeo