From c6b5ebf35fa993497c35d0f598578b33a58911da Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Fri, 16 Aug 2019 15:05:15 -0500 Subject: [PATCH] devstack: Fix libvirtd/libvirt-bin detection Attempting to devstack on bionic failed with: Failed to restart libvirt-bin.service: Unit libvirt-bin.service not found. devstack/lib/ironic was trying to figure out whether our libvirtd service is called libvirtd or libvirt-bin based on: - Are we on ubuntu? - Does /etc/init.d/libvirtd not exist? if is_ubuntu && [ ! -f /etc/init.d/libvirtd ]; then libvirt_service_name="libvirt-bin" But on this bionic, for whatever reason, my libvirtd is at /usr/sbin/libvirtd. However, `type libvirtd` succeeds in either case. So this commit broadens the second part of that check accordingly. Note, FWIW, that devstack's lib/nova_plugins/functions-libvirt checks this way: # Only Xenial is left with libvirt-bin. Everywhere else is libvirtd if is_ubuntu && [ ${DISTRO} == "xenial" ]; then LIBVIRT_DAEMON=libvirt-bin else LIBVIRT_DAEMON=libvirtd fi Change-Id: I94a86a96d5732db60c12399fcaf666f960461e3e --- devstack/lib/ironic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index b8b4dfc119..3d34a078d2 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -640,7 +640,7 @@ function get_uefi_nvram { function restart_libvirt { local libvirt_service_name="libvirtd" - if is_ubuntu && [ ! -f /etc/init.d/libvirtd ]; then + if is_ubuntu && ! type libvirtd; then libvirt_service_name="libvirt-bin" fi restart_service $libvirt_service_name