puppet apply on the host via ansible never fails

Bug #1723163 reported by Michele Baldessari
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Emilien Macchi

Bug Description

Damien and I observed that puppet apply on the hostnever fails, even when it should, since we moved to the ansible way of applying it. The reason is the following code:

    - name: Run puppet host configuration for step {{step}}
      command: >-
        puppet apply
        --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
        --logdest syslog --logdest console --color=false
        /var/lib/tripleo-config/puppet_step_config.pp

The above is missing the --detailed-exitcodes switch and so puppet will never really error out on us.

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.openstack.org/511509

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
assignee: Michele Baldessari (michele) → Martin André (mandre)
Changed in tripleo:
assignee: Martin André (mandre) → Michele Baldessari (michele)
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
assignee: Michele Baldessari (michele) → Emilien Macchi (emilienm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/511509
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=11e599d116cfbf7df4dcd0e7670c3405a4224c1a
Submitter: Zuul
Branch: master

commit 11e599d116cfbf7df4dcd0e7670c3405a4224c1a
Author: Michele Baldessari <email address hidden>
Date: Thu Oct 12 17:37:50 2017 +0200

    Add --detailed-exitcodes when running puppet via ansible

    puppet run on never fails, even when it should, since we moved
    to the ansible way of applying it. The reason is the current following code:

        - name: Run puppet host configuration for step {{step}}
          command: >-
            puppet apply
            --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
            --logdest syslog --logdest console --color=false
            /var/lib/tripleo-config/puppet_step_config.pp

    The above is missing the --detailed-exitcodes switch and so puppet will never
    really error out on us and the deployment will keep on running all the
    steps even though a previous puppet manifest might have failed. This
    cause extra hard-to-debug failures.

    Initially the issue was observed on the puppet host runs, but this
    parameter is missing also from docker-puppet.py, so let's add it there
    as well as it makes sense to return proper error codes whenever we call
    puppet.

    Besides this being a good idea in general, we actually *have* to do it
    because puppet does not fail correctly without this option due to the
    following puppet bug:
    https://tickets.puppetlabs.com/browse/PUP-2754

    Depends-On: I607927c2ee5c29b605e18e9294b0f91d37337680
    Co-Authored-By: Damien Ciabrini <email address hidden>

    Change-Id: Ie9df4f520645404560a9635fb66e3af42b966f54
    Closes-Bug: #1723163

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/517022

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

Reviewed: https://review.openstack.org/517022
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=0ae06e10e1db3e25655fc392736248deff6516c1
Submitter: Zuul
Branch: stable/pike

commit 0ae06e10e1db3e25655fc392736248deff6516c1
Author: Michele Baldessari <email address hidden>
Date: Thu Oct 12 17:37:50 2017 +0200

    Add --detailed-exitcodes when running puppet via ansible

    puppet run on never fails, even when it should, since we moved
    to the ansible way of applying it. The reason is the current following code:

        - name: Run puppet host configuration for step {{step}}
          command: >-
            puppet apply
            --modulepath=/etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules
            --logdest syslog --logdest console --color=false
            /var/lib/tripleo-config/puppet_step_config.pp

    The above is missing the --detailed-exitcodes switch and so puppet will never
    really error out on us and the deployment will keep on running all the
    steps even though a previous puppet manifest might have failed. This
    cause extra hard-to-debug failures.

    Initially the issue was observed on the puppet host runs, but this
    parameter is missing also from docker-puppet.py, so let's add it there
    as well as it makes sense to return proper error codes whenever we call
    puppet.

    Besides this being a good idea in general, we actually *have* to do it
    because puppet does not fail correctly without this option due to the
    following puppet bug:
    https://tickets.puppetlabs.com/browse/PUP-2754

    Co-Authored-By: Damien Ciabrini <email address hidden>

    Change-Id: Ie9df4f520645404560a9635fb66e3af42b966f54
    Closes-Bug: #1723163
    (cherry picked from commit 11e599d116cfbf7df4dcd0e7670c3405a4224c1a)

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

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

Changed in tripleo:
status: In Progress → Fix Committed
Changed in tripleo:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.0.0b2

This issue was fixed in the openstack/tripleo-heat-templates 8.0.0.0b2 development milestone.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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