Jira (BOLT-1321) running commands on localhost from a plan run as root fails starting with 1.20

3 views
Skip to first unread message

Randell Pelak (JIRA)

unread,
May 20, 2019, 10:40:02 AM5/20/19
to puppe...@googlegroups.com
Randell Pelak created an issue
 
Puppet Task Runner / Improvement BOLT-1321
running commands on localhost from a plan run as root fails starting with 1.20
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2019/05/20 7:39 AM
Priority: Normal Normal
Reporter: Randell Pelak

I have a plan that sets up p9 instances with software and users setting.
It runs whoami on the local host so it knows what user to create on the instance.
This worked fine with John on 1.19 on linux. But with 1.20 it is failing for me. I personally verified it worked on 1.14 and upgraded to 1.20 on my mac and saw it fail with this error

{“node”:“localhost”,“target”:“localhost”,“action”:null,“object”:null,“status”:“failure”,“result”:{“_error”:{“kind”:“puppetlabs.tasks/escalate-error”,“msg”:“Sudo password for user randell was not provided for localhost”,“details”:{},“issue_code”:“NO_PASSWORD”}}}

This is the line in the plan that fails.
$result_whoami = run_command('whoami',"localhost",'_catch_errors' => true)

Just put that line in a plan
Here is the plan invocation
bolt plan run p9_instance_setup::test_whoami --nodes 10.234.0.19 --user centos --private-key ~/.ssh/id_rsa-acceptance --tty --no-host-key-check --debug --run-as root

The workaround is to remove the --run-as root. While that works to get the command to run. The rest of my flow doesn't... which I will file a different ticket about.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Randell Pelak (JIRA)

unread,
May 20, 2019, 12:52:03 PM5/20/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages