Jira (BOLT-1322) plan calling a plan does an apply hangs unless original plan call is run-as root

9 views
Skip to first unread message

Randell Pelak (JIRA)

unread,
May 20, 2019, 12:52:02 PM5/20/19
to puppe...@googlegroups.com
Randell Pelak created an issue
 
Puppet Task Runner / Bug BOLT-1322
plan calling a plan does an apply hangs unless original plan call is run-as root
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/05/20 9:51 AM
Priority: Normal Normal
Reporter: Randell Pelak

I created two plans to reproduce this from a real use case.
test_run_as_hang_top.pp
plan p9_instance_setup::test_run_as_hang_top (
TargetSpec $nodes,
)

{ run_plan(p9_instance_setup::test_run_as_hang_sub,'nodes' => $nodes, '_run_as' => 'root') }

test_run_as_hang_sub.pp
plan p9_instance_setup::test_run_as_hang_sub (
TargetSpec $nodes,
) {
$nodes.apply_prep
apply($nodes)

{ notice("hi") }

}

Then called it like this
bolt plan run p9_instance_setup::test_run_as_hang_top --nodes 10.234.0.19 --user centos --private-key ~/.ssh/id_rsa-acceptance --tty --no-host-key-check

Here is the output:
Starting: plan p9_instance_setup::test_run_as_hang_top
Starting: plan p9_instance_setup::test_run_as_hang_sub
Starting: install puppet and gather facts on 10.234.0.19
Finished: install puppet and gather facts with 0 failures in 9.0 sec
Starting: apply catalog on 10.234.0.19

I have to control C because it is permanently hung.
If I add --run-as root to the bolt call like this:

bolt plan run p9_instance_setup::test_run_as_hang_top --nodes 10.234.0.19 --user centos --private-key ~/.ssh/id_rsa-acceptance --tty --no-host-key-check --run-as root

It works just fine, and reasonably fast.
Starting: plan p9_instance_setup::test_run_as_hang_top
Starting: plan p9_instance_setup::test_run_as_hang_sub
Starting: install puppet and gather facts on 10.234.0.19
Finished: install puppet and gather facts with 0 failures in 8.88 sec
Starting: apply catalog on 10.234.0.19
Finished: apply catalog with 0 failures in 11.21 sec
Finished: plan p9_instance_setup::test_run_as_hang_sub in 20.1 sec
Finished: plan p9_instance_setup::test_run_as_hang_top in 20.11 sec
Plan completed successfully with no result

The _run_as root in the run_plan call doesn't have to be there to reproduce the problem. But since that plan is going to be doing an apply it seems like it should need it.

Also the reason I can't just do run-as root on the command line for my real use case is due to this bug:
BOLT-1321 which causes my local run_command to fail if I have run-as root.

Real use case:
We have been using a bolt plan to setup a p9 instance for use in running performance tests. It sets up the software, creates a user that matches the current user and copies up a lot of account configuration files so that the user can run just like they do from their mac. To do that it has to run a command running whoami to find out the user name to create on the box. That command fails if run-as root is given starting in 1.20 (BOLT-1321). The effort is split up into multiple plans because initially we want to setup software and the user. Later we might want to add an additional user, or update user config files, but not change the software. Or we might want to update the software but not touch the user. So basically there is a top level plan that calls two sub plans that do the real work.

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, 1:11:03 PM5/20/19
to puppe...@googlegroups.com
Randell Pelak updated an issue
Change By: Randell Pelak
This is using bolt 1.20 on my mac

With 1.19 it gets a little further before hanging
➜  p9_instance_setup git:(master) ✗ bolt plan run p9_instance_setup::test_run_as_hang_top --nodes 10.234.0.19 --user centos --private-key ~/.ssh/id_rsa-acceptance --no-host-key-check --tty

Starting: plan p9_instance_setup::test_run_as_hang_top
Starting: plan p9_instance_setup::test_run_as_hang_sub
Starting: install puppet and gather facts on 10.234.0.19
Finished: install puppet and gather facts with 0 failures in 9.18 sec

Starting: apply catalog on 10.234.0.19
10.234.0.19: Scope(Class[main]): hi

Randell Pelak (JIRA)

unread,
May 20, 2019, 1:15:03 PM5/20/19
to puppe...@googlegroups.com
Randell Pelak commented on Bug BOLT-1322
 
