Configure [neutron] in nova_cell*.conf
The nova-conductor service running in the cell needs to be configured to talk to neutron for things like deallocating networks during server build failure. This changes the configure_neutron_nova flows such that the top-level nova.conf is configured as before, but we also configure each nova_cell*.conf cell conductor config files to also be able to talk to neutron. Change-Id: Ic5e17298996b5fb085272425bb3b68583247aa34 Closes-Bug: #1777505
This commit is contained in:
parent
5e3a294210
commit
e95f2a3664
46
lib/neutron
46
lib/neutron
@ -325,25 +325,27 @@ function configure_neutron_rootwrap {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Make Neutron-required changes to nova.conf
|
# Make Neutron-required changes to nova.conf
|
||||||
|
# Takes a single argument which is the config file to update.
|
||||||
function configure_neutron_nova_new {
|
function configure_neutron_nova_new {
|
||||||
iniset $NOVA_CONF DEFAULT use_neutron True
|
local conf="$1"
|
||||||
iniset $NOVA_CONF neutron auth_type "password"
|
iniset $conf DEFAULT use_neutron True
|
||||||
iniset $NOVA_CONF neutron auth_url "$KEYSTONE_SERVICE_URI"
|
iniset $conf neutron auth_type "password"
|
||||||
iniset $NOVA_CONF neutron username neutron
|
iniset $conf neutron auth_url "$KEYSTONE_SERVICE_URI"
|
||||||
iniset $NOVA_CONF neutron password "$SERVICE_PASSWORD"
|
iniset $conf neutron username neutron
|
||||||
iniset $NOVA_CONF neutron user_domain_name "Default"
|
iniset $conf neutron password "$SERVICE_PASSWORD"
|
||||||
iniset $NOVA_CONF neutron project_name "$SERVICE_TENANT_NAME"
|
iniset $conf neutron user_domain_name "Default"
|
||||||
iniset $NOVA_CONF neutron project_domain_name "Default"
|
iniset $conf neutron project_name "$SERVICE_TENANT_NAME"
|
||||||
iniset $NOVA_CONF neutron auth_strategy $NEUTRON_AUTH_STRATEGY
|
iniset $conf neutron project_domain_name "Default"
|
||||||
iniset $NOVA_CONF neutron region_name "$REGION_NAME"
|
iniset $conf neutron auth_strategy $NEUTRON_AUTH_STRATEGY
|
||||||
|
iniset $conf neutron region_name "$REGION_NAME"
|
||||||
|
|
||||||
iniset $NOVA_CONF DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
iniset $conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
||||||
|
|
||||||
# optionally set options in nova_conf
|
# optionally set options in nova_conf
|
||||||
neutron_plugin_create_nova_conf
|
neutron_plugin_create_nova_conf $conf
|
||||||
|
|
||||||
if is_service_enabled neutron-metadata-agent; then
|
if is_service_enabled neutron-metadata-agent; then
|
||||||
iniset $NOVA_CONF neutron service_metadata_proxy "True"
|
iniset $conf neutron service_metadata_proxy "True"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -568,9 +570,23 @@ function configure_neutron {
|
|||||||
function configure_neutron_nova {
|
function configure_neutron_nova {
|
||||||
if is_neutron_legacy_enabled; then
|
if is_neutron_legacy_enabled; then
|
||||||
# Call back to old function
|
# Call back to old function
|
||||||
create_nova_conf_neutron "$@"
|
create_nova_conf_neutron $NOVA_CONF
|
||||||
|
if [[ "${CELLSV2_SETUP}" == "superconductor" ]]; then
|
||||||
|
for i in $(seq 1 $NOVA_NUM_CELLS); do
|
||||||
|
local conf
|
||||||
|
conf=$(conductor_conf $i)
|
||||||
|
create_nova_conf_neutron $conf
|
||||||
|
done
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
configure_neutron_nova_new "$@"
|
configure_neutron_nova_new $NOVA_CONF
|
||||||
|
if [[ "${CELLSV2_SETUP}" == "superconductor" ]]; then
|
||||||
|
for i in $(seq 1 $NOVA_NUM_CELLS); do
|
||||||
|
local conf
|
||||||
|
conf=$(conductor_conf $i)
|
||||||
|
configure_neutron_nova_new $conf
|
||||||
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,31 +366,32 @@ function configure_mutnauq {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_nova_conf_neutron {
|
function create_nova_conf_neutron {
|
||||||
iniset $NOVA_CONF DEFAULT use_neutron True
|
local conf="$1"
|
||||||
iniset $NOVA_CONF neutron auth_type "password"
|
iniset $conf DEFAULT use_neutron True
|
||||||
iniset $NOVA_CONF neutron auth_url "$KEYSTONE_AUTH_URI"
|
iniset $conf neutron auth_type "password"
|
||||||
iniset $NOVA_CONF neutron username "$Q_ADMIN_USERNAME"
|
iniset $conf neutron auth_url "$KEYSTONE_AUTH_URI"
|
||||||
iniset $NOVA_CONF neutron password "$SERVICE_PASSWORD"
|
iniset $conf neutron username "$Q_ADMIN_USERNAME"
|
||||||
iniset $NOVA_CONF neutron user_domain_name "$SERVICE_DOMAIN_NAME"
|
iniset $conf neutron password "$SERVICE_PASSWORD"
|
||||||
iniset $NOVA_CONF neutron project_name "$SERVICE_PROJECT_NAME"
|
iniset $conf neutron user_domain_name "$SERVICE_DOMAIN_NAME"
|
||||||
iniset $NOVA_CONF neutron project_domain_name "$SERVICE_DOMAIN_NAME"
|
iniset $conf neutron project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset $NOVA_CONF neutron auth_strategy "$Q_AUTH_STRATEGY"
|
iniset $conf neutron project_domain_name "$SERVICE_DOMAIN_NAME"
|
||||||
iniset $NOVA_CONF neutron region_name "$REGION_NAME"
|
iniset $conf neutron auth_strategy "$Q_AUTH_STRATEGY"
|
||||||
|
iniset $conf neutron region_name "$REGION_NAME"
|
||||||
|
|
||||||
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
|
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
|
||||||
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
||||||
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
|
iniset $conf DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# optionally set options in nova_conf
|
# optionally set options in nova_conf
|
||||||
neutron_plugin_create_nova_conf
|
neutron_plugin_create_nova_conf $conf
|
||||||
|
|
||||||
if is_service_enabled q-meta; then
|
if is_service_enabled q-meta; then
|
||||||
iniset $NOVA_CONF neutron service_metadata_proxy "True"
|
iniset $conf neutron service_metadata_proxy "True"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iniset $NOVA_CONF DEFAULT vif_plugging_is_fatal "$VIF_PLUGGING_IS_FATAL"
|
iniset $conf DEFAULT vif_plugging_is_fatal "$VIF_PLUGGING_IS_FATAL"
|
||||||
iniset $NOVA_CONF DEFAULT vif_plugging_timeout "$VIF_PLUGGING_TIMEOUT"
|
iniset $conf DEFAULT vif_plugging_timeout "$VIF_PLUGGING_TIMEOUT"
|
||||||
}
|
}
|
||||||
|
|
||||||
# create_mutnauq_accounts() - Set up common required neutron accounts
|
# create_mutnauq_accounts() - Set up common required neutron accounts
|
||||||
|
@ -8,10 +8,11 @@ _XTRACE_NEUTRON_NU=$(set +o | grep xtrace)
|
|||||||
set +o xtrace
|
set +o xtrace
|
||||||
|
|
||||||
function neutron_plugin_create_nova_conf {
|
function neutron_plugin_create_nova_conf {
|
||||||
|
local conf="$1"
|
||||||
NOVA_OVS_BRIDGE=${NOVA_OVS_BRIDGE:-"br-int"}
|
NOVA_OVS_BRIDGE=${NOVA_OVS_BRIDGE:-"br-int"}
|
||||||
iniset $NOVA_CONF neutron ovs_bridge $NOVA_OVS_BRIDGE
|
iniset $conf neutron ovs_bridge $NOVA_OVS_BRIDGE
|
||||||
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
||||||
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
|
iniset $conf DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
|
||||||
}
|
}
|
||||||
|
|
||||||
function neutron_plugin_install_agent_packages {
|
function neutron_plugin_install_agent_packages {
|
||||||
|
Loading…
Reference in New Issue
Block a user