Fix inconsistency with ringbuilder/storage steps

Currently when deploying swift on the Controller nodes, we do the
ringbuilder config during step3 and the swift-storage config during
step 4, but this order is reversed on the ObjectStorage nodes.

Also, we include the base swift class inconsistently during step2
on controller nodes, and via the overcloud-object manifest on
ObjectStorage nodes.

So fix this inconsistency as a precursor to conversion to composable
services interfaces for the ObjectStorage role, we rework the post
config so we apply the ObjectStorage config in steps 2, 3 and 4,
which should hopefully get us much closer to the process used
on the controller role, thus be easier to decompose in a compatible
way.

Partially-Implements: blueprint composable-services-within-roles
Change-Id: Ic9d0ed8584a12d681a8f4d4742d39b96c15e531a
This commit is contained in:
Steven Hardy 2016-05-23 17:05:18 +01:00 committed by Giulio Fidente
parent d372a3b76f
commit e3cc44579c
5 changed files with 69 additions and 62 deletions

View File

@ -117,9 +117,6 @@ if hiera('step') >= 2 {
include ::aodh::db::mysql
}
# pre-install swift here so we can build rings
include ::swift
$enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)
if $enable_ceph {

View File

@ -318,9 +318,6 @@ if hiera('step') >= 2 {
}
}
# pre-install swift here so we can build rings
include ::swift
# Ceph
$enable_ceph = hiera('ceph_storage_count', 0) > 0 or hiera('enable_ceph_storage', false)

View File

@ -16,42 +16,46 @@
include ::tripleo::packages
include ::tripleo::firewall
create_resources(kmod::load, hiera('kernel_modules'), {})
create_resources(sysctl::value, hiera('sysctl_settings'), {})
Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
if hiera('step') >= 1 {
create_resources(kmod::load, hiera('kernel_modules'), {})
create_resources(sysctl::value, hiera('sysctl_settings'), {})
Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
if count(hiera('ntp::servers')) > 0 {
include ::ntp
}
include ::timezone
include ::timezone
include ::swift
class { '::swift::storage::all':
mount_check => str2bool(hiera('swift_mount_check')),
}
if(!defined(File['/srv/node'])) {
file { '/srv/node':
ensure => directory,
owner => 'swift',
group => 'swift',
require => Package['openstack-swift'],
if count(hiera('ntp::servers')) > 0 {
include ::ntp
}
}
$swift_components = ['account', 'container', 'object']
swift::storage::filter::recon { $swift_components : }
swift::storage::filter::healthcheck { $swift_components : }
if hiera('step') >= 4 {
class { '::swift::storage::all':
mount_check => str2bool(hiera('swift_mount_check')),
}
if(!defined(File['/srv/node'])) {
file { '/srv/node':
ensure => directory,
owner => 'swift',
group => 'swift',
require => Package['openstack-swift'],
}
}
$snmpd_user = hiera('snmpd_readonly_user_name')
snmp::snmpv3_user { $snmpd_user:
authtype => 'MD5',
authpass => hiera('snmpd_readonly_user_password'),
}
class { '::snmp':
agentaddress => ['udp:161','udp6:[::1]:161'],
snmpd_config => [ join(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
$swift_components = ['account', 'container', 'object']
swift::storage::filter::recon { $swift_components : }
swift::storage::filter::healthcheck { $swift_components : }
$snmpd_user = hiera('snmpd_readonly_user_name')
snmp::snmpv3_user { $snmpd_user:
authtype => 'MD5',
authpass => hiera('snmpd_readonly_user_password'),
}
class { '::snmp':
agentaddress => ['udp:161','udp6:[::1]:161'],
snmpd_config => [ join(['createUser ', hiera('snmpd_readonly_user_name'), ' MD5 "', hiera('snmpd_readonly_user_password'), '"']), join(['rouser ', hiera('snmpd_readonly_user_name')]), 'proc cron', 'includeAllDisks 10%', 'master agentx', 'trapsink localhost public', 'iquerySecName internalUser', 'rouser internalUser', 'defaultMonitors yes', 'linkUpDownNotifications yes' ],
}
hiera_include('object_classes')
}
hiera_include('object_classes')
package_manifest{'/var/lib/tripleo/installed-packages/overcloud_object': ensure => present}

View File

@ -89,6 +89,11 @@ class tripleo::ringbuilder (
}
}
if hiera('step') >= 2 {
# pre-install swift here so we can build rings
include ::swift
}
if hiera('step') >= 3 {
include ::tripleo::ringbuilder
}

View File

@ -26,27 +26,6 @@ resources:
update_identifier: {get_param: NodeConfigIdentifiers}
StoragePuppetConfig:
type: OS::Heat::SoftwareConfig
properties:
group: puppet
options:
enable_debug: {get_param: ConfigDebug}
outputs:
- name: result
config:
get_file: manifests/overcloud_object.pp
StorageDeployment_Step1:
type: OS::Heat::StructuredDeployments
depends_on: StorageArtifactsDeploy
properties:
name: StorageDeployment_Step1
servers: {get_param: servers}
config: {get_resource: StoragePuppetConfig}
input_values:
update_identifier: {get_param: NodeConfigIdentifiers}
StorageRingbuilderPuppetConfig:
type: OS::Heat::SoftwareConfig
properties:
group: puppet
@ -59,23 +38,48 @@ resources:
outputs:
- name: result
config:
get_file: manifests/ringbuilder.pp
list_join:
- ''
- - get_file: manifests/overcloud_object.pp
- get_file: manifests/ringbuilder.pp
StorageRingbuilderDeployment_Step2:
type: OS::Heat::StructuredDeployments
depends_on: StorageDeployment_Step1
depends_on: StorageArtifactsDeploy
properties:
name: StorageRingbuilderDeployment_Step2
servers: {get_param: servers}
config: {get_resource: StorageRingbuilderPuppetConfig}
config: {get_resource: StoragePuppetConfig}
input_values:
step: 3 # Note ringbuilder.pp expects >=3
step: 2
update_identifier: {get_param: NodeConfigIdentifiers}
StorageRingbuilderDeployment_Step3:
type: OS::Heat::StructuredDeployments
depends_on: StorageRingbuilderDeployment_Step2
properties:
name: StorageRingbuilderDeployment_Step3
servers: {get_param: servers}
config: {get_resource: StoragePuppetConfig}
input_values:
step: 3
update_identifier: {get_param: NodeConfigIdentifiers}
StorageDeployment_Step4:
type: OS::Heat::StructuredDeployments
depends_on: StorageRingbuilderDeployment_Step3
properties:
name: StorageDeployment_Step4
servers: {get_param: servers}
config: {get_resource: StoragePuppetConfig}
input_values:
step: 4
update_identifier: {get_param: NodeConfigIdentifiers}
# Note, this should come last, so use depends_on to ensure
# this is created after any other resources.
ExtraConfig:
depends_on: StorageRingbuilderDeployment_Step2
depends_on: StorageDeployment_Step4
type: OS::TripleO::NodeExtraConfigPost
properties:
servers: {get_param: servers}