Merge "Remove trove ubuntu package hack"
This commit is contained in:
commit
98ba7b3b6d
@ -45,4 +45,7 @@ Puppet::Type.newtype(:trove_api_paste_ini) do
|
|||||||
defaultto('<SERVICE DEFAULT>')
|
defaultto('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autorequire(:package) do
|
||||||
|
'trove-api'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,4 +46,7 @@ Puppet::Type.newtype(:trove_conductor_config) do
|
|||||||
defaultto('<SERVICE DEFAULT>')
|
defaultto('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autorequire(:package) do
|
||||||
|
'trove-conductor'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,4 +46,7 @@ Puppet::Type.newtype(:trove_config) do
|
|||||||
defaultto('<SERVICE DEFAULT>')
|
defaultto('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autorequire(:package) do
|
||||||
|
'trove-api'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -46,4 +46,7 @@ Puppet::Type.newtype(:trove_guestagent_config) do
|
|||||||
defaultto('<SERVICE DEFAULT>')
|
defaultto('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autorequire(:package) do
|
||||||
|
'trove-guestagent'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -177,16 +177,7 @@ class trove::api(
|
|||||||
|
|
||||||
Trove_config<||> ~> Exec['post-trove_config']
|
Trove_config<||> ~> Exec['post-trove_config']
|
||||||
Trove_config<||> ~> Service['trove-api']
|
Trove_config<||> ~> Service['trove-api']
|
||||||
Package['trove-api'] -> Trove_api_paste_ini<||>
|
|
||||||
Trove_api_paste_ini<||> ~> Service['trove-api']
|
Trove_api_paste_ini<||> ~> Service['trove-api']
|
||||||
# Trove db sync is broken in Ubuntu packaging
|
|
||||||
# This is a temporary fix until it's fixed in packaging.
|
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/1451134
|
|
||||||
file { '/etc/trove/trove.conf':
|
|
||||||
require => File['/etc/trove'],
|
|
||||||
}
|
|
||||||
File['/etc/trove/trove.conf'] -> Trove_config<||>
|
|
||||||
Trove_config<||> -> Package[$::trove::params::api_package_name]
|
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
trove_config {
|
trove_config {
|
||||||
|
@ -68,14 +68,6 @@ class trove::conductor(
|
|||||||
|
|
||||||
Trove_conductor_config<||> ~> Exec['post-trove_config']
|
Trove_conductor_config<||> ~> Exec['post-trove_config']
|
||||||
Trove_conductor_config<||> ~> Service['trove-conductor']
|
Trove_conductor_config<||> ~> Service['trove-conductor']
|
||||||
# Trove db sync is broken in Ubuntu packaging
|
|
||||||
# This is a temporary fix until it's fixed in packaging.
|
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/1451134
|
|
||||||
file { '/etc/trove/trove-conductor.conf':
|
|
||||||
require => File['/etc/trove'],
|
|
||||||
}
|
|
||||||
File['/etc/trove/trove-conductor.conf'] -> Trove_conductor_config<||>
|
|
||||||
Trove_conductor_config<||> -> Package[$::trove::params::conductor_package_name]
|
|
||||||
|
|
||||||
if $::trove::database_connection {
|
if $::trove::database_connection {
|
||||||
if($::trove::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
|
if($::trove::database_connection =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
|
||||||
|
@ -23,6 +23,5 @@ class trove::db::sync {
|
|||||||
user => 'trove',
|
user => 'trove',
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
subscribe => Trove_config['database/connection'],
|
subscribe => Trove_config['database/connection'],
|
||||||
require => Package['trove-api'],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,14 +73,6 @@ class trove::guestagent(
|
|||||||
|
|
||||||
Trove_guestagent_config<||> ~> Exec['post-trove_config']
|
Trove_guestagent_config<||> ~> Exec['post-trove_config']
|
||||||
Trove_guestagent_config<||> ~> Service['trove-guestagent']
|
Trove_guestagent_config<||> ~> Service['trove-guestagent']
|
||||||
# Trove db sync is broken in Ubuntu packaging
|
|
||||||
# This is a temporary fix until it's fixed in packaging.
|
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/1451134
|
|
||||||
file { '/etc/trove/trove-guestagent.conf':
|
|
||||||
require => File['/etc/trove'],
|
|
||||||
}
|
|
||||||
File['/etc/trove/trove-guestagent.conf'] -> Trove_guestagent_config<||>
|
|
||||||
Trove_guestagent_config<||> -> Package[$::trove::params::guestagent_package_name]
|
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
trove_guestagent_config {
|
trove_guestagent_config {
|
||||||
|
@ -310,32 +310,9 @@ class trove(
|
|||||||
trove_config { 'DEFAULT/neutron_url': ensure => absent }
|
trove_config { 'DEFAULT/neutron_url': ensure => absent }
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::osfamily == 'RedHat' {
|
package { 'trove':
|
||||||
# TO-DO(mmagr): Conditional should be removed as soon as following bug
|
ensure => $package_ensure,
|
||||||
# is really fixed. On Ubuntu trove-common is not installable without already
|
name => $::trove::params::common_package_name,
|
||||||
# running database and correctly filled trove.conf:
|
tag => ['openstack', 'trove-package'],
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/openstack-trove/+bug/1365561
|
|
||||||
package { 'trove':
|
|
||||||
ensure => $package_ensure,
|
|
||||||
name => $::trove::params::common_package_name,
|
|
||||||
tag => ['openstack', 'trove-package'],
|
|
||||||
}
|
|
||||||
$group_require = Package['trove']
|
|
||||||
} else {
|
|
||||||
$group_require = undef
|
|
||||||
}
|
}
|
||||||
|
|
||||||
group { 'trove':
|
|
||||||
ensure => 'present',
|
|
||||||
name => 'trove',
|
|
||||||
system => true,
|
|
||||||
require => $group_require
|
|
||||||
}
|
|
||||||
|
|
||||||
file { '/etc/trove/':
|
|
||||||
ensure => directory,
|
|
||||||
group => 'trove',
|
|
||||||
require => Group['trove']
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
17
spec/unit/type/trove_conductor_config_spec.rb
Normal file
17
spec/unit/type/trove_conductor_config_spec.rb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
require 'puppet/type/trove_conductor_config'
|
||||||
|
|
||||||
|
describe 'Puppet::Type.type(:trove_conductor_config)' do
|
||||||
|
before :each do
|
||||||
|
@trove_conductor_config = Puppet::Type.type(:trove_conductor_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should autorequire the package that installs the file' do
|
||||||
|
catalog = Puppet::Resource::Catalog.new
|
||||||
|
package = Puppet::Type.type(:package).new(:name => 'trove-conductor')
|
||||||
|
catalog.add_resource package, @trove_conductor_config
|
||||||
|
dependency = @trove_conductor_config.autorequire
|
||||||
|
expect(dependency.size).to eq(1)
|
||||||
|
expect(dependency[0].target).to eq(@trove_conductor_config)
|
||||||
|
expect(dependency[0].source).to eq(package)
|
||||||
|
end
|
||||||
|
end
|
17
spec/unit/type/trove_conductor_guestagent_spec.rb
Normal file
17
spec/unit/type/trove_conductor_guestagent_spec.rb
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
require 'puppet/type/trove_guestagent_config'
|
||||||
|
|
||||||
|
describe 'Puppet::Type.type(:trove_guestagent_config)' do
|
||||||
|
before :each do
|
||||||
|
@trove_guestagent_config = Puppet::Type.type(:trove_guestagent_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'should autorequire the package that installs the file' do
|
||||||
|
catalog = Puppet::Resource::Catalog.new
|
||||||
|
package = Puppet::Type.type(:package).new(:name => 'trove-guestagent')
|
||||||
|
catalog.add_resource package, @trove_guestagent_config
|
||||||
|
dependency = @trove_guestagent_config.autorequire
|
||||||
|
expect(dependency.size).to eq(1)
|
||||||
|
expect(dependency[0].target).to eq(@trove_guestagent_config)
|
||||||
|
expect(dependency[0].source).to eq(package)
|
||||||
|
end
|
||||||
|
end
|
@ -49,4 +49,14 @@ describe 'Puppet::Type.type(:trove_config)' do
|
|||||||
@trove_config[:ensure] = :latest
|
@trove_config[:ensure] = :latest
|
||||||
}.to raise_error(Puppet::Error, /Invalid value/)
|
}.to raise_error(Puppet::Error, /Invalid value/)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'should autorequire the package that installs the file' do
|
||||||
|
catalog = Puppet::Resource::Catalog.new
|
||||||
|
package = Puppet::Type.type(:package).new(:name => 'trove-api')
|
||||||
|
catalog.add_resource package, @trove_config
|
||||||
|
dependency = @trove_config.autorequire
|
||||||
|
expect(dependency.size).to eq(1)
|
||||||
|
expect(dependency[0].target).to eq(@trove_config)
|
||||||
|
expect(dependency[0].source).to eq(package)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user