diff --git a/lib/ironic b/lib/ironic index c6fa563e6a..9b4f6681e6 100644 --- a/lib/ironic +++ b/lib/ironic @@ -284,20 +284,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 { diff --git a/lib/nova_plugins/hypervisor-ironic b/lib/nova_plugins/hypervisor-ironic index 5af7c0b292..4887db7ce4 100644 --- a/lib/nova_plugins/hypervisor-ironic +++ b/lib/nova_plugins/hypervisor-ironic @@ -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