Jira (PUP-10477) Remove non-local return from agent.rb

0 views
Skip to first unread message

Mihai Buzgau (Jira)

unread,
Apr 29, 2020, 4:23:03 AM4/29/20
to puppe...@googlegroups.com
Mihai Buzgau created an issue
 
Puppet / Task PUP-10477
Remove non-local return from agent.rb
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/04/29 1:22 AM
Priority: Normal Normal
Reporter: Mihai Buzgau

[TODO] Add description

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Gheorghe Popescu (Jira)

unread,
Apr 29, 2020, 4:24:03 AM4/29/20
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Ideally we should never do a non-local return. It was added by mistake in https://github.com/puppetlabs/puppet/commit/ce74cd97085c3d3bd7b4888c80bcbf14ebfdfa2, was made worse in https://github.com/puppetlabs/puppet/commit/10d89dc463ebe8d31cee3a3603e924ae614f754a and a "different but equally wrong" approach was taken in https://github.com/puppetlabs/puppet/commit/42f1f27d914576be95b8745b6015897993f9aea3.

It would be great to clean that up so that nil is always returned due to an error, so that
[ TODO Puppet::Application::Agent consistently exits with 1.|https://github.com/puppetlabs/puppet/blob/42f1f27d914576be95b8745b6015897993f9aea3/lib/puppet/application/agent.rb#L360-L374 ] Add description

Mihai Buzgau (Jira)

unread,
Apr 29, 2020, 4:24:04 AM4/29/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Story Points: 3

Gheorghe Popescu (Jira)

unread,
Apr 29, 2020, 4:27:03 AM4/29/20
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Ideally we should never do a non-local return. It was added by mistake in

Code to be assesed:
-
https://github.com/puppetlabs/puppet/commit/ce74cd97085c3d3bd7b4888c80bcbf14ebfdfa2 , was made worse in
-
https://github.com/puppetlabs/puppet/commit/10d89dc463ebe8d31cee3a3603e924ae614f754a and a "different but equally wrong" approach was taken in
-
https://github.com/puppetlabs/puppet/commit/42f1f27d914576be95b8745b6015897993f9aea3.

It would be great to clean that up so that nil is always returned due to an error, so that [Puppet::Application::Agent consistently exits with 1.|https://github.com/puppetlabs/puppet/blob/42f1f27d914576be95b8745b6015897993f9aea3/lib/puppet/application/agent.rb#L360-L374]

Gheorghe Popescu (Jira)

unread,
Apr 29, 2020, 4:27:03 AM4/29/20
to puppe...@googlegroups.com

Gheorghe Popescu (Jira)

unread,
Apr 29, 2020, 6:53:03 AM4/29/20
to puppe...@googlegroups.com
Gheorghe Popescu assigned an issue to Gheorghe Popescu
Change By: Gheorghe Popescu
Assignee: Gheorghe Popescu

Gheorghe Popescu (Jira)

unread,
May 27, 2020, 5:57:03 AM5/27/20
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Fix Version/s: PUP 6.16.0

Ciprian Badescu (Jira)

unread,
Jul 2, 2020, 6:02:03 AM7/2/20
to puppe...@googlegroups.com
Ciprian Badescu updated an issue
Change By: Ciprian Badescu
Fix Version/s: PUP 5.5.21

Adrian Parreiras Horta (Jira)

unread,
Jul 13, 2020, 4:02:03 PM7/13/20
to puppe...@googlegroups.com
Adrian Parreiras Horta commented on Task PUP-10477
 
Re: Remove non-local return from agent.rb

For posterity, this fixes these kind of forking errors when managing the state of the agent service using a `service` resource:

 

Jun 25 15:41:37 pe-201970-compile puppet-agent[9133]: Run of Puppet configuration client already in progress; skipping  (/opt/puppetlabs/puppet/cache/state/agent_catalog_run.lock exists)
Jun 25 15:41:37 pe-201970-compile puppet: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:94:in `fork': unexpected return

 

Reply all
Reply to author
Forward
0 new messages