Jira (PUP-10140) puppet service and puppet-agent failing on windows

34 views
Skip to first unread message

Barr Iserloth (JIRA)

unread,
Nov 13, 2019, 4:58:05 PM11/13/19
to puppe...@googlegroups.com
Barr Iserloth moved an issue
 
Puppet / Bug PUP-10140
puppet service and puppet-agent failing on windows
Change By: Barr Iserloth
Key: PE PUP - 27692 10140
Project: Puppet Enterprise [Internal]
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 5:39:04 PM11/13/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Coremunity Night's Watch

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 5:59:04 PM11/13/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 5.5.18

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 5:59:04 PM11/13/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10140
 
Re: puppet service and puppet-agent failing on windows

puppet-agent 5.5.x fails to start, because if ENV['RUBYLIB'] is not defined, then daemon.rb tries to append nil to a string. This raises an exception "TypeError (no implicit conversion of nil into String)".

However, the call to load_env happens before the logging level has been set. So the call to log_exception tries to compare the message log level with our current log level, which is nil, which also raises an ArgumentError (comparison of Integer with nil, and the service bombs out without logging anything.

The issue wasn't noticed in 5.5.x CI because the test is skipped on Windows https://github.com/puppetlabs/puppet/blob/5.5.x/acceptance/tests/resource/service/puppet_mcollective_service_management.rb#L3.

The issue doesn't occur in 6.4.x or master, because the daemon.rb script interpolates the nil value, which becomes an empty string.

Note the acceptance test was renamed in puppet#b921168b76af859a1d309fcb5a0e60b61df32435 and does run on Windows in 6.4.x and master.

I'd recommend the following changes:

1. Move the call to load_env until after logging is setup in all branches
2. In the WindowsDaemon#initialize method, initialize @loglevel = 0, so we don't drop any messages between then and when we parse argsv to determine what our current log level should be.
3. Only append RUBYLIB if it's defined in the environment
4. Update puppet_mcollective_service_management.rb in 5.5.x to only skip mcollective on windows. Something like:

['puppet', 'mcollective'].each do |service|
  next if service == 'mcollective' && agent.platform =~ /windows/

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 6:00:10 PM11/13/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Priority: Critical Blocker

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 6:00:12 PM11/13/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Priority: Normal Critical

Josh Cooper (JIRA)

unread,
Nov 13, 2019, 6:03:07 PM11/13/19
to puppe...@googlegroups.com

Gheorghe Popescu (JIRA)

unread,
Nov 14, 2019, 2:39:04 AM11/14/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Nov 14, 2019, 6:03:03 AM11/14/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Nov 14, 2019, 6:03:05 AM11/14/19
to puppe...@googlegroups.com

Barr Iserloth (JIRA)

unread,
Nov 14, 2019, 1:55:06 PM11/14/19
to puppe...@googlegroups.com
Barr Iserloth commented on Bug PUP-10140
 
Re: puppet service and puppet-agent failing on windows

Gheorghe Popescu This issue is blocking promotions into PE for 2018.1.x (it causes a PEZ failure), so I'm going to revert the most recent puppet-agent promotion to PE. Would it be possible to turn off auto-promotions for the agent until this issue is sorted out? Apologies if you're not the right person to ping, and thanks so much for your help!

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 2:02:05 PM11/14/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10140

Barr Iserloth I'm reviewing the PR for 5.5.x, but the pipeline doesn't run until midnight, so that's the earliest we can get you a new puppet-agent build. It's fine to revert, though perhaps leave promotions on so tonight's fix get in?

Barr Iserloth (JIRA)

unread,
Nov 14, 2019, 2:14:03 PM11/14/19
to puppe...@googlegroups.com

Works for me! If it's part of the next promotion then I don't think it'll cause problems. I reverted it because the failure blocks any other changes landing in PE through pez at the moment, but if the fix is in the next puppet-agent promotion then totally feel free to not turn off promotions. Apologies for any inconvenience this is causing you all

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 2:28:03 PM11/14/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10140

Merged to 5.5.x in https://github.com/puppetlabs/puppet/commit/6ac9e8e1f3656f547e0b4a9e4cab6e49453073f1.

Leaving this in ready for merge as there is a separate PR for 6.4.x and up.

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 5:47:04 PM11/14/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 5:48:04 PM11/14/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 5.5.18

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 5:48:04 PM11/14/19
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10140
 
Re: puppet service and puppet-agent failing on windows

I removed the fix version because the issue was introduced and fixed before the 5.5.18 release went out. Also no release notes are needed.

Josh Cooper (JIRA)

unread,
Nov 14, 2019, 5:49:03 PM11/14/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Not Needed

Gheorghe Popescu (JIRA)

unread,
Nov 21, 2019, 3:18:04 AM11/21/19
to puppe...@googlegroups.com

Barr Iserloth (JIRA)

unread,
Nov 21, 2019, 11:28:04 AM11/21/19
to puppe...@googlegroups.com

Dorin Pleava (JIRA)

unread,
Jan 8, 2020, 7:09:03 AM1/8/20
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Change By: Dorin Pleava
Fix Version/s: PUP 6.12.0
Fix Version/s: PUP 6.4.5
Fix Version/s: PUP 5.5.18
Reply all
Reply to author
Forward
0 new messages