Bug 1497056

Summary: TRIPLEO_CONFIG_HASH not generated, hence update fails
Product: Red Hat OpenStack Reporter: Janki <jchhatba>
Component: openstack-tripleo-heat-templatesAssignee: Janki <jchhatba>
Status: CLOSED ERRATA QA Contact: Itzik Brown <itbrown>
Severity: medium Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: ahrechan, augol, dciabrin, jchhatba, lbezdick, mandreou, mburns, mkolesni, nyechiel, ohochman, rhel-osp-director-maint, trozet, tvignaud
Target Milestone: gaKeywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-7.0.3-0.20171023134947.8da5e1f.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
N/A
Last Closed: 2017-12-13 22:11:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Janki 2017-09-29 06:40:09 UTC
Description of problem:
Update of containerised services is dependent on the change in TRIPLEO_CONFIG_HASH. This hash is generated based on the config volume of the service. If the hash is not generated, the container cannot be identified to restart during an update.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
TRIPLEO_CONFIG_HASH should be generated for ODL container

Additional info:

Comment 2 Artem Hrechanychenko 2017-11-07 13:22:06 UTC
Hi Janki,
is it normal that not all containers have that config_hash and some container have similar hash

for example - 
on controller node:

openstack-tripleo-heat-templates-7.0.3-0.20171024200823.el7ost.noarch

for i in `sudo docker ps -a --format 'table {{.Names}}'|awk '{if(NR>1)print}' | sort`; do echo "############################################"; echo $i;sudo docker inspect $i |grep TRIPLEO_CONFIG_HASH |grep -v config_data;done

############################################
aodh_api
                "TRIPLEO_CONFIG_HASH=0b55e3ed5558e9b383e6e07220805e62",
############################################
aodh_db_sync
############################################
aodh_evaluator
                "TRIPLEO_CONFIG_HASH=0b55e3ed5558e9b383e6e07220805e62",
############################################
aodh_init_log
############################################
aodh_listener
                "TRIPLEO_CONFIG_HASH=0b55e3ed5558e9b383e6e07220805e62",
############################################
aodh_notifier
                "TRIPLEO_CONFIG_HASH=0b55e3ed5558e9b383e6e07220805e62",
############################################
ceilometer_agent_central
                "TRIPLEO_CONFIG_HASH=c9df095b8adfe9a6477fd706387b7f18",
############################################
ceilometer_agent_notification
                "TRIPLEO_CONFIG_HASH=c9df095b8adfe9a6477fd706387b7f18",
############################################
ceilometer_gnocchi_upgrade
############################################
ceilometer_init_log
############################################
clustercheck
                "TRIPLEO_CONFIG_HASH=68c51bc8affcabe1f404ab87103783b1",
############################################
galera-bundle-docker-0
############################################
glance_api
                "TRIPLEO_CONFIG_HASH=941c08cf0d764e09939dc71f84c01c8a",
############################################
glance_api_db_sync
                "TRIPLEO_CONFIG_HASH=941c08cf0d764e09939dc71f84c01c8a",
############################################
glance_init_logs
############################################
gnocchi_api
                "TRIPLEO_CONFIG_HASH=6ba322a51c2db4333c75958b401d8493",
############################################
gnocchi_db_sync
############################################
gnocchi_init_log
############################################
gnocchi_metricd
                "TRIPLEO_CONFIG_HASH=6ba322a51c2db4333c75958b401d8493",
############################################
gnocchi_statsd
                "TRIPLEO_CONFIG_HASH=6ba322a51c2db4333c75958b401d8493",
############################################
haproxy-bundle-docker-2
############################################
haproxy_image_tag
############################################
haproxy_init_bundle
############################################
heat_api
                "TRIPLEO_CONFIG_HASH=608d82e268d3b1c97402a460c44bf07d",
############################################
heat_api_cfn
                "TRIPLEO_CONFIG_HASH=c4c6c8132b581727780e211015d163a8",
############################################
heat_api_cron
                "TRIPLEO_CONFIG_HASH=608d82e268d3b1c97402a460c44bf07d",
############################################
heat_engine
                "TRIPLEO_CONFIG_HASH=f62e5737515a800305ada64fd9dbfd4c",
############################################
heat_engine_db_sync
############################################
heat_init_log
############################################
horizon
                "TRIPLEO_CONFIG_HASH=0d126005673a2900ae7d7919b0889406",
############################################
horizon_fix_perms
############################################
keystone
                "TRIPLEO_CONFIG_HASH=6fb638aa059638dae5065fe841d16384",
