| As a user of PE that wants to run Bolt tasks on multiple nodes in CI, I expect if I provide the --nodes a list of nodes and the root user and password, that the task will run on all the nodes with no error. What is happening is I'm getting a connection refused. The command I'm running in Beaker is found in this fork of pe_acceptance_tests here.
on(master, "/opt/puppetlabs/puppet/bin/bolt task run touch -m #{repo_dir}/tasks --nodes #{hosts_string} --no-host-key-check --debug --user root --password **redacted**")
|
Where the repo_dir is just a checked out enterprise_tasks, and the hosts_string is a list of the hosts that the task will run on. The password is removed here, but it is the default password for our vmpooler hosts. Here is the output when I run this in CI of that command:
* Run the touch task with Bolt on all agent nodes |
|
p4nwq9sxpvfhigr.delivery.puppetlabs.net (centos6-64-1) 19:00:07$ /opt/puppetlabs/puppet/bin/bolt task run touch -m /tmp/enterprise_task_repo20180613-46158-1vbbywc/tasks --nodes p4nwq9sxpvfhigr.delivery.puppetlabs.net,uhyitpa95tl8cen.delivery.puppetlabs.net,qcxf72193e8fhvg.delivery.puppetlabs.net --no-host-key-check --debug --user root --password Qu@lity! |
Did not find config for p4nwq9sxpvfhigr.delivery.puppetlabs.net in inventory |
Did not find config for uhyitpa95tl8cen.delivery.puppetlabs.net in inventory |
Did not find config for qcxf72193e8fhvg.delivery.puppetlabs.net in inventory |
Started with 100 max thread(s) |
ModuleLoader: module 'boltlib' has unknown dependencies - it will have all other modules visible |
Did not find config for p4nwq9sxpvfhigr.delivery.puppetlabs.net in inventory |
Did not find config for uhyitpa95tl8cen.delivery.puppetlabs.net in inventory |
Did not find config for qcxf72193e8fhvg.delivery.puppetlabs.net in inventory |
Starting: task touch on p4nwq9sxpvfhigr.delivery.puppetlabs.net, uhyitpa95tl8cen.delivery.puppetlabs.net, qcxf72193e8fhvg.delivery.puppetlabs.net |
Authentication method 'gssapi-with-mic' is not available |
Running task touch with '{}' via both on ["p4nwq9sxpvfhigr.delivery.puppetlabs.net"] |
Running task touch with '{}' via both on ["uhyitpa95tl8cen.delivery.puppetlabs.net"] |
Running task run 'Task({'name' => 'touch', 'implementations' => [{'name' => 'init.rb', 'path' => '/tmp/enterprise_task_repo20180613-46158-1vbbywc/tasks/touch/tasks/init.rb', 'requirements' => []}], 'description' => 'Touch file, used for testing', 'parameters' => {}})' on p4nwq9sxpvfhigr.delivery.puppetlabs.net |
Running task run 'Task({'name' => 'touch', 'implementations' => [{'name' => 'init.rb', 'path' => '/tmp/enterprise_task_repo20180613-46158-1vbbywc/tasks/touch/tasks/init.rb', 'requirements' => []}], 'description' => 'Touch file, used for testing', 'parameters' => {}})' on uhyitpa95tl8cen.delivery.puppetlabs.net |
Running task touch with '{}' via both on ["qcxf72193e8fhvg.delivery.puppetlabs.net"] |
Running task run 'Task({'name' => 'touch', 'implementations' => [{'name' => 'init.rb', 'path' => '/tmp/enterprise_task_repo20180613-46158-1vbbywc/tasks/touch/tasks/init.rb', 'requirements' => []}], 'description' => 'Touch file, used for testing', 'parameters' => {}})' on qcxf72193e8fhvg.delivery.puppetlabs.net |
{"node":"p4nwq9sxpvfhigr.delivery.puppetlabs.net","status":"failure","result":{"_error":{"kind":"puppetlabs.tasks/connect-error","msg":"Failed to connect to p4nwq9sxpvfhigr.delivery.puppetlabs.net: Connection reset by peer","details":{},"issue_code":"CONNECT_ERROR"}}} |
{"node":"uhyitpa95tl8cen.delivery.puppetlabs.net","status":"failure","result":{"_error":{"kind":"puppetlabs.tasks/connect-error","msg":"Failed to connect to uhyitpa95tl8cen.delivery.puppetlabs.net: Connection reset by peer","details":{},"issue_code":"CONNECT_ERROR"}}} |
{"node":"qcxf72193e8fhvg.delivery.puppetlabs.net","status":"failure","result":{"_error":{"kind":"puppetlabs.tasks/connect-error","msg":"Failed to connect to qcxf72193e8fhvg.delivery.puppetlabs.net: Connection reset by peer","details":{},"issue_code":"CONNECT_ERROR"}}} |
Finished: task touch with 3 failures in 0.33 sec |
Started on p4nwq9sxpvfhigr.delivery.puppetlabs.net... |
Started on uhyitpa95tl8cen.delivery.puppetlabs.net... |
Started on qcxf72193e8fhvg.delivery.puppetlabs.net... |
Failed on p4nwq9sxpvfhigr.delivery.puppetlabs.net: |
Failed to connect to p4nwq9sxpvfhigr.delivery.puppetlabs.net: Connection reset by peer |
Failed on uhyitpa95tl8cen.delivery.puppetlabs.net: |
Failed to connect to uhyitpa95tl8cen.delivery.puppetlabs.net: Connection reset by peer |
Failed on qcxf72193e8fhvg.delivery.puppetlabs.net: |
Failed to connect to qcxf72193e8fhvg.delivery.puppetlabs.net: Connection reset by peer |
Failed on 3 nodes: p4nwq9sxpvfhigr.delivery.puppetlabs.net,uhyitpa95tl8cen.delivery.puppetlabs.net,qcxf72193e8fhvg.delivery.puppetlabs.net |
Ran on 3 nodes in 0.42 seconds |
|
p4nwq9sxpvfhigr.delivery.puppetlabs.net (centos6-64-1) executed in 1.65 seconds |
Exited: 2
|
If I were to change the hosts_string to just be localhost, the bolt task runs fine, here is an example of that from CI:
* Run the touch task with Bolt on all agent nodes |
|
l2x5gg1orjym6n2.delivery.puppetlabs.net (centos6-64-1) 18:40:22$ /opt/puppetlabs/puppet/bin/bolt task run touch -m /tmp/enterprise_task_repo20180613-45700-fw4dpb/tasks --nodes localhost --no-host-key-check --debug --user root --password Qu@lity! |
Started with 100 max thread(s) |
ModuleLoader: module 'boltlib' has unknown dependencies - it will have all other modules visible |
Starting: task touch on localhost |
Running task touch with '{}' via both on ["localhost"] |
Running task run 'Task({'name' => 'touch', 'implementations' => [{'name' => 'init.rb', 'path' => '/tmp/enterprise_task_repo20180613-45700-fw4dpb/tasks/touch/tasks/init.rb', 'requirements' => []}], 'description' => 'Touch file, used for testing', 'parameters' => {}})' on localhost |
Running '/tmp/d20180613-23485-qruah7/init.rb' with {} |
Started on localhost... |
{"node":"localhost","status":"success","result":{"_output":""}} |
Finished: task touch with 0 failures in 0.08 sec |
Finished on localhost: |
|
{ |
} |
Successful on 1 node: localhost |
Ran on 1 node in 0.17 seconds
|
All of the above examples have been when the Beaker test-runner is being handled in Jenkins. If I use my personal laptop as the Beaker test-runner, and use a list of nodes for the --nodes, Bolt tasks work perfectly. This only fails when in CI. Looking at module job that uses Bolt, here, it is only using Bolt on the localhost. Is there an example elsewhere of Bolt being used in our CI that is not using --nodes localhost? |