Merge "Reuse existing libvirt setup functions for Ironic"
This commit is contained in:
commit
116023f8e4
@ -288,20 +288,12 @@ function configure_ironic_dirs {
|
||||
mkdir -p $IRONIC_TFTPBOOT_DIR/pxelinux.cfg
|
||||
}
|
||||
|
||||
function ironic_ensure_libvirt_group {
|
||||
groups $STACK_USER | grep -q $LIBVIRT_GROUP || adduser $STACK_USER $LIBVIRT_GROUP
|
||||
}
|
||||
|
||||
function create_bridge_and_vms {
|
||||
ironic_ensure_libvirt_group
|
||||
|
||||
# Call libvirt setup scripts in a new shell to ensure any new group membership
|
||||
sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/setup-network"
|
||||
|
||||
sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/create-nodes \
|
||||
$IRONIC_VM_SPECS_CPU $IRONIC_VM_SPECS_RAM $IRONIC_VM_SPECS_DISK \
|
||||
amd64 $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR" >> $IRONIC_VM_MACS_CSV_FILE
|
||||
|
||||
}
|
||||
|
||||
function enroll_vms {
|
||||
|
@ -18,6 +18,7 @@
|
||||
MY_XTRACE=$(set +o | grep xtrace)
|
||||
set +o xtrace
|
||||
|
||||
source $TOP_DIR/lib/nova_plugins/functions-libvirt
|
||||
|
||||
# Defaults
|
||||
# --------
|
||||
@ -33,6 +34,7 @@ function cleanup_nova_hypervisor {
|
||||
|
||||
# configure_nova_hypervisor - Set config files, create data dirs, etc
|
||||
function configure_nova_hypervisor {
|
||||
configure_libvirt
|
||||
iniset $NOVA_CONF ironic sql_connection `database_connection_url nova_bm`
|
||||
LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"}
|
||||
iniset $NOVA_CONF DEFAULT compute_driver ironic.nova.virt.ironic.IronicDriver
|
||||
@ -50,8 +52,7 @@ function configure_nova_hypervisor {
|
||||
|
||||
# install_nova_hypervisor() - Install external components
|
||||
function install_nova_hypervisor {
|
||||
# This function intentionally left blank
|
||||
:
|
||||
install_libvirt
|
||||
}
|
||||
|
||||
# start_nova_hypervisor - Start any required external services
|
||||
|
Loading…
Reference in New Issue
Block a user