| 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/
|
|