From 3ec253827c10b81f61bf3b96cd85a50c2c264abc Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Wed, 27 May 2020 12:16:59 +0200 Subject: [PATCH] Consolidate python memcache bindings install Consolidate all the installs of python memcache bindings to use ensure_package. Right now we are mixing the usage of ensure_resources on some places which causes redecalaration issues. Since the resources need to be identical in order to not raise redeclaration issues we cannot have the horizon-package tag on the package. Change-Id: I0a76cbe45774bbf6871c1803c056bc2f6b3b6c0d --- manifests/init.pp | 7 ++++--- spec/classes/horizon_init_spec.rb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index afc7de3d..3092c4e6 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -621,9 +621,10 @@ class horizon( validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $root_path) if $manage_memcache_package and $cache_backend =~ /MemcachedCache/ { - ensure_resources('package', { 'python-memcache' => - { name => $::horizon::params::memcache_package, - tag => ['openstack', 'horizon-package']}}) + ensure_packages('python-memcache', { + name => $::horizon::params::memcache_package, + tag => ['openstack'], + }) } package { 'horizon': diff --git a/spec/classes/horizon_init_spec.rb b/spec/classes/horizon_init_spec.rb index 43ae18c8..099cee1b 100644 --- a/spec/classes/horizon_init_spec.rb +++ b/spec/classes/horizon_init_spec.rb @@ -296,7 +296,7 @@ describe 'horizon' do it { is_expected.to contain_package('python-memcache').with( - :tag => ['openstack', 'horizon-package'], + :tag => ['openstack'], :name => platforms_params[:memcache_package], ) }