Stop installing libvirt on baremetal nodes.

As per bug 1191649 the presence of libvirt on the baremetal undercloud
node causes routing to fail, as the node ends up with a
192.168.122.0/24 virbr0 network. Fix this by splitting out some of the
kvm specific bits of boot-stack.

Change-Id: Ie7bba9d2bceb3720fc9074e197da4c3999f1d509
This commit is contained in:
Robert Collins 2013-06-29 00:08:31 +12:00
parent 0a4ef20296
commit 2756f54c38
7 changed files with 32 additions and 24 deletions

View File

@ -4,10 +4,10 @@ Description
-----------
This element contains nova, glance, and keystone services with a default
configuration for nova-baremetal operation. If building for baremetal
deployments be sure to also include the nova-baremetal element, which is not
needed for 'overcloud' (KVM/Xen) deployments and thus is not depended on by
boot-stack.
configuration for nova-baremetal operation.
When building an image containing boot-stack be sure to add either nova-kvm or
nova-baremetal to enabled the appropriate hypervisor.
Basic Usage

View File

@ -68,16 +68,6 @@ eof
# Used by all compute
install-packages dnsmasq dnsmasq-utils ebtables
# for libvirt clouds only
install-packages libvirt-bin python-libvirt kvm pm-utils syslinux qemu-utils
# Fedora don't always have the libvirtd group created
if ! grep ^libvirtd /etc/group > /dev/null 2>&1; then
groupadd -f libvirtd
fi
usermod -a -G libvirtd nova
if [ -d /etc/init ]; then
install_dnsmasq_upstart
elif [ -d /lib/systemd/system ]; then
@ -92,7 +82,6 @@ elif [ -f /usr/share/syslinux/pxelinux.0 ]; then
fi
os-svc-daemon nova-compute nova nova-compute "--config-dir /etc/nova"
os-svc-daemon nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova"
os-svc-daemon nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova"
chown -R nova:nova /var/lib/misc/

View File

@ -5,13 +5,4 @@ modprobe nbd || true
chown -R nova:nova /var/run/nova
compute_driver=$(os-config-applier --type raw --key nova.compute_driver)
if [ "$compute_driver" != "baremetal.driver.BareMetalDriver" ] ; then
mkdir -p /var/lib/nova/instances/_base
chown nova:kvm /var/lib/nova/instances
chown nova:kvm /var/lib/nova/instances/_base
chmod 750 /var/lib/nova/instances
chmod 750 /var/lib/nova/instances/_base
fi
service nova-compute restart

View File

@ -0,0 +1,4 @@
Nova Compute KVM
----------------
Software install and configuration hooks for Nova with KVM.

View File

@ -0,0 +1,2 @@
nova-compute
os-refresh-config

View File

@ -0,0 +1,14 @@
#!/bin/bash
set -eux
# for libvirt clouds only
install-packages libvirt-bin python-libvirt kvm pm-utils syslinux qemu-utils
# Fedora don't always have the libvirtd group created
if ! grep ^libvirtd /etc/group > /dev/null 2>&1; then
groupadd -f libvirtd
fi
usermod -a -G libvirtd nova
os-svc-daemon nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova"

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -eux
mkdir -p /var/lib/nova/instances/_base
chown nova:kvm /var/lib/nova/instances
chown nova:kvm /var/lib/nova/instances/_base
chmod 750 /var/lib/nova/instances
chmod 750 /var/lib/nova/instances/_base