Re: plan calling a plan does an apply hangs unless original plan call is run-as root

For the hang in both 1.20 and 1.19 the debug output ends like this: ( This is from 1.19, I didn't check the stdout to make sure there were identical.)

Executing: /tmp/33da4e0e-fd7c-4e23-9179-d88da829eae2/apply_catalog.rb
stdout: {"catalog":{"tags":["settings"],"name":"10.234.0.19","version":1558372267,"code_id":null,"catalog_uuid":"52431f5c-8a68-492e-a713-2b8222642c17","catalog_format":1,"environment":"bolt_catalog","resources":[{"type":"Stage","title":"main","tags":["stage","class"],"exported":false,"parameters":{"name":"main"}},

{"type":"Class","title":"Settings","tags":["class","settings"],"exported":false}

,{"type":"Class","title":"main","tags":["class"],"exported":false,"parameters":{"name":"main"}}],"edges":[

{"source":"Stage[main]","target":"Class[Settings]"}

,

{"source":"Stage[main]","target":"Class[main]"}

],"classes":["settings"]},"plugins":"H4sIAKvf4lwAA+y9e3/bxrUo2r/9KSZUukHGFCX5lXuYKI7rJI3PzuvaTvo7\nV1ZpiIQk1CTBAqBk1db57He95okBSVm2m3SLbSwSmPesWbPea1zMx2m9M82P\ndhbLxSKrd+qLRbYzpsej43yaDcqjP13vswufB/fuRZ/v7t55sPvgzp/27t57\n8AC+3d198KfdvbsPPr/zJ7V7zX43+iyrOi1hKB+jr9/hp8z+uczLTCXu7uO2\n7xTn86xMbrUXOCmL5WJVgVkxyZrvl3U+3RmfZuNX1XJWJbdu/ULPh8PnUHEw\nz86xge7QgcCemhS3lPp6UozVvvryy+1vfn4Mv+EJtDBLywv6odRfMxhxWmeV\nShXWU+d5faqgoTqb1+q4LGbwT3oyg1+Vqk7TMp+fQNFxMZsVc7Wc5/9cZqpO\nTwa3uPXsdTpbTDNp/bEMSFqAcbzFwmp/XyVcdwQ/E/X2q69uSRVnDuqNSnbq\n2YJWJhlKAUUtOJ/9r7zG+mpL/byo82KeTgfqm+w4XU5rVRcw2El2bBpZpDBP\nvxHbV195jTw5Vif5WTZXea2Ks6ws8wksWH2aqTKrimU5ztQ8nWWmbQIDv+2y\nKGpslj4bDZBA5bqNIDgFs0S0kqirNFKUk3A68+UsK/NxEjTSdxsxhUxD2bxa\nltkI4HWazzNs6DidVnaAkYYqbIlKSSuX8Bdh+ZY0lx4BoBCsKwW7MnZhXaln\ni2ycH+ewW+enGWxYSbsG5ep8nmJXDPTVabGcTlT2Oq/qgXqW1TWCOc4hPaoA\ncBNVZ9NppfjY4YtJNs3qLN5afoyAQo1VfZXOJzKYeX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O87iaj0Qiotjs9\nvWxnb1X3TO3/X/Xn8s3fX0xuf3rZUw/V2aAuRrkaqrNQOs0y95Gomm7x2ICy\nmquvBcgy8xYXr/mUd7VZeF8lzLrJA0f4vK8ODnlDrAyYyHhEOKVe32a9L79U\nB52tN+UBC4IOL2H29BO59cPLTt+0p0fRLXuHBs/QF5QFwQHdx8nwznBbJI23\n0hLv0xjJAFuh0aaAoN6G5ZW7Y+nB7mFPfbn/lfvwCB+G1TQU2AdW4bJmLCM4\ncTScyFjSEc2wD19IqrGvcEgWgAh+mtUOgnqH64er13icwi3Bi8tsFNcFnDu3\nvAN+omDDO6QBenz8Vo2PD/YO4XD8o5Ca3BLyNQGsEN/it4HLAo2Yof6fRz/+\nMKjS42w0LdJJl9oO2V3b4GlanUJ7XvuArCbLcdZ9c9mj1mfZrOgrQPB4
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:
stdout:

Randell Pelak (JIRA)

unread,
May 20, 2019, 1:15:04 PM5/20/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages