Merge "Set ODL API restart policy to unless-stopped" into stable/queens
This commit is contained in:
commit
a9d60e11a5
|
@ -127,7 +127,7 @@ outputs:
|
||||||
net: host
|
net: host
|
||||||
detach: true
|
detach: true
|
||||||
user: odl
|
user: odl
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: /openstack/healthcheck
|
test: /openstack/healthcheck
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -185,6 +185,15 @@ outputs:
|
||||||
# Containerized deployment upgrade steps
|
# Containerized deployment upgrade steps
|
||||||
- name: ODL container L2 update and upgrade tasks
|
- name: ODL container L2 update and upgrade tasks
|
||||||
block: &odl_container_upgrade_tasks
|
block: &odl_container_upgrade_tasks
|
||||||
|
- name: Check if ODL container is present
|
||||||
|
shell: "docker ps -a --format '{{ '{{' }}.Names{{ '}}' }}' | grep '^opendaylight_api$'"
|
||||||
|
register: opendaylight_api_container_present
|
||||||
|
failed_when: false
|
||||||
|
# NOTE: using shell module because of
|
||||||
|
# https://github.com/ansible/ansible/issues/27960
|
||||||
|
- name: Update ODL container restart policy to unless-stopped
|
||||||
|
shell: "docker update --restart=unless-stopped opendaylight_api"
|
||||||
|
when: opendaylight_api_container_present.rc == 0
|
||||||
- name: stop previous ODL container
|
- name: stop previous ODL container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: opendaylight_api
|
name: opendaylight_api
|
||||||
|
@ -242,6 +251,15 @@ outputs:
|
||||||
odl_update_level: {get_param: ODLUpdateLevel}
|
odl_update_level: {get_param: ODLUpdateLevel}
|
||||||
- name: Stop ODL container and remove cache
|
- name: Stop ODL container and remove cache
|
||||||
block:
|
block:
|
||||||
|
- name: Check if ODL container is present
|
||||||
|
shell: "docker ps -a --format '{{ '{{' }}.Names{{ '}}' }}' | grep '^opendaylight_api$'"
|
||||||
|
register: opendaylight_api_container_present
|
||||||
|
failed_when: false
|
||||||
|
# NOTE: using shell module because of
|
||||||
|
# https://github.com/ansible/ansible/issues/27960
|
||||||
|
- name: Update ODL container restart policy to unless-stopped
|
||||||
|
shell: "docker update --restart=unless-stopped opendaylight_api"
|
||||||
|
when: opendaylight_api_container_present.rc == 0
|
||||||
- name: Stop previous ODL container
|
- name: Stop previous ODL container
|
||||||
docker_container:
|
docker_container:
|
||||||
name: opendaylight_api
|
name: opendaylight_api
|
||||||
|
|
Loading…
Reference in New Issue