Use new openstackclient tag
This looses dependency using the new openstackclient tag, which requires only packages actually related to openstack CLI. Also, the troveclient package is required by trove so updating it should restart the services. Depends-on: https://review.opendev.org/899594 Change-Id: I52bf30c3ce857509ff1463abb7a493eb8dd48b97
This commit is contained in:
parent
428129c2e1
commit
fd985c46f5
@ -40,4 +40,8 @@ Puppet::Type.newtype(:trove_datastore_version) do
|
||||
autorequire(:anchor) do
|
||||
['trove::service::end']
|
||||
end
|
||||
|
||||
autorequire(:trove_datastore) do
|
||||
[self[:datastore]]
|
||||
end
|
||||
end
|
||||
|
@ -37,10 +37,12 @@ class trove::client (
|
||||
|
||||
include trove::deps
|
||||
|
||||
# NOTE(tkajinam): trove-package tag is used because troveclient is required
|
||||
# by trove
|
||||
package { 'python-troveclient':
|
||||
ensure => $package_ensure,
|
||||
name => $client_package_name,
|
||||
tag => 'openstack',
|
||||
tag => ['openstack', 'openstackclient', 'trove-package'],
|
||||
}
|
||||
|
||||
include openstacklib::openstackclient
|
||||
|
@ -46,16 +46,14 @@ class trove::deps {
|
||||
# before dbsync starts
|
||||
Oslo::Db<||> -> Anchor['trove::dbsync::begin']
|
||||
|
||||
# We need troveclient installed before marking service end so that trove
|
||||
# We need openstackclient installed before marking service end so that trove
|
||||
# will have clients available to create resources. This tag handles the
|
||||
# troveclient but indirectly since the client is not available in
|
||||
# openstackclient but indirectly since the client is not available in
|
||||
# all catalogs that don't need the client class (like many spec tests).
|
||||
# Once the troveclient is installed we will setup the datastores and
|
||||
# Once the openstackclient is installed we will setup the datastores and
|
||||
# datastore_versions. Datastore_versions must come after datastores.
|
||||
Package<| tag == 'openstack'|>
|
||||
~> Anchor['trove::service::end']
|
||||
-> Trove_datastore<||>
|
||||
-> Trove_datastore_version<||>
|
||||
Package<| tag == 'openstackclient'|>
|
||||
-> Anchor['trove::service::end']
|
||||
|
||||
# Installation or config changes will always restart services.
|
||||
Anchor['trove::install::end'] ~> Anchor['trove::service::begin']
|
||||
|
@ -28,8 +28,9 @@ describe 'trove::client' do
|
||||
|
||||
context 'with default parameters' do
|
||||
it { is_expected.to contain_package('python-troveclient').with(
|
||||
'ensure' => 'present',
|
||||
'name' => platform_params[:client_package_name],
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:client_package_name],
|
||||
:tag => ['openstack', 'openstackclient', 'trove-package']
|
||||
)}
|
||||
end
|
||||
|
||||
@ -38,8 +39,9 @@ describe 'trove::client' do
|
||||
{ :package_ensure => false }
|
||||
end
|
||||
it { is_expected.to contain_package('python-troveclient').with(
|
||||
'ensure' => false,
|
||||
'name' => platform_params[:client_package_name],
|
||||
:ensure => false,
|
||||
:name => platform_params[:client_package_name],
|
||||
:tag => ['openstack', 'openstackclient', 'trove-package']
|
||||
)}
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user