kolla-ansible/ansible/roles/nova/tasks/refresh_scheduler_cell_cache.yml
Ivan Halomi 910f9bd36f Usage of kolla_container_engine variable instead of docker
First part of patchset:
 https://review.opendev.org/c/openstack/kolla-ansible/+/799229/
in which was suggested to split patch into smaller ones.

This implements kolla_container_engine variable
in command calls of docker,so later on it can be
also used for podman without further change.

Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
Change-Id: Ic30b67daa2e215524096ad1f4385c569e3d41b95
2022-10-28 09:15:55 +02:00

13 lines
638 B
YAML

---
# This is necessary after new cells have been created to refresh the cell cache
# in nova scheduler.
- name: Refresh cell cache in nova scheduler
become: true
# NOTE(yoctozepto): Normally we would send the signal via Docker but, due to a
# Docker bug (https://github.com/moby/moby/issues/11065), this might cause the
# container to be stopped if we restart Docker or reboot the server as we
# use the 'unless-stopped' restart policy by default.
shell: "kill -HUP `{{ kolla_container_engine }} inspect -f '{% raw %}{{ .State.Pid }}{% endraw %}' nova_scheduler`"
when:
- inventory_hostname in groups['nova-scheduler']