Bug 1906367

Summary: [OSP13->OSP16.1] Nova hybrid state step is not idempotent when restarting docker containers/service
Product: Red Hat OpenStack Reporter: Jose Luis Franco <jfrancoa>
Component: openstack-tripleo-heat-templatesAssignee: Jose Luis Franco <jfrancoa>
Status: CLOSED ERRATA QA Contact: Jason Grosso <jgrosso>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: ccamacho, jpretori, lbezdick, mburns
Target Milestone: z6Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20210104205657.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-26 13:49:37 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 Jose Luis Franco 2020-12-10 11:46:20 UTC
Description of problem:

The FFU upgrade procedure consists of one step tagged as nova_hybrid_state in which the nova-compute container gets replaced from Queens to Train in the compute nodes. The set of steps involved in this operation are no idempotent enough and perform a restart of the docker service in the compute nodes everytime the tasks are run even though it wouldn't be required as the config files haven't been modified.

We need to modify the tasks so that the docker service restart occurs only when the registries.conf has been modified, not always as it is done right now:

- name: Set container_registry_insecure registries
  when: container_registry_insecure_registries != []
  shell: crudini --set /etc/containers/registries.conf registries.insecure registries "[{{ container_registry_insecure_registries | map('regex_replace', '(.*)', "'\1'") | join(',') }}]"
- name: Restart docker
  when: container_registry_insecure_registries != []
  service:
    name: docker
    state: restarted


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


How reproducible:


Steps to Reproduce:
1. Run the FFU procedure
2. Execute the hybrid step and verify that docker service has been restarted
3. Re-run the code again and confirm that it has been restarted again

Actual results:


Expected results:


Additional info:

Comment 9 Lukas Bezdicka 2021-05-13 09:59:17 UTC
16:14 <lbezdick> http://rhos-ci-logs.lab.eng.tlv2.redhat.com/logs/rcj/DFG-upgrades-ffu-ffu-upgrade-13-16.1_director-rhel-virthost-3cont_2comp-ipv4-vxlan-HA-no-ceph-from-latest_cdn/119/undercloud-0/home/stack/overcloud_upgrade_run-controller-0.log.gz
16:14 <lbezdick>  Remove iscsid container before applying new paunch config
16:14 <lbezdick> 2021-05-07 17:24:08 | TASK [Remove iscsid container before applying new paunch config] ***************
16:14 <lbezdick> 2021-05-07 17:24:08 | Friday 07 May 2021  17:23:50 +0000 (0:00:07.064)       0:00:13.115 ************ 
16:14 <lbezdick> 2021-05-07 17:24:08 | skipping: [controller-0] => {"changed": false, "skip_reason": "Conditional result was False"}
16:14 <lbezdick> 2021-05-07 17:24:08 | changed: [controller-1] => {"changed": true}
16:14 <lbezdick> 2021-05-07 17:24:08 | changed: [controller-2] => {"changed": true}
16:14 <lbezdick> passed


^^ ctrl0 was skipped as it's already EL8 yet the workaround fired.

Comment 15 errata-xmlrpc 2021-05-26 13:49:37 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 (Red Hat OpenStack Platform 16.1.6 bug fix and enhancement 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/RHBA-2021:2097