[PCP-840] pxp-agent logs grow unbounded on AIX Created: 2018/04/04  Updated: 2020/07/07

Status: Open
Project: Puppet Communications Protocol
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nick Walker Assignee: Geoff Nichols
Resolution: Unresolved Votes: 0
Labels: aix, daemon, logrotate, maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
Relates
relates to PCP-6 Rotate pxp-agent log files on *nix Closed
relates to PCP-130 Add pxp-agent log rotation for Solari... Ready for Engineering
Template:
Team: Bolt
Method Found: Customer Feedback
CS Priority: Normal
CS Frequency: 2 - 5-25% of Customers
CS Severity: 3 - Serious
CS Business Value: 4 - $$$$$
CS Impact: On many other OSs we include logrotate with the package. As seen in this ticket the impact is that drives can fill up.

We don't see this with puppet itself because it goes to syslog. Ideally we would either send to syslog or have the agent manage logrotation by itself.
QA Risk Assessment: Needs Assessment

 Description   

The Problem

AIX doesn't have log rotate or as far as I can tell any default way to rotate logs so the pxp-agent logs grow indefinitely on a default installation of AIX.

Suggested Solution

??



 Comments   
Comment by Geoff Nichols [ 2018/04/04 ]

Possibly relevant: http://www-01.ibm.com/support/docview.wss?uid=isg3T1012796

Comment by Nicky Kernohan [ 2018/04/05 ]

Workaround via cron 

 

cron {'rotate pxp agent logs': 
command => 'cp /var/log/puppetlabs/pxp-agent/pxp-agent.log /var/log/puppetlabs/pxp-agent/pxp-agent.log.bak ; > /var/log/puppetlabs/pxp-agent/pxp-agent.log ; gzip -9 /var/log/puppetlabs/pxp-agent/pxp-agent.log.bak ; mv /var/log/puppetlabs/pxp-agent/pxp-agent.log.bak.gz /var/log/puppetlabs/pxp-agent/pxp-agent.log-$(date +%Y-%M-%d)',
 user => 'root',
 hour => 2,
}

Comment by Branan Riley [ 2018/04/10 ]

Since AIX doesn't have these facilities, I don't think we can resolve this in the agent - it would have to be built in to pxp-agent itself. Boost.log supports rotation, so I don't think this would be incredibly difficult on that side. Michael Smith Does it make sense to make this a PCP ticket?

Comment by Michael Smith [ 2018/04/10 ]

I think we can reconsider using Boost.log. PCP-6 unfortunately doesn't have much background on why it wasn't used originally.

Comment by Yasmin Rajabi [ 2018/05/18 ]

Hi, what is needed for this ticket to be fixed?

Generated at Sat Sep 19 12:49:43 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.