summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--manifests/pacemaker/resource_restart_flag.pp11
-rw-r--r--manifests/profile/base/ceilometer/collector.pp9
-rw-r--r--manifests/profile/base/cinder/volume/eqlx.pp2
-rw-r--r--manifests/profile/base/nova/api.pp20
-rw-r--r--manifests/profile/base/pacemaker.pp4
-rw-r--r--manifests/profile/base/swift/proxy.pp1
-rw-r--r--manifests/profile/base/swift/ringbuilder.pp13
-rw-r--r--spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb9
8 files changed, 55 insertions, 14 deletions
diff --git a/manifests/pacemaker/resource_restart_flag.pp b/manifests/pacemaker/resource_restart_flag.pp
index aded802..c201c9b 100644
--- a/manifests/pacemaker/resource_restart_flag.pp
+++ b/manifests/pacemaker/resource_restart_flag.pp
@@ -26,10 +26,21 @@
#
define tripleo::pacemaker::resource_restart_flag() {
+ ensure_resource('file', ['/var/lib/tripleo', '/var/lib/tripleo/pacemaker-restarts'],
+ {
+ 'ensure' => 'directory',
+ 'owner' => 'root',
+ 'mode' => '0755',
+ 'group' => 'root',
+ }
+ )
+
exec { "${title} resource restart flag":
command => "touch /var/lib/tripleo/pacemaker-restarts/${title}",
path => ['/bin','/usr/bin','/sbin','/usr/sbin'],
refreshonly => true,
}
+ File['/var/lib/tripleo/pacemaker-restarts'] ->
+ Exec["${title} resource restart flag"]
}
diff --git a/manifests/profile/base/ceilometer/collector.pp b/manifests/profile/base/ceilometer/collector.pp
index 443873f..3c0a361 100644
--- a/manifests/profile/base/ceilometer/collector.pp
+++ b/manifests/profile/base/ceilometer/collector.pp
@@ -60,10 +60,6 @@ class tripleo::profile::base::ceilometer::collector (
include ::tripleo::profile::base::ceilometer
- if $step >= 3 and $sync_db {
- include ::ceilometer::db::sync
- }
-
if $step >= 4 or ($step >= 3 and $sync_db) {
if downcase($ceilometer_backend) == 'mongodb' {
if empty($mongodb_node_ips) {
@@ -88,10 +84,13 @@ class tripleo::profile::base::ceilometer::collector (
$ceilometer_mongodb_conn_string = "mongodb://${mongo_node_string}/ceilometer?replicaSet=${mongodb_replset}"
class { '::ceilometer::db' :
+ sync_db => $sync_db,
database_connection => $ceilometer_mongodb_conn_string,
}
} else {
- include ::ceilometer::db
+ class { '::ceilometer::db' :
+ sync_db => $sync_db,
+ }
}
include ::ceilometer::collector
include ::ceilometer::dispatcher::gnocchi
diff --git a/manifests/profile/base/cinder/volume/eqlx.pp b/manifests/profile/base/cinder/volume/eqlx.pp
index 2399459..fe24f4b 100644
--- a/manifests/profile/base/cinder/volume/eqlx.pp
+++ b/manifests/profile/base/cinder/volume/eqlx.pp
@@ -43,7 +43,7 @@ class tripleo::profile::base::cinder::volume::eqlx (
eqlx_pool => hiera('cinder::backend::eqlx::eqlx_pool', undef),
eqlx_use_chap => hiera('cinder::backend::eqlx::eqlx_use_chap', undef),
eqlx_chap_login => hiera('cinder::backend::eqlx::eqlx_chap_login', undef),
- eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_san_password', undef),
+ eqlx_chap_password => hiera('cinder::backend::eqlx::eqlx_chap_password', undef),
}
}
diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp
index 3c472c5..03706dc 100644
--- a/manifests/profile/base/nova/api.pp
+++ b/manifests/profile/base/nova/api.pp
@@ -38,10 +38,26 @@ class tripleo::profile::base::nova::api (
include ::tripleo::profile::base::nova
if $step >= 4 or ($step >= 3 and $sync_db) {
+
+ # Manages the migration to Nova API in mod_wsgi with Apache.
+ # - First update nova.conf with new parameters
+ # - Stop nova-api process before starting apache to avoid binding error
+ # - Start apache after configuring all vhosts
+ exec { 'stop_nova-api':
+ command => 'service openstack-nova-api stop',
+ path => ['/usr/bin', '/usr/sbin'],
+ onlyif => 'systemctl is-active openstack-nova-api',
+ refreshonly => true,
+ }
+ Nova_config<||> ~> Exec['stop_nova-api']
+ Exec['stop_nova-api'] -> Service['httpd']
+
class { '::nova::api':
- sync_db => $sync_db,
- sync_db_api => $sync_db,
+ service_name => 'httpd', # Temporary: will be moved to t-h-t
+ sync_db => $sync_db,
+ sync_db_api => $sync_db,
}
+ include ::nova::wsgi::apache
include ::nova::network::neutron
}
diff --git a/manifests/profile/base/pacemaker.pp b/manifests/profile/base/pacemaker.pp
index 43edfaf..cc5fd8a 100644
--- a/manifests/profile/base/pacemaker.pp
+++ b/manifests/profile/base/pacemaker.pp
@@ -68,10 +68,6 @@ class tripleo::profile::base::pacemaker (
# enable stonith after all fencing devices have been created
Class['tripleo::fencing'] -> Class['pacemaker::stonith']
}
-
- file { '/var/lib/tripleo/pacemaker-restarts':
- ensure => directory,
- } ~> Tripleo::Pacemaker::Resource_restart_flag<||>
}
if $step >= 2 {
diff --git a/manifests/profile/base/swift/proxy.pp b/manifests/profile/base/swift/proxy.pp
index fc9fe11..8cb1132 100644
--- a/manifests/profile/base/swift/proxy.pp
+++ b/manifests/profile/base/swift/proxy.pp
@@ -53,5 +53,6 @@ class tripleo::profile::base::swift::proxy (
include ::swift::proxy::formpost
include ::swift::proxy::bulk
include ::swift::proxy::ceilometer
+ include ::swift::proxy::versioned_writes
}
}
diff --git a/manifests/profile/base/swift/ringbuilder.pp b/manifests/profile/base/swift/ringbuilder.pp
index c77d744..7e5fc74 100644
--- a/manifests/profile/base/swift/ringbuilder.pp
+++ b/manifests/profile/base/swift/ringbuilder.pp
@@ -54,6 +54,15 @@
# (Optional) list of ip addresses for nodes running swift_storage service
# Defaults to hiera('swift_storage_node_ips') or an empty list
#
+# [*part_power*]
+# (Optional) The total number of partitions that should exist in the ring.
+# This is expressed as a power of 2.
+# Defaults to undef
+#
+# [*min_part_hours*]
+# Minimum amount of time before partitions can be moved.
+# Defaults to undef
+#
class tripleo::profile::base::swift::ringbuilder (
$replicas,
$build_ring = true,
@@ -63,6 +72,8 @@ class tripleo::profile::base::swift::ringbuilder (
$raw_disk_prefix = 'r1z1-',
$raw_disks = [],
$swift_storage_node_ips = hiera('swift_storage_node_ips', []),
+ $part_power = undef,
+ $min_part_hours = undef,
) {
if $step >= 2 {
# pre-install swift here so we can build rings
@@ -81,7 +92,9 @@ class tripleo::profile::base::swift::ringbuilder (
# create local rings
swift::ringbuilder::create{ ['object', 'account', 'container']:
+ part_power => $part_power,
replicas => min(count($device_array), $replicas),
+ min_part_hours => $min_part_hours,
} ->
# add all other devices
diff --git a/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb b/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
index e262491..718c700 100644
--- a/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
+++ b/spec/classes/tripleo_profile_base_ceilometer_collector_spec.rb
@@ -52,6 +52,7 @@ describe 'tripleo::profile::base::ceilometer::collector' do
is_expected.to contain_class('tripleo::profile::base::ceilometer::collector')
is_expected.to contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true,
:database_connection => 'mongodb://[::1]:27017,[fe80::ca5b:76ff:fe4b:be3b]:27017/ceilometer?replicaSet=replicaset'
)
end
@@ -72,6 +73,9 @@ describe 'tripleo::profile::base::ceilometer::collector' do
is_expected.to contain_class('ceilometer::db').without(
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
+ is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true
+ )
end
end
@@ -98,6 +102,7 @@ describe 'tripleo::profile::base::ceilometer::collector' do
it 'should trigger complete configuration' do
is_expected.to contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => true,
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
is_expected.to contain_class('ceilometer::collector')
@@ -114,9 +119,9 @@ describe 'tripleo::profile::base::ceilometer::collector' do
} }
it 'should trigger complete configuration' do
- #TODO(aschultz): LP#1629373
- #is_expected.to_not contain_class('ceilometer::db::sync')
+ is_expected.to_not contain_class('ceilometer::db::sync')
is_expected.to contain_class('ceilometer::db').with(
+ :sync_db => false,
:database_connection => 'mongodb://127.0.0.1:27017/ceilometer?replicaSet=replicaset'
)
is_expected.to contain_class('ceilometer::collector')