Just confirming that I have the same problem after fully checking your script, I added a test command to the push-jobs cookbook whitelist directly in the attributes / default.rb file:
default['push_jobs']['whitelist'] = { 'chef-client' => 'chef-client', 'new-command' => 'chef-client' }
and confirmed that the whitelist contains these commands when it was written to C: \ chef \ push-jobs.client.rb on node I try to run the command after loading it using the cookbook push-jobs:
However, when I try to execute this command:
knife job start --timeout 600 'new-command' server.fqdn
I also get an immediate failure:
Started. Job ID: db3a99728dbded7abd35ed40d4ec3d5f Quorum_failed. command: new-command created_at: Thu, 19 Nov 2015 23:31:57 GMT id: db3a99728dbded7abd35ed40d4ec3d5f nodes: nacked: server.fqdn run_timeout: 600 status: quorum_failed updated_at: Thu, 19 Nov 2015 23:31:57 GMT
I even restarted the Windows Pushy Client Service to make sure that it did not reload this configuration when the service was restarted.
The only way I was able to get the Windows server to run the jobs I want to run was to change the execution list before each standard chef-client command was run:
knife node run_list set server.fqdn 'recipe[cookbook::recipe1]' knife job start --timeout 600 'chef-client' node.fqdn knife node run_list set server.fqdn 'recipe[cookbook::recipe2]' knife job start --timeout 600 'chef-client' node.fqdn
The error seems to be in the Windows Pushy Client Service itself, and there seems to have been no movement for your error.
source share