diff --git a/packstack/plugins/nova_300.py b/packstack/plugins/nova_300.py index cf7cc93b6..00e3845bf 100644 --- a/packstack/plugins/nova_300.py +++ b/packstack/plugins/nova_300.py @@ -269,7 +269,7 @@ def initSequences(controller): {'title': 'Adding Nova Common manifest entries', 'functions':[createcommonmanifest]}, ] - if controller.CONF['CONFIG_QUANTUM_INSTALL']: + if controller.CONF['CONFIG_QUANTUM_INSTALL'] == 'y': novaapisteps.append({'title': 'Adding Openstack Network-related Nova manifest entries', 'functions':[createquantummanifest]}) else: novaapisteps.append({'title': 'Adding Nova Network manifest entries', 'functions':[createnetworkmanifest]}) @@ -278,6 +278,16 @@ def initSequences(controller): def createapimanifest(config): + # This is a hack around us needing to generate the quantum metadata + # password, but the nova puppet plugin uses the existence of that + # password to determine whether or not to configure quantum metadata + # proxy support. So the nova_api.pp template needs unquoted 'undef' + # to disable metadata support if quantum is not being installed. + if controller.CONF['CONFIG_QUANTUM_INSTALL'] != 'y': + controller.CONF['CONFIG_QUANTUM_METADATA_PW_UNQUOTED'] = 'undef' + else: + controller.CONF['CONFIG_QUANTUM_METADATA_PW_UNQUOTED'] = \ + "'%s'" % controller.CONF['CONFIG_QUANTUM_METADATA_PW'] manifestfile = "%s_api_nova.pp"%controller.CONF['CONFIG_NOVA_API_HOST'] manifestdata = getManifestTemplate("nova_api.pp") appendManifestFile(manifestfile, manifestdata, 'novaapi') diff --git a/packstack/puppet/modules/nova b/packstack/puppet/modules/nova index 3eac0fd0c..f1e12e156 160000 --- a/packstack/puppet/modules/nova +++ b/packstack/puppet/modules/nova @@ -1 +1 @@ -Subproject commit 3eac0fd0cc7840bb89049d47fafb78e931afc30f +Subproject commit f1e12e15644516f16015676d683205922854a5bd diff --git a/packstack/puppet/modules/quantum b/packstack/puppet/modules/quantum index f45be92f3..9bda3b472 160000 --- a/packstack/puppet/modules/quantum +++ b/packstack/puppet/modules/quantum @@ -1 +1 @@ -Subproject commit f45be92f341bb5300eb96a0ca98abd281128beab +Subproject commit 9bda3b47265c1e83fbe957af02295ebe1c96fce5 diff --git a/packstack/puppet/templates/nova_api.pp b/packstack/puppet/templates/nova_api.pp index 7eba682c7..40dc43b8e 100644 --- a/packstack/puppet/templates/nova_api.pp +++ b/packstack/puppet/templates/nova_api.pp @@ -4,6 +4,7 @@ class {"nova::api": enabled => true, auth_host => "%(CONFIG_KEYSTONE_HOST)s", admin_password => "%(CONFIG_NOVA_KS_PW)s", + quantum_metadata_proxy_shared_secret => %(CONFIG_QUANTUM_METADATA_PW_UNQUOTED)s } Package<| title == 'nova-common' |> -> Class['nova::api'] diff --git a/packstack/puppet/templates/nova_quantum.pp b/packstack/puppet/templates/nova_quantum.pp index dc328fd25..0e0af75ab 100644 --- a/packstack/puppet/templates/nova_quantum.pp +++ b/packstack/puppet/templates/nova_quantum.pp @@ -8,10 +8,5 @@ class {"nova::network::quantum": } class {"nova::compute::quantum": - libvirt_vif_driver => "nova.virt.libvirt.vif.LibvirtGenericVifDriver", -} - -nova_config { - 'DEFAULT/service_quantum_metadata_proxy': value => 'True'; - 'DEFAULT/quantum_metadata_proxy_shared_secret': value => '%(CONFIG_QUANTUM_METADATA_PW)s'; + libvirt_vif_driver => "nova.virt.libvirt.vif.LibvirtGenericVIFDriver", }