Rsyslog imfile misses at least puppet error reporting

Bug #1304286 reported by Vladimir Kuklin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Bogdan Dobrelya

Bug Description

How to reproduce

1. Provision Ubuntu nodes separately
2. rsync manifests to the slave node
3. corrupt site.pp with something like 'dfasjdflkadsjklfjadkslj' on the top of the file
4. run puppet apply 2>/var/log/puppet/puppet.err 1>/var/log/puppet/puppet.log

Expected result

Rsyslog captures data written to /var/log/puppet/puppet.err and sends it to rsyslog server

Actual result:

No data is sent, though logger -t puppet-error <blabla> will appear on the master node. This shows that only imfile modules are broken.

Tags: library
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-astute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/85970

Changed in fuel:
assignee: Bogdan Dobrelya (bogdando) → Vladimir Kuklin (vkuklin)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/85975

Changed in fuel:
assignee: Vladimir Kuklin (vkuklin) → Bogdan Dobrelya (bogdando)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-astute (master)

Reviewed: https://review.openstack.org/85970
Committed: https://git.openstack.org/cgit/stackforge/fuel-astute/commit/?id=bf1cac2693c16b9816f34851c2f9cdf857129484
Submitter: Jenkins
Branch: master

commit bf1cac2693c16b9816f34851c2f9cdf857129484
Author: Vladimir Kuklin <email address hidden>
Date: Tue Apr 8 13:28:23 2014 +0400

    Use logdest syslog for puppet

    Newer puppet 3.4.3 has working syslog
    for puppet apply. Thus we can send messages
    to syslog easily without usage of ImFile puppet
    module.

    Change-Id: Ibfdd4ab094fcf9586376a7f67369db65adc4006c
    Closes-bug: #1304286

Changed in fuel:
status: In Progress → Fix Committed
Changed in fuel:
status: Fix Committed → In Progress
Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

There is some additional changes must be done for astute part:
1) -o and -e options won't redirect any puppet output to specified files, if logdest was used. To check this run
daemonize -v -a -o out.txt -e err.txt /usr/bin/puppet apply -e "nootify {"foo":}" --logdest syslog
and compare results with
daemonize -v -a -o out.txt -e err.txt /usr/bin/puppet apply -e "nootify {"foo":}"
For the 1st case none logs would go to er.txt but to the syslog instead
And for the second case - errors would go to err.txt - but we don't need it anymore, if logdest was specified...

2) We don't need to specify --logdest in @puppetd - as you can see from mcagents/puppetd.rb puppet will be called with logdest syslog anyway, so we just make this option doubled. See grep logdest in diagnostic snapshots:
/usr/bin/puppet apply /etc/puppet/manifests/site.pp --logdest syslog --logdest syslog --trace --debug

3) We could as well use --evaltrace for debug case to see timings...

And besides that, there are still some issues exist with missed puppet logs in CI gates, see https://bugs.launchpad.net/bugs/1308684 ...

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to fuel-astute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/88277

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to fuel-astute (master)

Reviewed: https://review.openstack.org/88277
Committed: https://git.openstack.org/cgit/stackforge/fuel-astute/commit/?id=a790f3dd9c40a2b86d2a5dd97a1765e1ea9defa7
Submitter: Jenkins
Branch: master

commit a790f3dd9c40a2b86d2a5dd97a1765e1ea9defa7
Author: Bogdan Dobrelya <email address hidden>
Date: Thu Apr 17 15:51:56 2014 +0300

    Add evaltrace for debug, fix daemonize for puppet call

    Closes bug: #1304286

    Change-Id: Ib870d499dafd3e76f4ac9c12f9fc8e8545078218
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/85975
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=154534670350d83d51a4c06ec7c24363e9edb9bf
Submitter: Jenkins
Branch: master

commit 154534670350d83d51a4c06ec7c24363e9edb9bf
Author: Bogdan Dobrelya <email address hidden>
Date: Tue Apr 8 12:36:37 2014 +0300

    Del unused imfile templates for puppet

    Newer puppet 3.4.3 has working syslog
    for puppet apply. Thus we can send messages
    to syslog easily without usage of ImFile puppet
    module.

    Depends on: https://review.openstack.org/#/c/85970/
    Partial-bug:#1304286

    Change-Id: If4e01c68c1adc640903c69a064d10fe8f585466c
    Signed-off-by: Bogdan Dobrelya <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.