Merge "Cleanup metadata-proxy when old versions are present"

This commit is contained in:
Jenkins 2016-07-07 17:53:44 +00:00 committed by Gerrit Code Review
commit e062cf9d09
2 changed files with 26 additions and 0 deletions

View File

@ -20,4 +20,20 @@
pattern: "{{ item.value.service_name }}"
with_dict: "{{ neutron_services }}"
failed_when: false
notify:
- Run ns-metadata-proxy process cleanup
when: item.value.service_en | bool
# NOTE(cloudnull):
# When installing or upgrading it is possible that an old metadata proxy process will not
# be restarted by the metadata agent when a version changes. To fix it the ns-metadata
# proxy pids are killed if they're not running the current tag. Once the old processeses
# are removed the metadata agent will respawn the missing process within 60 seconds using
# the correct code.
- name: Run ns-metadata-proxy process cleanup
shell: |
for ns_pid in $(pgrep neutron-ns-meta); do
(echo $(readlink -f "/proc/$ns_pid/exe") | grep -qv "{{ neutron_venv_tag }}") && \
(echo "old metadata proxy pid found running clean up on $ns_pid"; kill -9 "$ns_pid")
done
when: neutron_services['neutron-metadata-agent'].service_en | bool

View File

@ -0,0 +1,10 @@
---
fixes:
- When upgrading it is possible for an old "neutron-ns-metadata-proxy"
process to remain running in memory. If this happens the old version of
the process can cause unexpected issues in a production environment. To
fix this a task has been added to the os_neutron role that will execute
a process lookup and kill any "neutron-ns-metadata-proxy" processes that
are not running the current release tag. Once the old processes are
removed the metadata agent running will respawn everything needed within
60 seconds.