diff --git a/0001-Change-default-documentation-URL.patch b/0001-Change-default-documentation-URL.patch index 6e8d98a..136ca37 100644 --- a/0001-Change-default-documentation-URL.patch +++ b/0001-Change-default-documentation-URL.patch @@ -1,4 +1,4 @@ -From 3b5392574ac430dfd8bd71b7a56e39c3f9fc965a Mon Sep 17 00:00:00 2001 +From 255ae136abc0885874afa5de6bbe1d6e9d81c5c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Fri, 3 Oct 2014 19:18:45 +0200 Subject: [PATCH] Change default documentation URL diff --git a/0002-Fix-support-for-puppet-4.patch b/0002-Fix-support-for-puppet-4.patch index bcbc8fb..2a36bb1 100644 --- a/0002-Fix-support-for-puppet-4.patch +++ b/0002-Fix-support-for-puppet-4.patch @@ -1,4 +1,4 @@ -From 877de563d71a8efb83b3df4a5768d04095c77826 Mon Sep 17 00:00:00 2001 +From 9bef3fe3465b15c85a3f7f0b28725ec979e87944 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Tue, 16 Jun 2015 14:09:51 +0200 Subject: [PATCH] Fix support for puppet 4 diff --git a/0003-Rabbitmq-set-repos_ensure-to-false.patch b/0003-Rabbitmq-set-repos_ensure-to-false.patch index 089841a..26fd5fc 100644 --- a/0003-Rabbitmq-set-repos_ensure-to-false.patch +++ b/0003-Rabbitmq-set-repos_ensure-to-false.patch @@ -1,4 +1,4 @@ -From 2bf460b585bb5a857977315b9a74bad2ad8576d9 Mon Sep 17 00:00:00 2001 +From ff6719f76e307b68e2d4914dfe7aa2affaadd116 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Wed, 17 Jun 2015 14:38:23 +0200 Subject: [PATCH] [Rabbitmq] set repos_ensure to false diff --git a/0004-Setup-SELinux-booleans-if-running-in-httpd.patch b/0004-Setup-SELinux-booleans-if-running-in-httpd.patch index 2cfc8de..13b7683 100644 --- a/0004-Setup-SELinux-booleans-if-running-in-httpd.patch +++ b/0004-Setup-SELinux-booleans-if-running-in-httpd.patch @@ -1,4 +1,4 @@ -From 733c9da99d8079f1a405147e09b2e704c21b14e3 Mon Sep 17 00:00:00 2001 +From 034196f6d61312d0cb218691d80c0e1ffadd4842 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Mon, 13 Jul 2015 17:39:39 +0200 Subject: [PATCH] Setup SELinux booleans if running in httpd diff --git a/0005-Remove-trove-ubuntu-package-hack.patch b/0005-Remove-trove-ubuntu-package-hack.patch index 0dcb421..7f550d8 100644 --- a/0005-Remove-trove-ubuntu-package-hack.patch +++ b/0005-Remove-trove-ubuntu-package-hack.patch @@ -1,4 +1,4 @@ -From 64611290adcf0aa98964b1225d16884fcc316ba5 Mon Sep 17 00:00:00 2001 +From 36f2a203eede5c8fd1bded6c7842b9d197add882 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Tue, 8 Sep 2015 14:10:29 +0200 Subject: [PATCH] Remove trove ubuntu package hack @@ -16,7 +16,7 @@ Change-Id: Id447a47a056a41d8c98b01d6769f4121a36d7aae 5 files changed, 7 insertions(+), 52 deletions(-) diff --git a/trove/manifests/api.pp b/trove/manifests/api.pp -index d54351b..955ce92 100644 +index 2d5d4df..4c397d3 100644 --- a/trove/manifests/api.pp +++ b/trove/manifests/api.pp @@ -176,16 +176,9 @@ class trove::api( @@ -38,7 +38,7 @@ index d54351b..955ce92 100644 if $::trove::database_connection { if($::trove::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) { diff --git a/trove/manifests/conductor.pp b/trove/manifests/conductor.pp -index b2c788d..383138a 100644 +index 7ef7efb..f5f327e 100644 --- a/trove/manifests/conductor.pp +++ b/trove/manifests/conductor.pp @@ -66,16 +66,9 @@ class trove::conductor( @@ -71,7 +71,7 @@ index 97d69db..9d3f947 100644 } } diff --git a/trove/manifests/guestagent.pp b/trove/manifests/guestagent.pp -index 3feabc1..3f977a0 100644 +index ab770d0..089363f 100644 --- a/trove/manifests/guestagent.pp +++ b/trove/manifests/guestagent.pp @@ -71,16 +71,9 @@ class trove::guestagent( @@ -93,7 +93,7 @@ index 3feabc1..3f977a0 100644 # basic service config trove_guestagent_config { diff --git a/trove/manifests/init.pp b/trove/manifests/init.pp -index d31cf1f..2455c12 100644 +index 734d77c..c5827ea 100644 --- a/trove/manifests/init.pp +++ b/trove/manifests/init.pp @@ -282,32 +282,9 @@ class trove( diff --git a/0006-Install-service-packages-on-api-nodes.patch b/0006-Install-service-packages-on-api-nodes.patch index 9ce71ef..b477733 100644 --- a/0006-Install-service-packages-on-api-nodes.patch +++ b/0006-Install-service-packages-on-api-nodes.patch @@ -1,4 +1,4 @@ -From b61fceb2c52fd4d920bd9b6b5e409ebb156a0e4d Mon Sep 17 00:00:00 2001 +From 0496e1dcb176aec940e7bac44462c2c2ee5b269c Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Sun, 12 Jul 2015 05:49:00 -0400 Subject: [PATCH] Install service packages on api nodes diff --git a/0007-Remove-installation-of-pm-utils.patch b/0007-Remove-installation-of-pm-utils.patch index 6eff8bf..e8e09e6 100644 --- a/0007-Remove-installation-of-pm-utils.patch +++ b/0007-Remove-installation-of-pm-utils.patch @@ -1,4 +1,4 @@ -From ed8a369101231e456b97667b53df73749d03b6e4 Mon Sep 17 00:00:00 2001 +From fbbadf1373e5a3e3d363f82b8e5cc860276d5a5d Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Thu, 10 Sep 2015 13:11:55 +0200 Subject: [PATCH] Remove installation of pm-utils diff --git a/0008-Explicitly-say-that-ovs_redhat-parent-is-ovs.patch b/0008-Explicitly-say-that-ovs_redhat-parent-is-ovs.patch index 47a80a5..8c5a337 100644 --- a/0008-Explicitly-say-that-ovs_redhat-parent-is-ovs.patch +++ b/0008-Explicitly-say-that-ovs_redhat-parent-is-ovs.patch @@ -1,4 +1,4 @@ -From fa1eadbd5845565b09387d280e1928b25c72a811 Mon Sep 17 00:00:00 2001 +From 4ca5cf5470613cbc68c6562afd66bf8e245aa6a8 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Mon, 8 Jun 2015 15:57:53 +0200 Subject: [PATCH] Explicitly say that ovs_redhat parent is ovs diff --git a/0009-Add-support-for-swift-object-expirer-service.patch b/0009-Add-support-for-swift-object-expirer-service.patch index 702e5ae..bfdb8a6 100644 --- a/0009-Add-support-for-swift-object-expirer-service.patch +++ b/0009-Add-support-for-swift-object-expirer-service.patch @@ -1,4 +1,4 @@ -From 01a40b0800b3fb48bde6c14cd01691b1278a63a0 Mon Sep 17 00:00:00 2001 +From 3f304c1c51d0bf9760443aae824fd69c8cf72d7d Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Thu, 10 Sep 2015 15:51:52 +0200 Subject: [PATCH] Add support for swift-object-expirer service diff --git a/0010-Simplify-rpc_backend-parameter.patch b/0010-Simplify-rpc_backend-parameter.patch new file mode 100644 index 0000000..130df9c --- /dev/null +++ b/0010-Simplify-rpc_backend-parameter.patch @@ -0,0 +1,113 @@ +From 9c63acee319489c380238125549b52f15dae9b61 Mon Sep 17 00:00:00 2001 +From: Javier Pena +Date: Fri, 9 Oct 2015 18:54:12 +0200 +Subject: [PATCH] Simplify rpc_backend parameter + +It is no longer necessary to specify the whole python namespace +for the backends, and +http://docs.openstack.org/developer/oslo.messaging/opts.html lists +the short versions. + +This patch maintains backwards compatibility with the previous +default value in case it is explicitly used. + +Change-Id: I33cf918e394bfed9e436a4a8c9efc1c1dcc2f22d +--- + cinder/manifests/init.pp | 8 ++++---- + cinder/spec/classes/cinder_spec.rb | 12 ++++++------ + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/cinder/manifests/init.pp b/cinder/manifests/init.pp +index a2391bf..5fa3a2b 100644 +--- a/cinder/manifests/init.pp ++++ b/cinder/manifests/init.pp +@@ -18,7 +18,7 @@ + # + # [*rpc_backend*] + # (Optional) Use these options to configure the RabbitMQ message system. +-# Defaults to 'cinder.openstack.common.rpc.impl_kombu' ++# Defaults to 'rabbit' + # + # [*control_exchange*] + # (Optional) +@@ -234,7 +234,7 @@ class cinder ( + $database_max_retries = undef, + $database_retry_interval = undef, + $database_max_overflow = undef, +- $rpc_backend = 'cinder.openstack.common.rpc.impl_kombu', ++ $rpc_backend = 'rabbit', + $control_exchange = 'openstack', + $rabbit_host = '127.0.0.1', + $rabbit_port = 5672, +@@ -307,7 +307,7 @@ class cinder ( + require => Anchor['cinder-start'], + } + +- if $rpc_backend == 'cinder.openstack.common.rpc.impl_kombu' { ++ if $rpc_backend == 'cinder.openstack.common.rpc.impl_kombu' or $rpc_backend == 'rabbit' { + + if ! $rabbit_password { + fail('Please specify a rabbit_password parameter.') +@@ -342,7 +342,7 @@ class cinder ( + + } + +- if $rpc_backend == 'cinder.openstack.common.rpc.impl_qpid' { ++ if $rpc_backend == 'cinder.openstack.common.rpc.impl_qpid' or $rpc_backend == 'qpid' { + + if ! $qpid_password { + fail('Please specify a qpid_password parameter.') +diff --git a/cinder/spec/classes/cinder_spec.rb b/cinder/spec/classes/cinder_spec.rb +index 8695d14..4a84d88 100644 +--- a/cinder/spec/classes/cinder_spec.rb ++++ b/cinder/spec/classes/cinder_spec.rb +@@ -22,7 +22,7 @@ describe 'cinder' do + it { is_expected.to contain_class('mysql::bindings::python') } + + it 'should contain default config' do +- is_expected.to contain_cinder_config('DEFAULT/rpc_backend').with(:value => 'cinder.openstack.common.rpc.impl_kombu') ++ is_expected.to contain_cinder_config('DEFAULT/rpc_backend').with(:value => 'rabbit') + is_expected.to contain_cinder_config('DEFAULT/control_exchange').with(:value => 'openstack') + is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_password').with(:value => 'guest', :secret => true) + is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => '127.0.0.1') +@@ -83,11 +83,11 @@ describe 'cinder' do + { + :database_connection => 'mysql://user:password@host/database', + :qpid_password => 'guest', +- :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' ++ :rpc_backend => 'qpid' + } + end + +- it { is_expected.to contain_cinder_config('DEFAULT/rpc_backend').with_value('cinder.openstack.common.rpc.impl_qpid') } ++ it { is_expected.to contain_cinder_config('DEFAULT/rpc_backend').with_value('qpid') } + it { is_expected.to contain_cinder_config('DEFAULT/qpid_hostname').with_value('localhost') } + it { is_expected.to contain_cinder_config('DEFAULT/qpid_port').with_value('5672') } + it { is_expected.to contain_cinder_config('DEFAULT/qpid_username').with_value('guest') } +@@ -108,7 +108,7 @@ describe 'cinder' do + { + :database_connection => 'mysql://user:password@host/database', + :qpid_password => 'guest', +- :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' ++ :rpc_backend => 'qpid' + } + end + +@@ -121,7 +121,7 @@ describe 'cinder' do + :database_connection => 'mysql://user:password@host/database', + :qpid_password => 'guest', + :qpid_sasl_mechanisms => 'PLAIN', +- :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' ++ :rpc_backend => 'qpid' + } + end + +@@ -134,7 +134,7 @@ describe 'cinder' do + :database_connection => 'mysql://user:password@host/database', + :qpid_password => 'guest', + :qpid_sasl_mechanisms => [ 'DIGEST-MD5', 'GSSAPI', 'PLAIN' ], +- :rpc_backend => 'cinder.openstack.common.rpc.impl_qpid' ++ :rpc_backend => 'qpid' + } + end + diff --git a/0011-Drop-nova_admin_tenant_id_setter.patch b/0011-Drop-nova_admin_tenant_id_setter.patch new file mode 100644 index 0000000..0836704 --- /dev/null +++ b/0011-Drop-nova_admin_tenant_id_setter.patch @@ -0,0 +1,558 @@ +From 28f2f4cff9b8f35511b3b15668b10cc32419c236 Mon Sep 17 00:00:00 2001 +From: Lukas Bezdicka +Date: Thu, 15 Oct 2015 14:58:28 +0200 +Subject: [PATCH] Drop nova_admin_tenant_id_setter + +Neutron now has two options nova_admin_tenant_id and nova_admin_tenant_name. +One can just simply specify name of the nova admin tenant instead of probing +the api to get tenant id. + +Change-Id: I21dc10396e92906eab4651c318aa2ee62a8e03c7 +--- + .../nova_admin_tenant_id_setter/ini_setting.rb | 196 ------------------- + .../lib/puppet/type/nova_admin_tenant_id_setter.rb | 32 ---- + neutron/manifests/init.pp | 2 - + neutron/manifests/keystone/auth.pp | 1 - + neutron/manifests/server.pp | 1 - + neutron/manifests/server/notifications.pp | 9 +- + .../classes/neutron_server_notifications_spec.rb | 8 +- + .../nova_admin_tenant_id_setter/neutron_spec.rb | 212 --------------------- + 8 files changed, 3 insertions(+), 458 deletions(-) + delete mode 100644 neutron/lib/puppet/provider/nova_admin_tenant_id_setter/ini_setting.rb + delete mode 100644 neutron/lib/puppet/type/nova_admin_tenant_id_setter.rb + delete mode 100644 neutron/spec/unit/provider/nova_admin_tenant_id_setter/neutron_spec.rb + +diff --git a/neutron/lib/puppet/provider/nova_admin_tenant_id_setter/ini_setting.rb b/neutron/lib/puppet/provider/nova_admin_tenant_id_setter/ini_setting.rb +deleted file mode 100644 +index 06199ee..0000000 +--- a/neutron/lib/puppet/provider/nova_admin_tenant_id_setter/ini_setting.rb ++++ /dev/null +@@ -1,196 +0,0 @@ +-## NB: This must work with Ruby 1.8! +- +-# This providers permits the nova_admin_tenant_id paramter in neutron.conf +-# to be set by providing a nova_admin_tenant_name to the Puppet module and +-# using the Keystone REST API to translate the name into the corresponding +-# UUID. +-# +-# This requires that tenant names be unique. If there are multiple matches +-# for a given tenant name, this provider will raise an exception. +- +-require 'rubygems' +-require 'net/http' +-require 'net/https' +-require 'json' +-require 'puppet/util/inifile' +- +-class KeystoneError < Puppet::Error +-end +- +-class KeystoneConnectionError < KeystoneError +-end +- +-class KeystoneAPIError < KeystoneError +-end +- +-# Provides common request handling semantics to the other methods in +-# this module. +-# +-# +req+:: +-# An HTTPRequest object +-# +url+:: +-# A parsed URL (returned from URI.parse) +-def neutron_handle_request(req, url) +- begin +- # There is issue with ipv6 where address has to be in brackets, this causes the +- # underlying ruby TCPSocket to fail. Net::HTTP.new will fail without brackets on +- # joining the ipv6 address with :port or passing brackets to TCPSocket. It was +- # found that if we use Net::HTTP.start with url.hostname the incriminated code +- # won't be hit. +- use_ssl = url.scheme == "https" ? true : false +- http = Net::HTTP.start(url.hostname, url.port, {:use_ssl => use_ssl}) +- res = http.request(req) +- +- if res.code != '200' +- raise KeystoneAPIError, "Received error response from Keystone server at #{url}: #{res.message}" +- end +- rescue Errno::ECONNREFUSED => detail +- raise KeystoneConnectionError, "Failed to connect to Keystone server at #{url}: #{detail}" +- rescue SocketError => detail +- raise KeystoneConnectionError, "Failed to connect to Keystone server at #{url}: #{detail}" +- end +- +- res +-end +- +-# Authenticates to a Keystone server and obtains an authentication token. +-# It returns a 2-element +[token, authinfo]+, where +token+ is a token +-# suitable for passing to openstack apis in the +X-Auth-Token+ header, and +-# +authinfo+ is the complete response from Keystone, including the service +-# catalog (if available). +-# +-# +auth_url+:: +-# Keystone endpoint URL. This function assumes API version +-# 2.0 and an administrative endpoint, so this will typically look like +-# +http://somehost:35357/v2.0+. +-# +-# +username+:: +-# Username for authentication. +-# +-# +password+:: +-# Password for authentication +-# +-# +tenantID+:: +-# Tenant UUID +-# +-# +tenantName+:: +-# Tenant name +-# +-def keystone_v2_authenticate(auth_url, +- username, +- password, +- tenantId=nil, +- tenantName=nil) +- +- post_args = { +- 'auth' => { +- 'passwordCredentials' => { +- 'username' => username, +- 'password' => password +- }, +- }} +- +- if tenantId +- post_args['auth']['tenantId'] = tenantId +- end +- +- if tenantName +- post_args['auth']['tenantName'] = tenantName +- end +- +- url = URI.parse("#{auth_url}/tokens") +- req = Net::HTTP::Post.new url.path +- req['content-type'] = 'application/json' +- req.body = post_args.to_json +- +- res = neutron_handle_request(req, url) +- data = JSON.parse res.body +- return data['access']['token']['id'] +-end +- +-# Queries a Keystone server to a list of all tenants. +-# +-# +auth_url+:: +-# Keystone endpoint. See the notes for +auth_url+ in +-# +keystone_v2_authenticate+. +-# +-# +token+:: +-# A Keystone token that will be passed in requests as the value of the +-# +X-Auth-Token+ header. +-# +-def keystone_v2_tenants(auth_url, +- token) +- +- url = URI.parse("#{auth_url}/tenants") +- req = Net::HTTP::Get.new url.path +- req['content-type'] = 'application/json' +- req['x-auth-token'] = token +- +- res = neutron_handle_request(req, url) +- data = JSON.parse res.body +- data['tenants'] +-end +- +-Puppet::Type.type(:nova_admin_tenant_id_setter).provide(:ruby) do +- @tenant_id = nil +- +- def authenticate +- keystone_v2_authenticate( +- @resource[:auth_url], +- @resource[:auth_username], +- @resource[:auth_password], +- nil, +- @resource[:auth_tenant_name]) +- end +- +- def find_tenant_by_name (token) +- tenants = keystone_v2_tenants( +- @resource[:auth_url], +- token) +- +- tenants.select{|tenant| tenant['name'] == @resource[:tenant_name]} +- end +- +- def exists? +- ini_file = Puppet::Util::IniConfig::File.new +- ini_file.read("/etc/neutron/neutron.conf") +- ini_file['DEFAULT'] && ini_file['DEFAULT']['nova_admin_tenant_id'] && ini_file['DEFAULT']['nova_admin_tenant_id'] == tenant_id +- end +- +- def create +- config +- end +- +- def tenant_id +- @tenant_id ||= get_tenant_id +- end +- +- # This looks for the tenant specified by the 'tenant_name' parameter to +- # the resource and returns the corresponding UUID if there is a single +- # match. +- # +- # Raises a KeystoneAPIError if: +- # +- # - There are multiple matches, or +- # - There are zero matches +- def get_tenant_id +- token = authenticate +- tenants = find_tenant_by_name(token) +- +- if tenants.length == 1 +- return tenants[0]['id'] +- elsif tenants.length > 1 +- raise KeystoneAPIError, 'Found multiple matches for tenant name' +- else +- raise KeystoneAPIError, 'Unable to find matching tenant' +- end +- end +- +- def config +- Puppet::Type.type(:neutron_config).new( +- {:name => 'DEFAULT/nova_admin_tenant_id', :value => "#{tenant_id}"} +- ).create +- end +- +-end +- +diff --git a/neutron/lib/puppet/type/nova_admin_tenant_id_setter.rb b/neutron/lib/puppet/type/nova_admin_tenant_id_setter.rb +deleted file mode 100644 +index d79e86c..0000000 +--- a/neutron/lib/puppet/type/nova_admin_tenant_id_setter.rb ++++ /dev/null +@@ -1,32 +0,0 @@ +-Puppet::Type.newtype(:nova_admin_tenant_id_setter) do +- +- ensurable +- +- newparam(:name, :namevar => true) do +- desc 'The name of the setting to update' +- end +- +- newparam(:tenant_name) do +- desc 'The nova admin tenant name' +- end +- +- newparam(:auth_url) do +- desc 'The Keystone endpoint URL' +- defaultto 'http://localhost:35357/v2.0' +- end +- +- newparam(:auth_username) do +- desc 'Username with which to authenticate' +- defaultto 'admin' +- end +- +- newparam(:auth_password) do +- desc 'Password with which to authenticate' +- end +- +- newparam(:auth_tenant_name) do +- desc 'Tenant name with which to authenticate' +- defaultto 'admin' +- end +-end +- +diff --git a/neutron/manifests/init.pp b/neutron/manifests/init.pp +index 4d576f9..d638909 100644 +--- a/neutron/manifests/init.pp ++++ b/neutron/manifests/init.pp +@@ -321,8 +321,6 @@ class neutron ( + + include ::neutron::params + +- Package['neutron'] -> Nova_Admin_Tenant_Id_Setter<||> +- + if $use_ssl { + if !$cert_file { + fail('The cert_file parameter is required when use_ssl is set to true') +diff --git a/neutron/manifests/keystone/auth.pp b/neutron/manifests/keystone/auth.pp +index 60f8d9d..d7cd7bc 100644 +--- a/neutron/manifests/keystone/auth.pp ++++ b/neutron/manifests/keystone/auth.pp +@@ -190,7 +190,6 @@ class neutron::keystone::auth ( + + if $configure_endpoint { + Keystone_endpoint["${region}/${real_service_name}"] ~> Service <| title == 'neutron-server' |> +- Keystone_endpoint["${region}/${real_service_name}"] -> Nova_admin_tenant_id_setter<||> + } + + if $configure_user_role { +diff --git a/neutron/manifests/server.pp b/neutron/manifests/server.pp +index 8915f5b..ad13f8e 100644 +--- a/neutron/manifests/server.pp ++++ b/neutron/manifests/server.pp +@@ -243,7 +243,6 @@ class neutron::server ( + include ::neutron::policy + require keystone::python + +- Nova_admin_tenant_id_setter<||> ~> Service['neutron-server'] + Neutron_config<||> ~> Service['neutron-server'] + Neutron_api_config<||> ~> Service['neutron-server'] + Class['neutron::policy'] ~> Service['neutron-server'] +diff --git a/neutron/manifests/server/notifications.pp b/neutron/manifests/server/notifications.pp +index eef09ee..bedeb28 100644 +--- a/neutron/manifests/server/notifications.pp ++++ b/neutron/manifests/server/notifications.pp +@@ -109,13 +109,8 @@ class neutron::server::notifications ( + 'DEFAULT/nova_admin_tenant_id': value => $nova_admin_tenant_id; + } + } else { +- nova_admin_tenant_id_setter {'nova_admin_tenant_id': +- ensure => present, +- tenant_name => $nova_admin_tenant_name, +- auth_url => $nova_admin_auth_url, +- auth_username => $nova_admin_username, +- auth_password => $nova_admin_password, +- auth_tenant_name => $nova_admin_tenant_name, ++ neutron_config { ++ 'DEFAULT/nova_admin_tenant_name': value => $nova_admin_tenant_name; + } + } + } +diff --git a/neutron/spec/classes/neutron_server_notifications_spec.rb b/neutron/spec/classes/neutron_server_notifications_spec.rb +index 8497f64..5a26f1c 100644 +--- a/neutron/spec/classes/neutron_server_notifications_spec.rb ++++ b/neutron/spec/classes/neutron_server_notifications_spec.rb +@@ -118,13 +118,7 @@ describe 'neutron::server::notifications' do + }) + end + it 'should configure nova admin tenant id' do +- is_expected.to contain_nova_admin_tenant_id_setter('nova_admin_tenant_id').with( +- :ensure => 'present', +- :tenant_name => 'services', +- :auth_url => 'http://127.0.0.1:35357/v2.0', +- :auth_password => 'secrete', +- :auth_tenant_name => 'services' +- ) ++ is_expected.to contain_neutron_config('DEFAULT/nova_admin_tenant_name').with_value('services') + end + end + end +diff --git a/neutron/spec/unit/provider/nova_admin_tenant_id_setter/neutron_spec.rb b/neutron/spec/unit/provider/nova_admin_tenant_id_setter/neutron_spec.rb +deleted file mode 100644 +index 06e745e..0000000 +--- a/neutron/spec/unit/provider/nova_admin_tenant_id_setter/neutron_spec.rb ++++ /dev/null +@@ -1,212 +0,0 @@ +-require 'spec_helper' +-require 'puppet' +-require 'puppet/type/nova_admin_tenant_id_setter' +- +-provider_class = Puppet::Type.type(:nova_admin_tenant_id_setter).provider(:ruby) +- +-# used to simulate an authentication response from Keystone +-# (POST v2.0/tokens) +-auth_response = { +- 'access' => { +- 'token' => { +- 'id' => 'TOKEN', +- } +- } +-} +- +-# used to simulate a response to GET v2.0/tenants +-tenants_response = { +- 'tenants' => [ +- { +- 'name' => 'services', +- 'id' => 'UUID_SERVICES' +- }, +- { +- 'name' => 'multiple_matches_tenant', +- 'id' => 'UUID1' +- }, +- { +- 'name' => 'multiple_matches_tenant', +- 'id' => 'UUID2' +- }, +- ] +-} +- +-# Stub for openstack_config resource +-Puppet::Type.newtype(:openstack_config) do +-end +- +-# Stub for openstack_config provider +-Puppet::Type.newtype(:openstack_config).provide(:ini_setting) do +- def create +- end +-end +- +-describe 'Puppet::Type.type(:nova_admin_tenant_id_setter)' do +- let :params do +- { +- :name => 'nova_admin_tenant_id', +- :tenant_name => 'services', +- :auth_username => 'nova', +- :auth_password => 'secret', +- :auth_tenant_name => 'admin', +- :auth_url => 'http://127.0.0.1:35357/v2.0', +- } +- end +- +- it 'should have a non-nil provider' do +- expect(provider_class).not_to be_nil +- end +- +- context 'when url is correct' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens"). +- to_return(:status => 200, +- :body => auth_response.to_json, +- :headers => {}) +- stub_request(:get, "http://127.0.0.1:35357/v2.0/tenants"). +- with(:headers => {'X-Auth-Token'=>'TOKEN'}). +- to_return(:status => 200, +- :body => tenants_response.to_json, +- :headers => {}) +- end +- +- it 'should create a resource' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect(provider.create).to be_nil +- end +- +- context 'when tenant id already set' do +- it 'should create a resource, with exists? true' do +- mock = { 'DEFAULT' => { 'nova_admin_tenant_id' => 'UUID_SERVICES' } } +- Puppet::Util::IniConfig::File.expects(:new).returns(mock) +- mock.expects(:read).with('/etc/neutron/neutron.conf') +- +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_truthy +- expect(provider.create).to be_nil +- end +- end +- end +- +- # What happens if we ask for a tenant that does not exist? +- context 'when tenant cannot be found' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens"). +- to_return(:status => 200, +- :body => auth_response.to_json, +- :headers => {}) +- stub_request(:get, "http://127.0.0.1:35357/v2.0/tenants"). +- with(:headers => {'X-Auth-Token'=>'TOKEN'}). +- to_return(:status => 200, +- :body => tenants_response.to_json, +- :headers => {}) +- +- params.merge!(:tenant_name => 'bad_tenant_name') +- end +- +- it 'should receive an api error' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect { provider.create }.to raise_error KeystoneAPIError, /Unable to find matching tenant/ +- end +- end +- +- # What happens if we ask for a tenant name that results in multiple +- # matches? +- context 'when there are multiple matching tenants' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens"). +- to_return(:status => 200, +- :body => auth_response.to_json, +- :headers => {}) +- stub_request(:get, "http://127.0.0.1:35357/v2.0/tenants"). +- with(:headers => {'X-Auth-Token'=>'TOKEN'}). +- to_return(:status => 200, +- :body => tenants_response.to_json, +- :headers => {}) +- +- params.merge!(:tenant_name => 'multiple_matches_tenant') +- end +- +- it 'should receive an api error' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect { provider.create }.to raise_error KeystoneAPIError, /Found multiple matches for tenant name/ +- end +- end +- +- # What happens if we pass a bad password? +- context 'when password is incorrect' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens"). +- to_return(:status => 401, +- :body => auth_response.to_json, +- :headers => {}) +- end +- +- it 'should receive an authentication error' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect { provider.create }.to raise_error KeystoneAPIError +- end +- end +- +- # What happens if the server is not listening? +- context 'when keystone server is unavailable' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens").to_raise Errno::ECONNREFUSED +- end +- +- it 'should receive a connection error' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect { provider.create }.to raise_error KeystoneConnectionError +- end +- end +- +- # What happens if we mistype the hostname? +- context 'when keystone server is unknown' do +- before :each do +- stub_request(:post, "http://127.0.0.1:35357/v2.0/tokens").to_raise SocketError, 'getaddrinfo: Name or service not known' +- end +- +- it 'should receive a connection error' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect { provider.create }.to raise_error KeystoneConnectionError +- end +- end +- +- context 'when using secure keystone endpoint' do +- before :each do +- params.merge!(:auth_url => "https://127.0.0.1:35357/v2.0") +- stub_request(:post, "https://127.0.0.1:35357/v2.0/tokens"). +- to_return(:status => 200, +- :body => auth_response.to_json, +- :headers => {}) +- stub_request(:get, "https://127.0.0.1:35357/v2.0/tenants"). +- with(:headers => {'X-Auth-Token'=>'TOKEN'}). +- to_return(:status => 200, +- :body => tenants_response.to_json, +- :headers => {}) +- end +- +- it 'should create a resource' do +- resource = Puppet::Type::Nova_admin_tenant_id_setter.new(params) +- provider = provider_class.new(resource) +- expect(provider.exists?).to be_falsey +- expect(provider.create).to be_nil +- end +- end +- +-end +- diff --git a/openstack-puppet-modules.spec b/openstack-puppet-modules.spec index 0794547..e5d87f4 100644 --- a/openstack-puppet-modules.spec +++ b/openstack-puppet-modules.spec @@ -1,6 +1,6 @@ Name: openstack-puppet-modules Epoch: 1 -Version: 7.0.0 +Version: 7.0.1 Release: 1%{?dist} Summary: Collection of Puppet modules for OpenStack deployment License: ASL 2.0 and GPLv2 and GPLv3 @@ -20,6 +20,8 @@ Patch0006: 0006-Install-service-packages-on-api-nodes.patch Patch0007: 0007-Remove-installation-of-pm-utils.patch Patch0008: 0008-Explicitly-say-that-ovs_redhat-parent-is-ovs.patch Patch0009: 0009-Add-support-for-swift-object-expirer-service.patch +Patch0010: 0010-Simplify-rpc_backend-parameter.patch +Patch0011: 0011-Drop-nova_admin_tenant_id_setter.patch BuildArch: noarch Requires: rubygem-json @@ -41,6 +43,8 @@ OpenStack via installers using Puppet configuration tool. %patch0007 -p1 %patch0008 -p1 %patch0009 -p1 +%patch0010 -p1 +%patch0011 -p1 find . -type f -name ".*" -exec rm {} + find . -size 0 -exec rm {} + @@ -66,6 +70,9 @@ rm -f %{buildroot}/%{_datadir}/openstack-puppet/modules/nova/files/nova-novncpro %changelog +* Tue Oct 20 2015 Lukas Bezdicka 1:7.0.1-1 +- Update to upstream 7.0.1 + * Tue Oct 13 2015 Lukas Bezdicka 7.0.0-1 - Update to upstream 7.0.0 diff --git a/sources b/sources index 0d6bc34..7b97a08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fb4fa85afd6ec2cca9b61f7158ef9b75 7.0.0.tar.gz +93cc378051af5fd4be56b1b86e642f09 7.0.1.tar.gz