diff --git a/packstack/installer/run_setup.py b/packstack/installer/run_setup.py index cb373d0ab..ed9fd61a7 100644 --- a/packstack/installer/run_setup.py +++ b/packstack/installer/run_setup.py @@ -748,9 +748,9 @@ def single_step_aio_install(options, logFile): if not options.novanetwork_pubif: options.novanetwork_pubif = utils.device_from_ip(options.install_hosts) if not options.novacompute_privif: - options.novacompute_privif = "lo" + options.novacompute_privif = '' if not options.novanetwork_privif: - options.novanetwork_privif = "lo" + options.novanetwork_privif = '' # If we are doing an all-in-one install, do demo provisioning # unless specifically told not to diff --git a/packstack/plugins/nova_300.py b/packstack/plugins/nova_300.py index 82e5fafe3..6e0ce29ce 100644 --- a/packstack/plugins/nova_300.py +++ b/packstack/plugins/nova_300.py @@ -164,8 +164,8 @@ def initConfig(controller): "PROMPT": ("Enter the Private interface for Flat DHCP on the Nova" " compute servers"), "OPTION_LIST": [], - "VALIDATORS": [validators.validate_not_empty], - "DEFAULT_VALUE": secondary_netif, + "VALIDATORS": [], + "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_COMPUTE_PRIVIF", @@ -201,8 +201,8 @@ def initConfig(controller): "PROMPT": ("Enter the Private interface for network manager on " "the Nova network server"), "OPTION_LIST": [], - "VALIDATORS": [validators.validate_not_empty], - "DEFAULT_VALUE": secondary_netif, + "VALIDATORS": [], + "DEFAULT_VALUE": '', "MASK_INPUT": False, "LOOSE_VALIDATION": True, "CONF_NAME": "CONFIG_NOVA_NETWORK_PRIVIF", @@ -402,6 +402,36 @@ def bring_up_ifcfg(host, device): raise ScriptRuntimeError(msg) +def dummy_interface(host): + """Creates dummy interface on given hosts. + + Returns interface name. + """ + # Only single dummy interface will be created, hence the name is hardcoded + ifname = 'dummy' + script = ( + 'DEVICE={0}\n' + 'BOOTPROTO=none\n' + 'ONBOOT=yes\n' + 'TYPE=Ethernet\n' + 'NM_CONTROLLED=no\n'.format(ifname) + ) + server = utils.ScriptRunner(host) + server.append( + 'ip link show {ifname} || (' + 'modprobe dummy && ' + 'ip link set name {ifname} dev dummy0 && ' + 'ip link set dev dummy address 06:66:DE:AF:66:60' + ')'.format(**locals()) + ) + server.append( + 'cat > /etc/sysconfig/network-scripts/ifcfg-{ifname} ' + '<