puppet-tripleo rabbitmq profile assumes rabbitmq is running at step1 during stack-update

Bug #1675194 reported by James Slagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
James Slagle

Bug Description

puppet-tripleo/manifests/profile/base/rabbitmq.pp has this code:

  if $step >= 1 {
    <snip>
    # In case of HA, starting of rabbitmq-server is managed by pacemaker, because of which, a dependency
    # to Service['rabbitmq-server'] will not work. Sticking with UPDATE action.
    if $stack_action == 'UPDATE' {
      # Required for changing password on update scenario. Password will be changed only when
      # called explicity, if the rabbitmq service is already running.
      rabbitmq_user { $rabbitmq_user :
        password => $rabbitmq_pass,
        provider => 'rabbitmqctl',
        admin => true,
      }
    }

That assumes that rabbitmq is running at step1 on stack-update since the rabbitmq_user resource will use rabbitmqctl to check if the user exists.

The issue is that if you are updating a failed stack that never made it to step2, then rabbitmq won't be running, since it is not started until step2.

The stack-update then fails with:
    Error: /Stage[main]/Tripleo::Profile::Base::Rabbitmq/Rabbitmq_user[guest]: Could not evaluate: Command is still failing after 180 seconds expired!

Changed in tripleo:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → James Slagle (james-slagle)
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-tripleo (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-tripleo (master)

Reviewed: https://review.openstack.org/448803
Committed: https://git.openstack.org/cgit/openstack/puppet-tripleo/commit/?id=aa9af086f05e466e88ac2a85ecc9d39f5a6d1e2f
Submitter: Jenkins
Branch: master

commit aa9af086f05e466e88ac2a85ecc9d39f5a6d1e2f
Author: James Slagle <email address hidden>
Date: Wed Mar 22 17:58:29 2017 -0400

    Check rabbitmq user at step >= 2

    The rabbitmq user check is moved to step >= 2 from step >= 1. There is
    no gaurantee that rabbitmq is running at step 1, especially if updating
    a failed stack that never made it past step 1 to begin with.

    Change-Id: I029193da4c180deff3ab516bc8dc2da14c279317
    Closes-Bug: #1675194

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/451737

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-tripleo (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/452609

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

Reviewed: https://review.openstack.org/451737
Committed: https://git.openstack.org/cgit/openstack/puppet-tripleo/commit/?id=b6a9d14489608e4c3ff48d602351a7b93092b11b
Submitter: Jenkins
Branch: stable/ocata

commit b6a9d14489608e4c3ff48d602351a7b93092b11b
Author: James Slagle <email address hidden>
Date: Wed Mar 22 17:58:29 2017 -0400

    Check rabbitmq user at step >= 2

    The rabbitmq user check is moved to step >= 2 from step >= 1. There is
    no gaurantee that rabbitmq is running at step 1, especially if updating
    a failed stack that never made it past step 1 to begin with.

    Change-Id: I029193da4c180deff3ab516bc8dc2da14c279317
    Closes-Bug: #1675194
    (cherry picked from commit aa9af086f05e466e88ac2a85ecc9d39f5a6d1e2f)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-tripleo (stable/newton)

Reviewed: https://review.openstack.org/452609
Committed: https://git.openstack.org/cgit/openstack/puppet-tripleo/commit/?id=9849454264149a7a3d73adf3d06d6791023ff566
Submitter: Jenkins
Branch: stable/newton

commit 9849454264149a7a3d73adf3d06d6791023ff566
Author: James Slagle <email address hidden>
Date: Wed Mar 22 17:58:29 2017 -0400

    Check rabbitmq user at step >= 2

    The rabbitmq user check is moved to step >= 2 from step >= 1. There is
    no gaurantee that rabbitmq is running at step 1, especially if updating
    a failed stack that never made it past step 1 to begin with.

    Change-Id: I029193da4c180deff3ab516bc8dc2da14c279317
    Closes-Bug: #1675194
    (cherry picked from commit aa9af086f05e466e88ac2a85ecc9d39f5a6d1e2f)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 7.0.0

This issue was fixed in the openstack/puppet-tripleo 7.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 5.6.0

This issue was fixed in the openstack/puppet-tripleo 5.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-tripleo 6.4.0

This issue was fixed in the openstack/puppet-tripleo 6.4.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.