diff --git a/bifrost/inventory.py b/bifrost/inventory.py index 6ce990944..ae8ed0960 100755 --- a/bifrost/inventory.py +++ b/bifrost/inventory.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # diff --git a/playbooks/roles/bifrost-ironic-install/tasks/start.yml b/playbooks/roles/bifrost-ironic-install/tasks/start.yml index 2bf19a458..8bfa106bb 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/start.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/start.yml @@ -45,20 +45,25 @@ - name: "Start ironic-api" service: name=ironic-api state=restarted -# NOTE(Shrews) When testing, we want to use our custom dnsmasq.conf file, -# not the one supplied by libvirt. And the libvirt started dnsmasq processes -# are not controlled by upstart, so we need to manually kill those. -- name: "Stop existing libvirt dnsmasq processes" - command: killall -w dnsmasq - when: testing | bool == true and include_dhcp_server | bool == true - ignore_errors: yes - - name: "Ensure services are running with current config" service: name={{ item }} state=restarted enabled=yes with_items: - xinetd - nginx +# Multiple dnsmasqs are likely running, so lets tell the service manager +# to at least try stopping dnsmasq for us. +- name: "Stop dnsmasq explicitly." + service: name=dnsmasq state=stopped + +# NOTE(Shrews) When testing, we want to use our custom dnsmasq.conf file, +# not the one supplied by libvirt. And the libvirt started dnsmasq processes +# are not controlled by upstart, so we need to manually kill those. +- name: "Stop existing libvirt dnsmasq processes" + command: killall -9 -w dnsmasq + when: testing | bool == true and include_dhcp_server | bool == true + ignore_errors: yes + - name: "Ensure dnsmasq is running with current config" service: name={{ item }} state=restarted enabled=yes with_items: