Skip to content

Instantly share code, notes, and snippets.

@seif
Last active December 10, 2015 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seif/4400257 to your computer and use it in GitHub Desktop.
Save seif/4400257 to your computer and use it in GitHub Desktop.
template resource not notifying
Generated at 2013-01-02 23:06:59 +0000
RuntimeError: template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb) had an error: RuntimeError: Must specify username, group or SID: 0
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:98:in `get_sid'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:306:in `target_owner'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:275:in `target_dacl'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:114:in `should_update_dacl?'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/file_access_control/windows.rb:45:in `requires_changes?'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/provider/file.rb:179:in `define_resource_requirements'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/provider/template.rb:39:in `define_resource_requirements'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/provider.rb:104:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource.rb:593:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/runner.rb:49:in `run_action'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/runner.rb:81:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/runner.rb:81:in `block in converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:94:in `block in execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/resource_collection.rb:92:in `execute_each_resource'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/runner.rb:80:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/client.rb:378:in `converge'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/client.rb:420:in `do_run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/client.rb:176:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/application.rb:140:in `run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/application/client.rb:274:in `block in run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/application/client.rb:267:in `loop'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/application/client.rb:267:in `run_application'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/lib/chef/application.rb:72:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.16.4/bin/chef-client:26:in `<top (required)>'
C:/opscode/chef/bin/chef-client:19:in `load'
C:/opscode/chef/bin/chef-client:19:in `<main>'
tc = Teamcity::Utility.new(:server=>"#{node.teamcity.server}", :port => 80, :username => "#{node.teamcity.username}", :password => "#{node.teamcity.password}")
teamcity_build_type = 'bt97'
build_version = tc.get_latest_build(teamcity_build_type)
endpoint = "AuthAtCheckoutHost"
dk_settings_template = "CHEF.js.erb"
if not ::File.exists?("C:\\Temp\\#{teamcity_build_type}\\#{build_version}.zip")
teamcity_build "download-artefact" do
build_type teamcity_build_type
version build_version
destination "C:\\Temp\\#{teamcity_build_type}\\#{build_version}.zip"
overwrite true
action :download
end
windows_zipfile "unzip_artefacts" do
path "C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\"
source "C:\\Temp\\#{teamcity_build_type}\\#{build_version}.zip"
action :unzip
notifies :create, "template[C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\Deployment\\Settings\\CHEF.js]", :immediately
end
template "C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\Deployment\\Settings\\CHEF.js" do
source dk_settings_template
action :create
end
windows_batch "run_dropkick" do
code <<-EOH
cd C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\Deployment
.\\dropkick\\dk.exe execute /environment:CHEF /deployment:Wiggle.Billing.Deployment.dll --silent /roles:#{endpoint}
EOH
action :run
end
end
localhost [2013-01-02T21:05:03+00:00] INFO: *** Chef 10.16.4 ***
localhost [2013-01-02T21:05:22+00:00] INFO: Run List is [recipe[chef-client], role[base], role[ravendb_server], role[Wiggle_Billing]]
localhost [2013-01-02T21:05:22+00:00] INFO: Run List expands to [chef-client, wiggle::prepare_windows, ms_dotnet35, ms_dotnet4, chocolatey, wiggle::ravendb, ms_messagequeue, Wiggle_Billing]
localhost [2013-01-02T21:05:23+00:00] INFO: Starting Chef Run for WIN-5SMRIK4TSD7.wiggledomain.wiggle.co.uk
localhost [2013-01-02T21:05:23+00:00] INFO: Running start handlers
localhost [2013-01-02T21:05:23+00:00] INFO: Start handlers complete.
localhost [2013-01-02T21:05:25+00:00] INFO: Loading cookbooks [Wiggle_Billing, chef-client, chef_handler, chocolatey, ms_dotnet35, ms_dotnet4, ms_messagequeue, powershell, teamcity, wiggle, windows]
localhost [2013-01-02T21:05:26+00:00] INFO: Storing updated cookbooks/Wiggle_Billing/recipes/default.rb in the cache.
localhost [2013-01-02T21:05:26+00:00] INFO: Powershell light-weight provider already initialized -- overriding!
localhost [2013-01-02T21:05:26+00:00] INFO: Powershell light-weight resource already initialized -- overriding!
localhost [2013-01-02T21:05:27+00:00] INFO: PowerShell 2.0 is already installed/enabled.
localhost [2013-01-02T21:05:27+00:00] INFO: Processing directory[C:/chef/run] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] INFO: Processing directory[C:/chef/cache] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] INFO: Processing directory[C:/chef/backup] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] INFO: Processing directory[C:/chef/log] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the owner, but owner is not specified
localhost [2013-01-02T21:05:27+00:00] WARN: Mode 755 includes bits for the group, but group is not specified
localhost [2013-01-02T21:05:27+00:00] INFO: Processing directory[C:/chef/bin] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] INFO: Processing template[C:/chef/bin/chef-client.xml] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] INFO: Processing remote_file[C:/chef/bin/chef-client.exe] action create (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] INFO: Processing execute[restart chef-client using winsw wrapper] action nothing (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:27+00:00] INFO: Processing execute[Install chef-client service using winsw] action run (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing service[chef-client] action start (chef-client::service line /chef/cache/cookbooks/chef-client/recipes/service.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_registry[HKLM\SOFTWARE\Microsoft\ServerManager\Oobe] action modify (wiggle::prepare_windows line /chef/cache/cookbooks/wiggle/recipes/prepare_windows.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_registry[HKLM\SOFTWARE\Microsoft\ServerManager] action modify (wiggle::prepare_windows line /chef/cache/cookbooks/wiggle/recipes/prepare_windows.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_registry[HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Reliability] action modify (wiggle::prepare_windows line /chef/cache/cookbooks/wiggle/recipes/prepare_windows.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_registry[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] action modify (wiggle::prepare_windows line /chef/cache/cookbooks/wiggle/recipes/prepare_windows.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_reboot[60] action nothing (ms_dotnet4::default line /chef/cache/cookbooks/ms_dotnet4/recipes/default.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_reboot[60] action cancel (ms_dotnet4::default line /chef/cache/cookbooks/ms_dotnet4/recipes/default.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing powershell[install chocolatey] action run (chocolatey::default line /chef/cache/cookbooks/chocolatey/recipes/default.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing file[cygwin log] action delete (chocolatey::default line /chef/cache/cookbooks/chocolatey/recipes/default.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing chocolatey[RavenDB.Server] action install (wiggle::ravendb line /chef/cache/cookbooks/wiggle/recipes/ravendb.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing execute[InstallRavenService] action run (wiggle::ravendb line /chef/cache/cookbooks/wiggle/recipes/ravendb.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing service[RavenDb] action enable (wiggle::ravendb line /chef/cache/cookbooks/wiggle/recipes/ravendb.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing service[RavenDb] action start (wiggle::ravendb line /chef/cache/cookbooks/wiggle/recipes/ravendb.rb)
localhost [2013-01-02T21:05:28+00:00] INFO: Processing windows_feature[MSMQ-Server] action install (ms_messagequeue::default line /chef/cache/cookbooks/ms_messagequeue/recipes/default.rb)
localhost [2013-01-02T21:05:30+00:00] INFO: Processing teamcity_build[download-artefact] action download (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb)
localhost [2013-01-02T21:05:30+00:00] INFO: Downloading file to C:\Temp\bt97\1.8.9-alpha-01133.zip. This may take a while...
localhost [2013-01-02T21:06:16+00:00] INFO: Processing windows_zipfile[unzip_artefacts] action unzip (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb)
localhost [2013-01-02T21:06:23+00:00] INFO: windows_zipfile[unzip_artefacts] sending create action to template[C:\Temp\bt97\1.8.9-alpha-01133\Deployment\Settings\CHEF.js] (immediate)
localhost [2013-01-02T21:06:23+00:00] INFO: Processing template[C:\Temp\bt97\1.8.9-alpha-01133\Deployment\Settings\CHEF.js] action create (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb)
localhost [2013-01-02T21:06:24+00:00] INFO: template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] backed up to c:/chef/backup/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js.chef-20130102210624
localhost [2013-01-02T21:06:24+00:00] INFO: template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] updated content
localhost [2013-01-02T21:06:24+00:00] INFO: Processing template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] action create (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb)
localhost
localhost ================================================================================
localhost Error executing action `create` on resource 'template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js]'
localhost ================================================================================
localhost
localhost RuntimeError
localhost ------------
localhost Must specify username, group or SID: 0
localhost
localhost Resource Declaration:
localhost ---------------------
localhost # In c:/chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb
localhost
localhost 32: template "C:\\Temp\\#{teamcity_build_type}\\#{build_version}\\Deployment\\Settings\\CHEF.js" do
localhost 33: source dk_settings_template
localhost 34: action :create
localhost 35: end
localhost 36:
localhost
localhost Compiled Resource:
localhost ------------------
localhost # Declared in c:/chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb:32:in `from_file'
localhost
localhost template("C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js") do
localhost provider Chef::Provider::Template
localhost action [:create]
localhost updated true
localhost retries 0
localhost retry_delay 2
localhost path "C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js"
localhost backup 5
localhost diff removed as contains sensitive data, but the files are different
localhost source "CHEF.js.erb"
localhost cookbook_name "Wiggle_Billing"
localhost recipe_name "default"
localhost checksum "fe6bed989662a2d206442d5fa143ce9976ccafd802947c68e5f1f2ee6d19d6eb"
localhost owner 0
localhost group 0
localhost mode 420
localhost end
localhost
localhost [2013-01-02T21:06:24+00:00] ERROR: Running exception handlers
localhost [2013-01-02T21:06:24+00:00] FATAL: Saving node information to c:/chef/cache/failed-run-data.json
localhost [2013-01-02T21:06:24+00:00] ERROR: Exception handlers complete
localhost [2013-01-02T21:06:24+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
localhost [2013-01-02T21:06:24+00:00] FATAL: RuntimeError: template[C:/Temp/bt97/1.8.9-alpha-01133/Deployment/Settings/CHEF.js] (Wiggle_Billing::default line /chef/cache/cookbooks/Wiggle_Billing/recipes/default.rb) had an error: RuntimeError: Must specify username, group or SID: 0
@spuder
Copy link

spuder commented Aug 24, 2015

@seif Did you ever figure out why this was happening?

 Mode 755 includes bits for the group, but group is not specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment