No logs from Puppet in Ansible logs

Bug #1831887 reported by Jiří Stránský
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Jiří Stránský

Bug Description

I can't see any puppet output in Ansible tasks which are supposed to print that output:

TASK [Debug output for task: Run puppet host configuration for step 1] *********
Thursday 06 June 2019 10:23:52 +0000 (0:00:03.379) 0:03:05.847 *********
fatal: [controller-0]: FAILED! => {
    "failed_when_result": true,
    "outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))": []
}

I think what's described in this commit message no longer works:

https://github.com/openstack/tripleo-heat-templates/commit/8a8369d8688dab6eb719a640863397bfcb7d9316

I can't find docs on passing `--logdest` to Puppet multiple times. Probably we were lucky that this worked in previous Puppet versions, but it doesn't seem to work anymore.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.opendev.org/663624

Changed in tripleo:
assignee: nobody → Jiří Stránský (jistr)
status: Triaged → In Progress
tags: added: stein-backport-potential
Changed in tripleo:
milestone: train-1 → train-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/663624
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=fda0f4284b5972eb0716675a128e43104f5181c7
Submitter: Zuul
Branch: master

commit fda0f4284b5972eb0716675a128e43104f5181c7
Author: Jiri Stransky <email address hidden>
Date: Thu Jun 6 14:09:49 2019 +0200

    Fix disappearing Puppet logs

    It seems that recently Puppet logs started disappearing. Passing
    `--logdest` to `puppet apply` multiple times was probably working
    before as described in change
    Id5212b3ed27b6299e33e81ecf71ead554f9bdd29, but it seems to work no
    longer. In my testing, the output went only into syslog, and if Puppet
    failed, we had no Puppet output in the Ansible logs.

    The fix is to only log to console (as is the default) and use `logger
    -s` to effectively `tee` the output into syslog too. The logger
    command also has `-t puppet-user` because that's how Puppet tags its
    output when running with `--logdest syslog`.

    Change-Id: I46194897640198b6d817faf00be1d565a680ec02
    Closes-Bug: #1831887

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/664162

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/stein)

Reviewed: https://review.opendev.org/664162
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=242efd05cda7b7d8b2802aecc5236dd154c9a835
Submitter: Zuul
Branch: stable/stein

commit 242efd05cda7b7d8b2802aecc5236dd154c9a835
Author: Jiri Stransky <email address hidden>
Date: Thu Jun 6 14:09:49 2019 +0200

    Fix disappearing Puppet logs

    It seems that recently Puppet logs started disappearing. Passing
    `--logdest` to `puppet apply` multiple times was probably working
    before as described in change
    Id5212b3ed27b6299e33e81ecf71ead554f9bdd29, but it seems to work no
    longer. In my testing, the output went only into syslog, and if Puppet
    failed, we had no Puppet output in the Ansible logs.

    The fix is to only log to console (as is the default) and use `logger
    -s` to effectively `tee` the output into syslog too. The logger
    command also has `-t puppet-user` because that's how Puppet tags its
    output when running with `--logdest syslog`.

    Change-Id: I46194897640198b6d817faf00be1d565a680ec02
    Closes-Bug: #1831887
    (cherry picked from commit fda0f4284b5972eb0716675a128e43104f5181c7)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.6.0

This issue was fixed in the openstack/tripleo-heat-templates 10.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.1.0

This issue was fixed in the openstack/tripleo-heat-templates 11.1.0 release.

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.