TRIPLEO_CONFIG_HASH not generated, hence update fails

Bug #1720208 reported by Janki Chhatbar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Steven Hardy

Bug Description

TRIPLEO_CONFIG_HASH [1] is generated based on the config value specified [2] which is default to /var/lib/config-data/<service>. Many services specify path at /var/lib/config-data/puppet-generated/<service> ([3] for example). Hence the hash is not generated and update would fail for such services.

Solution:
1. Replace all /var/lib/config-data/puppet-generated/<service> with /var/lib/config-data/<service> in THTs [3]. Downside side is not all files present here need to be mount to
/var/lib/kolla/config_files/src:ro
2. Pass CONFIG_VOLUME_PREFIX for all relevant services for docker-puppet.py to get correct path.

[1]. https://github.com/openstack/tripleo-heat-templates/blob/master/docker/docker-puppet.py#L377
[2]. https://github.com/openstack/tripleo-heat-templates/blob/master/docker/docker-puppet.py#L362
[3]. https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/opendaylight-api.yaml#L101

Changed in tripleo:
assignee: nobody → Janki Chhatbar (jankihchhatbar)
status: New → Confirmed
summary: - TRIPLEO_CONFIG_HASH not generated
+ TRIPLEO_CONFIG_HASH not generated, hence update fails
tags: added: containers
Changed in tripleo:
importance: Undecided → High
status: Confirmed → Triaged
milestone: none → queens-1
Steven Hardy (shardy)
tags: added: pike-backport-potential
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/508450

Changed in tripleo:
assignee: Janki Chhatbar (jankihchhatbar) → Steven Hardy (shardy)
status: Triaged → In Progress
Revision history for this message
Martin André (mandre) wrote :

To clarify a little bit, the content of /var/lib/config-data/puppet-generated/<service> is updated together with /var/lib/config-data/<service> so that means the config hash is generated each time we update the configuration.

The issue really is about the TRIPLEO_CONFIG_HASH environment variable not added to the container's configuration unless it mounts /var/lib/config-data/<service>. We need to check also if the container mounts /var/lib/config-data/puppet-generated/<service> since this is what is typically used for the service containers.

Revision history for this message
Steven Hardy (shardy) wrote :

Thanks for the context Martin - I pushed an update to https://review.openstack.org/#/c/508450/ which I think should take care of adding the config hash when /var/lib/config-data/puppet-generated/<service> is referenced by the service template

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

Reviewed: https://review.openstack.org/508450
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=3a932b056914d148fa460b8890fc0e631c817a40
Submitter: Jenkins
Branch: master

commit 3a932b056914d148fa460b8890fc0e631c817a40
Author: Steven Hardy <email address hidden>
Date: Fri Sep 29 09:55:55 2017 +0100

    Also match config volumes for /var/lib/config-data/puppet-generated/

    Some services only mount this directory, not /var/lib/config-data/$service
    so handle this case in the docker-puppet code that maps the mounted
    volumes to the services when adding the config hash to the container
    environment.

    Change-Id: I3bdb7609f322458584ac9597ffbfefb057b84646
    Closes-Bug: #1720208

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

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

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

commit 0412b70f52e59f4ceabb643ae0dbdb5994fae5ad
Author: Steven Hardy <email address hidden>
Date: Fri Sep 29 09:55:55 2017 +0100

    Also match config volumes for /var/lib/config-data/puppet-generated/

    Some services only mount this directory, not /var/lib/config-data/$service
    so handle this case in the docker-puppet code that maps the mounted
    volumes to the services when adding the config hash to the container
    environment.

    Change-Id: I3bdb7609f322458584ac9597ffbfefb057b84646
    Closes-Bug: #1720208
    (cherry picked from commit 3a932b056914d148fa460b8890fc0e631c817a40)

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

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

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

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