Merge "Handle difference between future and current container_cli"
This commit is contained in:
commit
27c931baa8
@ -261,7 +261,17 @@ outputs:
|
||||
when: cinder_api_enabled|bool
|
||||
tags: validation
|
||||
- name: Ensure all online data migrations for Cinder have been applied
|
||||
command: "{{ container_cli }} exec cinder_api cinder-manage db online_data_migrations"
|
||||
shell: |
|
||||
if {{ container_cli }} ps | grep cinder_api; then
|
||||
{{ container_cli }} exec cinder_api cinder-manage db online_data_migrations
|
||||
# handle situation when container_cli is podman but
|
||||
# the containers are still under docker
|
||||
elif docker ps | grep cinder_api; then
|
||||
docker exec cinder_api cinder-manage db online_data_migrations
|
||||
else
|
||||
echo "Error: cinder_api container not found"
|
||||
exit 1
|
||||
fi
|
||||
tags: pre-upgrade
|
||||
when:
|
||||
- is_bootstrap_node|bool
|
||||
|
@ -197,7 +197,17 @@ outputs:
|
||||
- ironic_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
- name: Ensure all online data migrations for Ironic have been applied
|
||||
command: "{{ container_cli }} exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations"
|
||||
shell: |
|
||||
if {{ container_cli }} ps | grep ironic_api; then
|
||||
{{ container_cli }} exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
|
||||
# handle situation when container_cli is podman but
|
||||
# the containers are still under docker
|
||||
elif docker ps | grep ironic_api; then
|
||||
docker exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
|
||||
else
|
||||
echo "Error: ironic_api container not found"
|
||||
exit 1
|
||||
fi
|
||||
tags: pre-upgrade
|
||||
when:
|
||||
- is_bootstrap_node|bool
|
||||
|
@ -363,7 +363,17 @@ outputs:
|
||||
- nova_api_httpd_enabled|bool
|
||||
- httpd_running|bool
|
||||
- name: Ensure all online data migrations for Nova have been applied
|
||||
command: "{{ container_cli }} exec nova_api nova-manage db online_data_migrations"
|
||||
shell: |
|
||||
if {{ container_cli }} ps | grep nova_api; then
|
||||
{{ container_cli }} exec nova_api nova-manage db online_data_migrations
|
||||
# handle situation when container_cli is podman but
|
||||
# the containers are still under docker
|
||||
elif docker ps | grep nova_api; then
|
||||
docker exec nova_api nova-manage db online_data_migrations
|
||||
else
|
||||
echo "Error: nova_api container not found"
|
||||
exit 1
|
||||
fi
|
||||
tags: pre-upgrade
|
||||
when:
|
||||
- is_bootstrap_node|bool
|
||||
|
@ -186,11 +186,31 @@ outputs:
|
||||
register: kolla_cert_exists
|
||||
|
||||
- name: set certificate group on host via container
|
||||
command: "{{ container_cli }} exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}"
|
||||
shell: |
|
||||
if {{ container_cli }} ps | grep {{container_id.stdout}}; then
|
||||
{{ container_cli }} exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}
|
||||
# handle situation when container_cli is podman but
|
||||
# the containers are still under docker
|
||||
elif docker ps | grep {{container_id.stdout}}; then
|
||||
docker exec {{container_id.stdout}} chgrp haproxy {{kolla_dir}}{{cert_path}}
|
||||
else
|
||||
echo "Error: {{container_id.stdout}} container not found"
|
||||
exit 1
|
||||
fi
|
||||
when: kolla_cert_exists.stat.exists
|
||||
|
||||
- name: copy certificate from kolla directory to final location
|
||||
command: "{{ container_cli }} exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}"
|
||||
shell: |
|
||||
if {{ container_cli }} ps | grep {{container_id.stdout}}; then
|
||||
{{ container_cli }} exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}
|
||||
# handle situation when container_cli is podman but
|
||||
# the containers are still under docker
|
||||
elif docker ps | grep {{container_id.stdout}}; then
|
||||
docker exec {{container_id.stdout}} cp {{kolla_dir}}{{cert_path}} {{cert_path}}
|
||||
else
|
||||
echo "Error: {{container_id.stdout}} container not found"
|
||||
exit 1
|
||||
fi
|
||||
when: kolla_cert_exists.stat.exists
|
||||
|
||||
- name: send restart order to haproxy container
|
||||
|
Loading…
x
Reference in New Issue
Block a user