[PUP-9565] Not possible to set Multiple Logging Destination with puppet agent anymore Created: 2019/03/15  Updated: 2019/05/13  Resolved: 2019/04/15

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: PUP 5.5.7, PUP 5.5.8, PUP 5.5.10, PUP 6.0.3
Fix Version/s: PUP 5.5.14, PUP 6.0.9, PUP 6.4.2

Type: Bug Priority: Normal
Reporter: Manuel Assignee: Jacob Helwig
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template: PUP Bug Template
Team: Coremunity
Sprint: Platform Core KANBAN
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: When the ability to specify a logging destination in puppet.conf was added, the ability to specify multiple logging destinations through the command line using the --logdest option was broken. The ability to specify multiple logging destinations on the command line has been fixed.
QA Risk Assessment: Needs Assessment


Puppet Version: > 5.5.7
OS Name/Version: Debian Jessie

Beginning with release 5.5.7, it is not possible anymore to have more then 1 logdestination.

Before it was possible to have multiple Logging Destinations, by appending logdest multiple times

This seems to be the Ticket related to it.
Fixed since: PUP 5.5.7, PUP 6.0.3


puppet agent --no-daemonize --detailed-exitcodes --onetime --logdest console --logdest /var/log/puppetlabs/puppet/puppet.log
Starting with release 5.5.7 the puppet agent ignores the second logdestination, which keeps us from saving changes to a local file.

Steps to reproduce:

Install Agent 5.5.6 and run:

 puppet agent --no-daemonize --detailed-exitcodes --onetime --logdest console --logdest /var/log/puppet.log

Output will be show in console and also send to the file

Install Agent 5.5.7 or any higher version number and run:

 puppet agent --no-daemonize --detailed-exitcodes --onetime --logdest console --logdest /var/log/puppet.log

Output will be show in console but not send to the file

Desired Behavior: Have all mentioned logdestinations enabled agian

Actual Behavior: Only the first mentioned logdestination will be applied

Comment by Nirupama Mantha [ 2019/04/05 ]

Jacob Helwig is this ticket on track to be done by stop ship?

Comment by Jacob Helwig [ 2019/04/05 ]

Nirupama Mantha, no this won't be in 6.0.8. I've bumped it to the 6.0.z release.

Comment by Josh Cooper [ 2019/04/12 ]

Verified it writes to multiple log destinations:

$ rm /tmp/puppet.log
$ bx puppet agent --no-daemonize --detailed-exitcodes --onetime --logdest console --logdest /tmp/puppet.log --verbose
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Caching catalog for localhost
Info: Applying configuration version '1555090905'
Notice: Applied catalog in 0.10 seconds
$ cat /tmp/puppet.log
2019-04-12 10:41:20 -0700 Puppet (notice): Applied catalog in 0.07 seconds
2019-04-12 10:41:42 -0700 Puppet (info): Using configured environment 'production'
2019-04-12 10:41:42 -0700 Puppet (info): Retrieving pluginfacts
2019-04-12 10:41:42 -0700 Puppet (info): Retrieving plugin
2019-04-12 10:41:42 -0700 Puppet (info): Retrieving locales
2019-04-12 10:41:45 -0700 Puppet (info): Caching catalog for localhost
2019-04-12 10:41:45 -0700 Puppet (info): Applying configuration version '1555090905'
2019-04-12 10:41:46 -0700 Puppet (notice): Applied catalog in 0.10 seconds

If a logdest is specified in puppet.conf, puppet will use that by default. If specified in puppet.conf and the command line (possibly multiple times), then the command line takes precedence.

Comment by Josh Cooper [ 2019/04/12 ]

Merged in 5.5.x in https://github.com/puppetlabs/puppet/commit/00dcdf2fdbbc2d15564998db4441e269b899c3df

Generated at Tue Jul 14 18:15:19 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.