[Fedora] Devstack fails to install in firewalld less system
The official F20 cloud image does not contains the firewalld,
there is nothing to restart, and it fails the installation.
The previous workaround change, assumed all is_fedoras has
a restartable firewalld without ensuring is it installed at all.
RHEL6 even does not have a firewalld.
Closes-bug: #1329102
Change-Id: I3d119ce48af81b30bf02b01c2cd386612ac6ef90
diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt
index a6738e2..18bdf89 100644
--- a/lib/nova_plugins/functions-libvirt
+++ b/lib/nova_plugins/functions-libvirt
@@ -29,12 +29,16 @@
install_package python-libguestfs
fi
- # Restart dbus/firewalld after install of libvirt to avoid a
- # problem with polkit, which libvirtd brings in. See
+ # Restart firewalld after install of libvirt to avoid a problem
+ # with polkit, which libvirtd brings in. See
# https://bugzilla.redhat.com/show_bug.cgi?id=1099031
+
+ # Note there is a difference between F20 rackspace cloud images
+ # and HP images used in the gate; rackspace has firewalld but hp
+ # cloud doesn't. RHEL6 doesn't have firewalld either. So we
+ # don't care if it fails.
if is_fedora; then
- sudo service dbus restart
- sudo service firewalld restart
+ sudo service firewalld restart || true
fi
}