instack-undercloud manifest can conflict with systemd puppet module

Bug #1831253 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Michele Baldessari

Bug Description

While rebasing puppet-rabbitmq due to other reasons, I noticed that the undercloud (re) deploy would fail with:
2019-05-31 09:59:00,285 INFO: ^[[1;33mWarning: ModuleLoader: module 'zaqar' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules
2019-05-31 09:59:00,285 INFO: (file & line not available)^[[0m
2019-05-31 09:59:00,919 INFO: ^[[1;31mError: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Exec[systemctl-daemon-reload] is already declared in file /etc/puppet/manifests/puppet-stack-config.pp:99; cannot redeclare at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5 at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5:3 at /etc/puppet/modules/rabbitmq/manifests/config.pp:231 on node undercloud-0.redhat.local^[[0m
2019-05-31 09:59:00,982 INFO: + rc=1

This is because a newer puppet-rabbitmq introduced:
+
+ if $::facts['systemd'] {
+ Class['systemd::systemctl::daemon_reload'] -> Service['rabbitmq-server']
+ }
   }

Which then pulls in the exec called 'systemctl-daemon-reload' from the systemd module which conflicts with the same call we do in undercloud puppet manifest

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/662488

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/queens)

Reviewed: https://review.opendev.org/662488
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=d12465b4a0134a2ecc0d5e5d9fb96cf55a730b6e
Submitter: Zuul
Branch: stable/queens

commit d12465b4a0134a2ecc0d5e5d9fb96cf55a730b6e
Author: Michele Baldessari <email address hidden>
Date: Fri May 31 16:33:34 2019 +0200

    [queens-only] Rename the systemctl-daemon-reload exec

    While rebasing puppet-rabbitmq due to other reasons, I noticed that the
    undercloud (re) deploy would fail with:

    2019-05-31 09:59:00,919 INFO: Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Exec[systemctl-daemon-reload] is already declared in file /etc/puppet/manifests/puppet-stack-config.pp:99; cannot redeclare at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5 at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5:3 at /etc/puppet/modules/rabbitmq/manifests/config.pp:231 on node undercloud-0.redhat.local
    2019-05-31 09:59:00,982 INFO: + rc=1

    This is because a newer puppet-rabbitmq introduced:
    +
    + if $::facts['systemd'] {
    + Class['systemd::systemctl::daemon_reload'] -> Service['rabbitmq-server']
    + }
       }

    Which then pulls in the exec called 'systemctl-daemon-reload' from the
    systemd module which conflicts with the same call we do in undercloud
    puppet manifest.
    Let's just rename this exact to 'systemctl-daemon-undercloud' so we do
    not duplicate this resource ever. Tested this on a queens undercloud
    with a puppet-rabbitmq that triggers the problematic exec and got a
    correctly redeployed undercloud.

    We could have used the systemd module instead but that might require
    other backports and this seems the smallest possible approach to solve
    this.

    Change-Id: I96f5e4e51947da6919724d8ffb8531b8ecf87ff8
    Closes-Bug: #1831253

tags: added: in-stable-queens
Changed in tripleo:
milestone: train-1 → train-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 8.4.8

This issue was fixed in the openstack/instack-undercloud 8.4.8 release.

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to instack-undercloud (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/673711

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to instack-undercloud (stable/rocky)

Reviewed: https://review.opendev.org/673711
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=764aaf6a5cfc6906e673322fac82d7b58419907e
Submitter: Zuul
Branch: stable/rocky

commit 764aaf6a5cfc6906e673322fac82d7b58419907e
Author: Michele Baldessari <email address hidden>
Date: Fri May 31 16:33:34 2019 +0200

    [queens-only] Rename the systemctl-daemon-reload exec

    While rebasing puppet-rabbitmq due to other reasons, I noticed that the
    undercloud (re) deploy would fail with:

    2019-05-31 09:59:00,919 INFO: Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Exec[systemctl-daemon-reload] is already declared in file /etc/puppet/manifests/puppet-stack-config.pp:99; cannot redeclare at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5 at /etc/puppet/modules/systemd/manifests/systemctl/daemon_reload.pp:5:3 at /etc/puppet/modules/rabbitmq/manifests/config.pp:231 on node undercloud-0.redhat.local
    2019-05-31 09:59:00,982 INFO: + rc=1

    This is because a newer puppet-rabbitmq introduced:
    +
    + if $::facts['systemd'] {
    + Class['systemd::systemctl::daemon_reload'] -> Service['rabbitmq-server']
    + }
       }

    Which then pulls in the exec called 'systemctl-daemon-reload' from the
    systemd module which conflicts with the same call we do in undercloud
    puppet manifest.
    Let's just rename this exact to 'systemctl-daemon-undercloud' so we do
    not duplicate this resource ever. Tested this on a queens undercloud
    with a puppet-rabbitmq that triggers the problematic exec and got a
    correctly redeployed undercloud.

    We could have used the systemd module instead but that might require
    other backports and this seems the smallest possible approach to solve
    this.

    Change-Id: I96f5e4e51947da6919724d8ffb8531b8ecf87ff8
    Closes-Bug: #1831253
    (cherry picked from commit d12465b4a0134a2ecc0d5e5d9fb96cf55a730b6e)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/instack-undercloud 9.5.1

This issue was fixed in the openstack/instack-undercloud 9.5.1 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.