Perform docker reconfiguration on upgrade_tasks.
The container-registry role is idempotent in a way that the
restarting of the docker service will be done only if some
configuration value has changed.
During the upgrade, host_prep_tasks are being run and if the
new templates bring some configuration change then the Docker
service gets restarted. The issue is the point at which they
get restarted, which is after the upgrade_tasks have already
run and prior to the deploy_tasks. This is causing issues with
Pacemaker handled resources.
For that reason, we include the very same task running in host_prep_tasks
into upgrade_tasks for the docker and docker-registry services,
forcing the Docker service reconfiguration to happen during
upgrade_tasks instead of at a latter point.
This patch also fixes the typo included in the master branch patch
I5e6ca987c01ff72a3c7e8900f9572024521164de that caused LP#1808974.
Closes-Bug: #1807418
Related-Bug: #1808974
Change-Id: I5e6ca987c01ff72a3c7e8900f9572024521164de
(cherry picked from commit 5bc5ae944a
)
This commit is contained in:
parent
be22412959
commit
033e6f7081
|
@ -54,7 +54,7 @@ outputs:
|
|||
- name: Install, Configure and Run Docker Distribution
|
||||
block:
|
||||
# NOTE(bogdando): w/a https://github.com/ansible/ansible/issues/42621
|
||||
- set_fact:
|
||||
- set_fact: &docker_vars
|
||||
container_registry_host:
|
||||
if:
|
||||
- local_container_registry_is_empty
|
||||
|
@ -65,6 +65,12 @@ outputs:
|
|||
name: container-registry
|
||||
tasks_from: docker-distribution
|
||||
upgrade_tasks:
|
||||
- name: Install docker packages on upgrade if missing
|
||||
- block:
|
||||
- name: Install docker packages on upgrade if missing
|
||||
package: name=docker-distribution state=latest
|
||||
- set_fact: *docker_vars
|
||||
- name: Reconfigure Docker if needed
|
||||
include_role:
|
||||
name: container-registry
|
||||
tasks_from: docker
|
||||
when: step|int == 3
|
||||
package: name=docker-distribution state=latest
|
||||
|
|
|
@ -111,9 +111,15 @@ outputs:
|
|||
ovn_metadata:
|
||||
docker_additional_sockets: {get_param: DockerAdditionalSockets}
|
||||
upgrade_tasks:
|
||||
- name: Install docker packages on upgrade if missing
|
||||
- block:
|
||||
- name: Install docker packages on upgrade if missing
|
||||
package: name=docker state=latest
|
||||
- set_fact: *docker_vars
|
||||
- name: Reconfigure Docker if needed
|
||||
include_role:
|
||||
name: container-registry
|
||||
tasks_from: docker
|
||||
when: step|int == 3
|
||||
package: name=docker state=latest
|
||||
update_tasks:
|
||||
- name: Restart Docker when needed
|
||||
when: step|int == 2
|
||||
|
|
Loading…
Reference in New Issue