Skip to content
Snippets Groups Projects
Commit 6bdf2026 authored by Mark Goddard's avatar Mark Goddard Committed by Radosław Piliszek
Browse files

Fix nova scheduler down after first docker restart

Due to a Docker bug [1] we cannot use Docker to send
SIGHUP to the container because it will mark it as
stopped.
This patch sends the signal directly to the process,
bypassing Docker.

'changed_when: false' is also removed from the
relevant task as it definitely changes the state.
In the future we could do the refresh only if
there really is a need for another one.

[1] https://github.com/moby/moby/issues/11065



Change-Id: Ief73bbd24568d6941384ea3330ab45f11aa42d37
Co-authored-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
Closes-Bug: #1845244
parent 160af32c
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,10 @@
# in nova scheduler.
- name: Refresh cell cache in nova scheduler
become: true
command: docker kill --signal HUP nova_scheduler
changed_when: False
# 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 `docker inspect -f '{% raw %}{{.State.Pid}}{% endraw %}' nova_scheduler`"
when:
- inventory_hostname in groups['nova-scheduler']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment