check if dnsmasq runs after switching to different bootstrap image
Sometimes dnsmasq stops after running `cobbler sync' command, which breaks PXE boot. Restart dnsmasq after reconfiguring cobbler to work around the problem. Closes-Bug: #1482242 Change-Id: I5d6949bea15d86decd727ce9d4c4b2408fed7e05
This commit is contained in:
parent
bdca75d025
commit
7f8dc06966
|
@ -51,6 +51,12 @@ maybe_build_ubuntu_bootstrap ()
|
|||
fi
|
||||
}
|
||||
|
||||
maybe_restart_dnsmasq () {
|
||||
if ! dockerctl shell cobbler service dnsmasq status >/dev/null; then
|
||||
dockerctl shell cobbler service dnsmasq restart
|
||||
fi
|
||||
}
|
||||
|
||||
verify_bootstrap_flavor () {
|
||||
local flavor="$1"
|
||||
if [ -z "$flavor" ]; then
|
||||
|
@ -95,6 +101,8 @@ switch_bootstrap () {
|
|||
fi
|
||||
write_astute_yaml "$flavor"
|
||||
run_puppet cobbler "$cobbler_manifest"
|
||||
# XXX: sometimes dnsmasq stops after cobbler sync
|
||||
maybe_restart_dnsmasq
|
||||
run_puppet astute "$astute_manifest"
|
||||
# XXX: astute puppet manifest should take care to restart astuted on its own
|
||||
dockerctl shell astute killall -sHUP supervisord
|
||||
|
|
Loading…
Reference in New Issue