############################################
keystone_cron
                "TRIPLEO_CONFIG_HASH=6fb638aa059638dae5065fe841d16384",
############################################
keystone_db_sync
                "TRIPLEO_CONFIG_HASH=6fb638aa059638dae5065fe841d16384",
############################################
keystone_init_log
############################################
logrotate_crond
                "TRIPLEO_CONFIG_HASH=8bbe9e0d4564aee0e02e4b9102713dfe",
############################################
memcached
############################################
memcached_init_logs
############################################
mysql_bootstrap
                "TRIPLEO_CONFIG_HASH=377eb09faef148dd295df46a8bc456f3",
############################################
mysql_data_ownership
############################################
mysql_image_tag
############################################
mysql_init_bundle
############################################
nova_api
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_api_create_default_cell
############################################
nova_api_cron
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_api_db_sync
############################################
nova_api_discover_hosts
############################################
nova_api_map_cell0
############################################
nova_conductor
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_consoleauth
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_db_sync
############################################
nova_init_logs
############################################
nova_metadata
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_placement
                "TRIPLEO_CONFIG_HASH=c3e43662c8cfde327ae177d8eaa0609c",
############################################
nova_scheduler
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
nova_vnc_proxy
                "TRIPLEO_CONFIG_HASH=4fbe1c2f374df7a7dc414623efb9982d",
############################################
panko_api
                "TRIPLEO_CONFIG_HASH=15155a6f1cd265f6fc9f29a5eb162b36",
############################################
panko_db_sync
############################################
panko_init_log
############################################
rabbitmq_bootstrap
                "TRIPLEO_CONFIG_HASH=3e5759fe4b929b39848e059fbd269572",
############################################
rabbitmq-bundle-docker-0
############################################
rabbitmq_image_tag
############################################
rabbitmq_init_bundle
############################################
redis-bundle-docker-0
############################################
redis_image_tag
############################################
redis_init_bundle
############################################
swift_account_auditor
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_account_reaper
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_account_replicator
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_account_server
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_container_auditor
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_container_replicator
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_container_server
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_container_updater
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_copy_rings
############################################
swift_object_auditor
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_object_expirer
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_object_replicator
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_object_server
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_object_updater
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_proxy
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_rsync
                "TRIPLEO_CONFIG_HASH=faf026975d88b323c975ab5963913c71",
############################################
swift_setup_srv

Comment 3 Janki 2017-11-08 10:54:40 UTC
Yes, all containers should have "TRIPLEO_CONFIG_HASH" generated. Its ok if all <service>-related containers have same hash, eg all swift related containers have same hash. All containers having config volume mounted at /var/lib/config-data and /var/lib/config-data/puppet-generated should have a hash.

Which container do you see not having a hash? If you are talking about aodh_db_sync and aodh_init_log from the output you pasted, they are not actually containers, they are just docker config steps to be done inside a container. YOu can see all the audh related docker images (which are run as containers) at https://github.com/openstack/kolla/tree/master/docker/aodh.

Updates for HA pacemaker managed services is different than other services and likely be a reason for hash not getting generated.

Comment 5 Damien Ciabrini 2017-11-09 09:52:23 UTC
Yes, containers for HA services (like rabbit, galera, haproxy) are treated a bit differently that the other services:
  #1 . containers for HA services are created dynamically by pacemaker, and not by paunch during the ansible deploy script.
  ==> this is because pacemaker handle the entire lifecycle of the HA services (e.g. startup orchestration for galera, failover across nodes for A/P services...) 

  #2 . when a HA service updates its configuration or the container image it's using, its associated running containers must be restarted one node at a time.
  ==> this is to avoid service disruption for the OSP clients.

In order to guarantee that point #2 holds, HA services are updated during "minor updates" only (i.e. the "stack update" workflow). A "Minor update" operates one node at a time:
  . stops pacemaker on the node,
  . regenerates config for HA and non-HA services
  . update container images for HA and non-HA services
  . restart pacemaker on the node.

This approach guarantees that HA services will be restarted in any case, so there is no need to use TRIPLEO_CONFIG_HASH for these services.

So the bottom line is: 1) config updates for HA services is implemented via "minor updates" 2) HA services don't use TRIPLEO_CONFIG_HASH

Comment 8 Itzik Brown 2017-12-07 09:17:55 UTC
TRIPLEO_CONFIG_HASH is configured on each opendaylight_api container in HA setup.
Checked with openstack-tripleo-heat-templates-7.0.3-17.el7ost.noarch

Comment 11 errata-xmlrpc 2017-12-13 22:11:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462