generation of tripleo config hash is broken in master

Bug #1860364 reported by Damien Ciabrini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Damien Ciabrini

Bug Description

When deploying a stack or running a stack update, the deploy steps (re)generate the containers' config and (re)compute their config hash. This is being done by container-puppet.py, and the generated config is stored in under /var/lib/tripleo-config/container-startup-config/<step>/<container>.json

A container <C> gets an associated tripleo config hash if and only if one of its bind mount contains /var/lib/config-data/<service>/.../ or /var/lib/config-data/puppet-generated/<service>/.... If so, the <service>'s hash is added to container <C>'s json config.

Currently the generation of the config hash is broken because container-puppet stopped parsing the bind mounts appropriately. From container-puppet.py logs:

    2020-01-20 14:46:27,530 INFO: 714161 -- Finished processing puppet configs for neutron
    2020-01-20 14:46:27,531 DEBUG: 714143 -- STARTUP_CONFIG_PATTERN: /var/lib/tripleo-config/container-startup-config/*/*.json
    2020-01-20 14:46:27,536 DEBUG: 714143 -- Looking for hashfile /var/lib/config-data/puppet-generated.md5sum for config_volume /var/lib/config-data/puppet-generated
    2020-01-20 14:46:27,537 DEBUG: 714143 -- Looking for hashfile /var/lib/config-data/puppet-generated.md5sum for config_volume /var/lib/config-data/puppet-generated
    2020-01-20 14:46:27,538 DEBUG: 714143 -- Looking for hashfile /var/lib/config-data/memcached/etc/sysconfig.md5sum for config_volume /var/lib/config-data/memcached/etc/sysconfig

As seen above, sometimes the config volume path is stripped from the service name, sometimes the full config path remains (memcached)... which prevent container-puppet.py to locate the hash file .md5sum associated to the service.

Consequently, stack update doesn't restart the service as expected when config changes.

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/703480

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

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

commit a5ffef4a40dbfb48926dfd6b0057547343b9a082
Author: Damien Ciabrini <email address hidden>
Date: Mon Jan 20 19:47:07 2020 +0100

    Fix generation of TRIPLEO_CONFIG_HASH for services

    A container gets a config hash if one of its bind mount references
    /var/lib/config-data/(puppet-generated)?/service. That hash is
    created/managed by container-puppet.py and stored in
    /var/lib/config-data/(puppet-generated)?/service.md5sum

    Currently, the parsing of bind-mount is broken so container-puppet.py
    never associates or regenerates config hashes for containers. Fix
    the parsing to make sure that any bind-mounts starting with
    /var/lib/config-data always resolve to the right md5sum file.

    Change-Id: I7ad50d62e6177f109f513c4c11f611be60e570f2
    Closes-Bug: #1860364

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/703830

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/703831

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

Reviewed: https://review.opendev.org/703830
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=a854080cb5eed8701ce0f5bf6399dd7e37d4714b
Submitter: Zuul
Branch: stable/train

commit a854080cb5eed8701ce0f5bf6399dd7e37d4714b
Author: Damien Ciabrini <email address hidden>
Date: Mon Jan 20 19:47:07 2020 +0100

    Fix generation of TRIPLEO_CONFIG_HASH for services

    A container gets a config hash if one of its bind mount references
    /var/lib/config-data/(puppet-generated)?/service. That hash is
    created/managed by container-puppet.py and stored in
    /var/lib/config-data/(puppet-generated)?/service.md5sum

    Currently, the parsing of bind-mount is broken so container-puppet.py
    never associates or regenerates config hashes for containers. Fix
    the parsing to make sure that any bind-mounts starting with
    /var/lib/config-data always resolve to the right md5sum file.

    Change-Id: I7ad50d62e6177f109f513c4c11f611be60e570f2
    Closes-Bug: #1860364
    (cherry picked from commit a5ffef4a40dbfb48926dfd6b0057547343b9a082)

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

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

commit f98605c1df3383e30efb014adb93963bbb3bb80e
Author: Damien Ciabrini <email address hidden>
Date: Mon Jan 20 19:47:07 2020 +0100

    Fix generation of TRIPLEO_CONFIG_HASH for services

    A container gets a config hash if one of its bind mount references
    /var/lib/config-data/(puppet-generated)?/service. That hash is
    created/managed by container-puppet.py and stored in
    /var/lib/config-data/(puppet-generated)?/service.md5sum

    Currently, the parsing of bind-mount is broken so container-puppet.py
    never associates or regenerates config hashes for containers. Fix
    the parsing to make sure that any bind-mounts starting with
    /var/lib/config-data always resolve to the right md5sum file.

    Change-Id: I7ad50d62e6177f109f513c4c11f611be60e570f2
    Closes-Bug: #1860364
    (cherry picked from commit a5ffef4a40dbfb48926dfd6b0057547343b9a082)

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

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

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

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

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

This issue was fixed in the openstack/tripleo-heat-templates stein-eol 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.