Convert all calls to add_nova_opt to use
iniset $NOVA_CONF DEFAULT
Convert baremetal options to use
iniset $NOVA_CONF baremetal
Change-Id: I03ce2149e1f3abc2feb40c156c50de7dabaf47a2
... | ... |
@@ -354,73 +354,73 @@ function create_nova_conf() { |
354 | 354 |
# (Re)create ``nova.conf`` |
355 | 355 |
rm -f $NOVA_CONF |
356 | 356 |
add_nova_opt "[DEFAULT]" |
357 |
- add_nova_opt "verbose=True" |
|
358 |
- add_nova_opt "auth_strategy=keystone" |
|
359 |
- add_nova_opt "allow_resize_to_same_host=True" |
|
360 |
- add_nova_opt "api_paste_config=$NOVA_API_PASTE_INI" |
|
361 |
- add_nova_opt "rootwrap_config=$NOVA_CONF_DIR/rootwrap.conf" |
|
362 |
- add_nova_opt "compute_scheduler_driver=$SCHEDULER" |
|
363 |
- add_nova_opt "dhcpbridge_flagfile=$NOVA_CONF" |
|
364 |
- add_nova_opt "force_dhcp_release=True" |
|
365 |
- add_nova_opt "fixed_range=$FIXED_RANGE" |
|
366 |
- add_nova_opt "default_floating_pool=$PUBLIC_NETWORK_NAME" |
|
367 |
- add_nova_opt "s3_host=$SERVICE_HOST" |
|
368 |
- add_nova_opt "s3_port=$S3_SERVICE_PORT" |
|
369 |
- add_nova_opt "osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions" |
|
370 |
- add_nova_opt "my_ip=$HOST_IP" |
|
357 |
+ iniset $NOVA_CONF DEFAULT verbose "True" |
|
358 |
+ iniset $NOVA_CONF DEFAULT auth_strategy "keystone" |
|
359 |
+ iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True" |
|
360 |
+ iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI" |
|
361 |
+ iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf" |
|
362 |
+ iniset $NOVA_CONF DEFAULT compute_scheduler_driver "$SCHEDULER" |
|
363 |
+ iniset $NOVA_CONF DEFAULT dhcpbridge_flagfile "$NOVA_CONF" |
|
364 |
+ iniset $NOVA_CONF DEFAULT force_dhcp_release "True" |
|
365 |
+ iniset $NOVA_CONF DEFAULT fixed_range "$FIXED_RANGE" |
|
366 |
+ iniset $NOVA_CONF DEFAULT default_floating_pool "$PUBLIC_NETWORK_NAME" |
|
367 |
+ iniset $NOVA_CONF DEFAULT s3_host "$SERVICE_HOST" |
|
368 |
+ iniset $NOVA_CONF DEFAULT s3_port "$S3_SERVICE_PORT" |
|
369 |
+ iniset $NOVA_CONF DEFAULT osapi_compute_extension "nova.api.openstack.compute.contrib.standard_extensions" |
|
370 |
+ iniset $NOVA_CONF DEFAULT my_ip "$HOST_IP" |
|
371 | 371 |
local dburl |
372 | 372 |
database_connection_url dburl nova |
373 |
- add_nova_opt "sql_connection=$dburl" |
|
373 |
+ iniset $NOVA_CONF DEFAULT sql_connection "$dburl" |
|
374 | 374 |
if is_baremetal; then |
375 | 375 |
database_connection_url dburl nova_bm |
376 |
- add_nova_opt "baremetal_sql_connection=$dburl" |
|
376 |
+ iniset $NOVA_CONF baremetal sql_connection $dburl |
|
377 | 377 |
fi |
378 |
- add_nova_opt "libvirt_type=$LIBVIRT_TYPE" |
|
379 |
- add_nova_opt "libvirt_cpu_mode=none" |
|
380 |
- add_nova_opt "instance_name_template=${INSTANCE_NAME_PREFIX}%08x" |
|
378 |
+ iniset $NOVA_CONF DEFAULT libvirt_type "$LIBVIRT_TYPE" |
|
379 |
+ iniset $NOVA_CONF DEFAULT libvirt_cpu_mode "none" |
|
380 |
+ iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x" |
|
381 | 381 |
|
382 | 382 |
if is_service_enabled n-api; then |
383 |
- add_nova_opt "enabled_apis=$NOVA_ENABLED_APIS" |
|
383 |
+ iniset $NOVA_CONF DEFAULT enabled_apis "$NOVA_ENABLED_APIS" |
|
384 | 384 |
if is_service_enabled tls-proxy; then |
385 | 385 |
# Set the service port for a proxy to take the original |
386 |
- add_nova_opt "osapi_compute_listen_port=$NOVA_SERVICE_PORT_INT" |
|
386 |
+ iniset $NOVA_CONF DEFAULT osapi_compute_listen_port "$NOVA_SERVICE_PORT_INT" |
|
387 | 387 |
fi |
388 | 388 |
fi |
389 | 389 |
if is_service_enabled cinder; then |
390 |
- add_nova_opt "volume_api_class=nova.volume.cinder.API" |
|
390 |
+ iniset $NOVA_CONF DEFAULT volume_api_class "nova.volume.cinder.API" |
|
391 | 391 |
fi |
392 | 392 |
if [ -n "$NOVA_STATE_PATH" ]; then |
393 |
- add_nova_opt "state_path=$NOVA_STATE_PATH" |
|
394 |
- add_nova_opt "lock_path=$NOVA_STATE_PATH" |
|
393 |
+ iniset $NOVA_CONF DEFAULT state_path "$NOVA_STATE_PATH" |
|
394 |
+ iniset $NOVA_CONF DEFAULT lock_path "$NOVA_STATE_PATH" |
|
395 | 395 |
fi |
396 | 396 |
if [ -n "$NOVA_INSTANCES_PATH" ]; then |
397 |
- add_nova_opt "instances_path=$NOVA_INSTANCES_PATH" |
|
397 |
+ iniset $NOVA_CONF DEFAULT instances_path "$NOVA_INSTANCES_PATH" |
|
398 | 398 |
fi |
399 | 399 |
if [ "$MULTI_HOST" != "False" ]; then |
400 |
- add_nova_opt "multi_host=True" |
|
401 |
- add_nova_opt "send_arp_for_ha=True" |
|
400 |
+ iniset $NOVA_CONF DEFAULT multi_host "True" |
|
401 |
+ iniset $NOVA_CONF DEFAULT send_arp_for_ha "True" |
|
402 | 402 |
fi |
403 | 403 |
if [ "$SYSLOG" != "False" ]; then |
404 |
- add_nova_opt "use_syslog=True" |
|
404 |
+ iniset $NOVA_CONF DEFAULT use_syslog "True" |
|
405 | 405 |
fi |
406 | 406 |
if [ "$API_RATE_LIMIT" != "True" ]; then |
407 |
- add_nova_opt "api_rate_limit=False" |
|
407 |
+ iniset $NOVA_CONF DEFAULT api_rate_limit "False" |
|
408 | 408 |
fi |
409 | 409 |
if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then |
410 | 410 |
# Add color to logging output |
411 |
- add_nova_opt "logging_context_format_string=%(asctime)s.%(msecs)d %(color)s%(levelname)s %(name)s [[01;36m%(request_id)s [00;36m%(user_name)s %(project_name)s%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
412 |
- add_nova_opt "logging_default_format_string=%(asctime)s.%(msecs)d %(color)s%(levelname)s %(name)s [[00;36m-%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
413 |
- add_nova_opt "logging_debug_format_suffix=[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d[00m" |
|
414 |
- add_nova_opt "logging_exception_prefix=%(color)s%(asctime)s.%(msecs)d TRACE %(name)s [01;35m%(instance)s[00m" |
|
411 |
+ iniset $NOVA_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)d %(color)s%(levelname)s %(name)s [[01;36m%(request_id)s [00;36m%(user_name)s %(project_name)s%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
412 |
+ iniset $NOVA_CONF DEFAULT logging_default_format_string "%(asctime)s.%(msecs)d %(color)s%(levelname)s %(name)s [[00;36m-%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m" |
|
413 |
+ iniset $NOVA_CONF DEFAULT logging_debug_format_suffix "[00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d[00m" |
|
414 |
+ iniset $NOVA_CONF DEFAULT logging_exception_prefix "%(color)s%(asctime)s.%(msecs)d TRACE %(name)s [01;35m%(instance)s[00m" |
|
415 | 415 |
else |
416 | 416 |
# Show user_name and project_name instead of user_id and project_id |
417 |
- add_nova_opt "logging_context_format_string=%(asctime)s.%(msecs)d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" |
|
417 |
+ iniset $NOVA_CONF DEFAULT logging_context_format_string "%(asctime)s.%(msecs)d %(levelname)s %(name)s [%(request_id)s %(user_name)s %(project_name)s] %(instance)s%(message)s" |
|
418 | 418 |
fi |
419 | 419 |
if is_service_enabled ceilometer; then |
420 |
- add_nova_opt "instance_usage_audit=True" |
|
421 |
- add_nova_opt "instance_usage_audit_period=hour" |
|
422 |
- add_nova_opt "notification_driver=nova.openstack.common.notifier.rpc_notifier" |
|
423 |
- add_nova_opt "notification_driver=ceilometer.compute.nova_notifier" |
|
420 |
+ iniset $NOVA_CONF DEFAULT instance_usage_audit "True" |
|
421 |
+ iniset $NOVA_CONF DEFAULT instance_usage_audit_period "hour" |
|
422 |
+ iniset $NOVA_CONF DEFAULT notification_driver "nova.openstack.common.notifier.rpc_notifier" |
|
423 |
+ iniset $NOVA_CONF DEFAULT notification_driver "ceilometer.compute.nova_notifier" |
|
424 | 424 |
fi |
425 | 425 |
|
426 | 426 |
|
... | ... |
@@ -433,17 +433,17 @@ function create_nova_conf() { |
433 | 433 |
# For Example: ``EXTRA_OPTS=(foo=true bar=2)`` |
434 | 434 |
for I in "${EXTRA_OPTS[@]}"; do |
435 | 435 |
# Attempt to convert flags to options |
436 |
- add_nova_opt ${I//--} |
|
436 |
+ iniset $NOVA_CONF DEFAULT ${I//=/ } |
|
437 | 437 |
done |
438 | 438 |
} |
439 | 439 |
|
440 | 440 |
function create_nova_conf_nova_network() { |
441 |
- add_nova_opt "network_manager=nova.network.manager.$NET_MAN" |
|
442 |
- add_nova_opt "public_interface=$PUBLIC_INTERFACE" |
|
443 |
- add_nova_opt "vlan_interface=$VLAN_INTERFACE" |
|
444 |
- add_nova_opt "flat_network_bridge=$FLAT_NETWORK_BRIDGE" |
|
441 |
+ iniset $NOVA_CONF DEFAULT network_manager "nova.network.manager.$NET_MAN" |
|
442 |
+ iniset $NOVA_CONF DEFAULT public_interface "$PUBLIC_INTERFACE" |
|
443 |
+ iniset $NOVA_CONF DEFAULT vlan_interface "$VLAN_INTERFACE" |
|
444 |
+ iniset $NOVA_CONF DEFAULT flat_network_bridge "$FLAT_NETWORK_BRIDGE" |
|
445 | 445 |
if [ -n "$FLAT_INTERFACE" ]; then |
446 |
- add_nova_opt "flat_interface=$FLAT_INTERFACE" |
|
446 |
+ iniset $NOVA_CONF DEFAULT flat_interface "$FLAT_INTERFACE" |
|
447 | 447 |
fi |
448 | 448 |
} |
449 | 449 |
|
... | ... |
@@ -200,13 +200,13 @@ function configure_quantum() { |
200 | 200 |
} |
201 | 201 |
|
202 | 202 |
function create_nova_conf_quantum() { |
203 |
- add_nova_opt "network_api_class=nova.network.quantumv2.api.API" |
|
204 |
- add_nova_opt "quantum_admin_username=$Q_ADMIN_USERNAME" |
|
205 |
- add_nova_opt "quantum_admin_password=$SERVICE_PASSWORD" |
|
206 |
- add_nova_opt "quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0" |
|
207 |
- add_nova_opt "quantum_auth_strategy=$Q_AUTH_STRATEGY" |
|
208 |
- add_nova_opt "quantum_admin_tenant_name=$SERVICE_TENANT_NAME" |
|
209 |
- add_nova_opt "quantum_url=http://$Q_HOST:$Q_PORT" |
|
203 |
+ iniset $NOVA_CONF DEFAULT network_api_class "nova.network.quantumv2.api.API" |
|
204 |
+ iniset $NOVA_CONF DEFAULT quantum_admin_username "$Q_ADMIN_USERNAME" |
|
205 |
+ iniset $NOVA_CONF DEFAULT quantum_admin_password "$SERVICE_PASSWORD" |
|
206 |
+ iniset $NOVA_CONF DEFAULT quantum_admin_auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0" |
|
207 |
+ iniset $NOVA_CONF DEFAULT quantum_auth_strategy "$Q_AUTH_STRATEGY" |
|
208 |
+ iniset $NOVA_CONF DEFAULT quantum_admin_tenant_name "$SERVICE_TENANT_NAME" |
|
209 |
+ iniset $NOVA_CONF DEFAULT quantum_url "http://$Q_HOST:$Q_PORT" |
|
210 | 210 |
|
211 | 211 |
if [[ "$Q_PLUGIN" = "openvswitch" ]]; then |
212 | 212 |
NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver"} |
... | ... |
@@ -214,14 +214,14 @@ function create_nova_conf_quantum() { |
214 | 214 |
NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver"} |
215 | 215 |
elif [[ "$Q_PLUGIN" = "ryu" ]]; then |
216 | 216 |
NOVA_VIF_DRIVER=${NOVA_VIF_DRIVER:-"quantum.plugins.ryu.nova.vif.LibvirtOpenVswitchOFPRyuDriver"} |
217 |
- add_nova_opt "libvirt_ovs_integration_bridge=$OVS_BRIDGE" |
|
218 |
- add_nova_opt "linuxnet_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
219 |
- add_nova_opt "libvirt_ovs_ryu_api_host=$RYU_API_HOST:$RYU_API_PORT" |
|
217 |
+ iniset $NOVA_CONF DEFAULT libvirt_ovs_integration_bridge "$OVS_BRIDGE" |
|
218 |
+ iniset $NOVA_CONF DEFAULT linuxnet_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT" |
|
219 |
+ iniset $NOVA_CONF DEFAULT libvirt_ovs_ryu_api_host "$RYU_API_HOST:$RYU_API_PORT" |
|
220 | 220 |
fi |
221 |
- add_nova_opt "libvirt_vif_driver=$NOVA_VIF_DRIVER" |
|
222 |
- add_nova_opt "linuxnet_interface_driver=$LINUXNET_VIF_DRIVER" |
|
221 |
+ iniset $NOVA_CONF DEFAULT libvirt_vif_driver "$NOVA_VIF_DRIVER" |
|
222 |
+ iniset $NOVA_CONF DEFAULT linuxnet_interface_driver "$LINUXNET_VIF_DRIVER" |
|
223 | 223 |
if is_service_enabled q-meta; then |
224 |
- add_nova_opt "service_quantum_metadata_proxy=True" |
|
224 |
+ iniset $NOVA_CONF DEFAULT service_quantum_metadata_proxy "True" |
|
225 | 225 |
fi |
226 | 226 |
} |
227 | 227 |
|
... | ... |
@@ -1059,9 +1059,9 @@ if is_service_enabled nova; then |
1059 | 1059 |
# These settings don't hurt anything if n-xvnc and n-novnc are disabled |
1060 | 1060 |
if is_service_enabled n-cpu; then |
1061 | 1061 |
NOVNCPROXY_URL=${NOVNCPROXY_URL:-"http://$SERVICE_HOST:6080/vnc_auto.html"} |
1062 |
- add_nova_opt "novncproxy_base_url=$NOVNCPROXY_URL" |
|
1062 |
+ iniset $NOVA_CONF DEFAULT novncproxy_base_url "$NOVNCPROXY_URL" |
|
1063 | 1063 |
XVPVNCPROXY_URL=${XVPVNCPROXY_URL:-"http://$SERVICE_HOST:6081/console"} |
1064 |
- add_nova_opt "xvpvncproxy_base_url=$XVPVNCPROXY_URL" |
|
1064 |
+ iniset $NOVA_CONF DEFAULT xvpvncproxy_base_url "$XVPVNCPROXY_URL" |
|
1065 | 1065 |
fi |
1066 | 1066 |
if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
1067 | 1067 |
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1} |
... | ... |
@@ -1071,18 +1071,18 @@ if is_service_enabled nova; then |
1071 | 1071 |
# Address on which instance vncservers will listen on compute hosts. |
1072 | 1072 |
# For multi-host, this should be the management ip of the compute host. |
1073 | 1073 |
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1} |
1074 |
- add_nova_opt "vncserver_listen=$VNCSERVER_LISTEN" |
|
1075 |
- add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS" |
|
1076 |
- add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST" |
|
1074 |
+ iniset $NOVA_CONF DEFAULT vncserver_listen "$VNCSERVER_LISTEN" |
|
1075 |
+ iniset $NOVA_CONF DEFAULT vncserver_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS" |
|
1076 |
+ iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST" |
|
1077 | 1077 |
if is_service_enabled zeromq; then |
1078 |
- add_nova_opt "rpc_backend=nova.openstack.common.rpc.impl_zmq" |
|
1078 |
+ iniset $NOVA_CONF DEFAULT rpc_backend "nova.openstack.common.rpc.impl_zmq" |
|
1079 | 1079 |
elif is_service_enabled qpid; then |
1080 |
- add_nova_opt "rpc_backend=nova.rpc.impl_qpid" |
|
1080 |
+ iniset $NOVA_CONF DEFAULT rpc_backend "nova.rpc.impl_qpid" |
|
1081 | 1081 |
elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
1082 |
- add_nova_opt "rabbit_host=$RABBIT_HOST" |
|
1083 |
- add_nova_opt "rabbit_password=$RABBIT_PASSWORD" |
|
1082 |
+ iniset $NOVA_CONF DEFAULT rabbit_host "$RABBIT_HOST" |
|
1083 |
+ iniset $NOVA_CONF DEFAULT rabbit_password "$RABBIT_PASSWORD" |
|
1084 | 1084 |
fi |
1085 |
- add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT" |
|
1085 |
+ iniset $NOVA_CONF DEFAULT glance_api_servers "$GLANCE_HOSTPORT" |
|
1086 | 1086 |
|
1087 | 1087 |
|
1088 | 1088 |
# XenServer |
... | ... |
@@ -1091,16 +1091,16 @@ if is_service_enabled nova; then |
1091 | 1091 |
if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
1092 | 1092 |
echo_summary "Using XenServer virtualization driver" |
1093 | 1093 |
read_password XENAPI_PASSWORD "ENTER A PASSWORD TO USE FOR XEN." |
1094 |
- add_nova_opt "compute_driver=xenapi.XenAPIDriver" |
|
1094 |
+ iniset $NOVA_CONF DEFAULT compute_driver "xenapi.XenAPIDriver" |
|
1095 | 1095 |
XENAPI_CONNECTION_URL=${XENAPI_CONNECTION_URL:-"http://169.254.0.1"} |
1096 | 1096 |
XENAPI_USER=${XENAPI_USER:-"root"} |
1097 |
- add_nova_opt "xenapi_connection_url=$XENAPI_CONNECTION_URL" |
|
1098 |
- add_nova_opt "xenapi_connection_username=$XENAPI_USER" |
|
1099 |
- add_nova_opt "xenapi_connection_password=$XENAPI_PASSWORD" |
|
1100 |
- add_nova_opt "flat_injected=False" |
|
1097 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_url "$XENAPI_CONNECTION_URL" |
|
1098 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_username "$XENAPI_USER" |
|
1099 |
+ iniset $NOVA_CONF DEFAULT xenapi_connection_password "$XENAPI_PASSWORD" |
|
1100 |
+ iniset $NOVA_CONF DEFAULT flat_injected "False" |
|
1101 | 1101 |
# Need to avoid crash due to new firewall support |
1102 | 1102 |
XEN_FIREWALL_DRIVER=${XEN_FIREWALL_DRIVER:-"nova.virt.firewall.IptablesFirewallDriver"} |
1103 |
- add_nova_opt "firewall_driver=$XEN_FIREWALL_DRIVER" |
|
1103 |
+ iniset $NOVA_CONF DEFAULT firewall_driver "$XEN_FIREWALL_DRIVER" |
|
1104 | 1104 |
|
1105 | 1105 |
# OpenVZ |
1106 | 1106 |
# ------ |
... | ... |
@@ -1109,34 +1109,34 @@ if is_service_enabled nova; then |
1109 | 1109 |
echo_summary "Using OpenVZ virtualization driver" |
1110 | 1110 |
# TODO(deva): OpenVZ driver does not yet work if compute_driver is set here. |
1111 | 1111 |
# Replace connection_type when this is fixed. |
1112 |
- # add_nova_opt "compute_driver=openvz.connection.OpenVzConnection" |
|
1113 |
- add_nova_opt "connection_type=openvz" |
|
1112 |
+ # iniset $NOVA_CONF DEFAULT compute_driver "openvz.connection.OpenVzConnection" |
|
1113 |
+ iniset $NOVA_CONF DEFAULT connection_type "openvz" |
|
1114 | 1114 |
LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"} |
1115 |
- add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
1115 |
+ iniset $NOVA_CONF DEFAULT firewall_driver "$LIBVIRT_FIREWALL_DRIVER" |
|
1116 | 1116 |
|
1117 | 1117 |
# Bare Metal |
1118 | 1118 |
# ---------- |
1119 | 1119 |
|
1120 | 1120 |
elif [ "$VIRT_DRIVER" = 'baremetal' ]; then |
1121 | 1121 |
echo_summary "Using BareMetal driver" |
1122 |
- add_nova_opt "compute_driver=nova.virt.baremetal.driver.BareMetalDriver" |
|
1123 | 1122 |
LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"} |
1124 |
- add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
1125 |
- add_nova_opt "baremetal_driver=$BM_DRIVER" |
|
1126 |
- add_nova_opt "baremetal_tftp_root=/tftpboot" |
|
1127 |
- add_nova_opt "baremetal_instance_type_extra_specs=cpu_arch:$BM_CPU_ARCH" |
|
1128 |
- add_nova_opt "baremetal_power_manager=$BM_POWER_MANAGER" |
|
1129 |
- add_nova_opt "scheduler_host_manager=nova.scheduler.baremetal_host_manager.BaremetalHostManager" |
|
1130 |
- add_nova_opt "scheduler_default_filters=AllHostsFilter" |
|
1123 |
+ iniset $NOVA_CONF DEFAULT compute_driver nova.virt.baremetal.driver.BareMetalDriver |
|
1124 |
+ iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER |
|
1125 |
+ iniset $NOVA_CONF DEFAULT scheduler_host_manager nova.scheduler.baremetal_host_manager.BaremetalHostManager |
|
1126 |
+ iniset $NOVA_CONF DEFAULT scheduler_default_filters AllHostsFilter |
|
1127 |
+ iniset $NOVA_CONF baremetal driver $BM_DRIVER |
|
1128 |
+ iniset $NOVA_CONF baremetal instance_type_extra_specs cpu_arch:$BM_CPU_ARCH |
|
1129 |
+ iniset $NOVA_CONF baremetal power_manager $BM_POWER_MANAGER |
|
1130 |
+ iniset $NOVA_CONF baremetal tftp_root /tftpboot |
|
1131 | 1131 |
|
1132 | 1132 |
# Default |
1133 | 1133 |
# ------- |
1134 | 1134 |
|
1135 | 1135 |
else |
1136 | 1136 |
echo_summary "Using libvirt virtualization driver" |
1137 |
- add_nova_opt "compute_driver=libvirt.LibvirtDriver" |
|
1137 |
+ iniset $NOVA_CONF DEFAULT compute_driver "libvirt.LibvirtDriver" |
|
1138 | 1138 |
LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.libvirt.firewall.IptablesFirewallDriver"} |
1139 |
- add_nova_opt "firewall_driver=$LIBVIRT_FIREWALL_DRIVER" |
|
1139 |
+ iniset $NOVA_CONF DEFAULT firewall_driver "$LIBVIRT_FIREWALL_DRIVER" |
|
1140 | 1140 |
fi |
1141 | 1141 |
fi |
1142 | 1142 |
|
... | ... |
@@ -1174,9 +1174,9 @@ if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nov |
1174 | 1174 |
CREDS=$(keystone ec2-credentials-create --user_id $NOVA_USER_ID --tenant_id $NOVA_TENANT_ID) |
1175 | 1175 |
ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }') |
1176 | 1176 |
SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }') |
1177 |
- add_nova_opt "s3_access_key=$ACCESS_KEY" |
|
1178 |
- add_nova_opt "s3_secret_key=$SECRET_KEY" |
|
1179 |
- add_nova_opt "s3_affix_tenant=True" |
|
1177 |
+ iniset $NOVA_CONF DEFAULT s3_access_key "$ACCESS_KEY" |
|
1178 |
+ iniset $NOVA_CONF DEFAULT s3_secret_key "$SECRET_KEY" |
|
1179 |
+ iniset $NOVA_CONF DEFAULT s3_affix_tenant "True" |
|
1180 | 1180 |
fi |
1181 | 1181 |
|
1182 | 1182 |
screen_it zeromq "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-rpc-zmq-receiver" |