Ensure Puppet4 compatibility

Packstack needs to support Puppet4. This patch will include all
fixes needed to achieve this.

Change-Id: Ifaac917308c5d524c3ec51243d92093f0139c9fe
This commit is contained in:
Javier Pena 2016-10-07 17:08:25 +02:00
parent 9baa54377c
commit 3aee627396
7 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,6 @@
class packstack::glance::backend::swift ()
{
Service<| tag == 'swift-service' |> -> Service['glance-api']
class { '::glance::backend::swift':
swift_store_user => 'services:glance',
swift_store_key => hiera('CONFIG_GLANCE_KS_PW'),

View File

@ -15,7 +15,7 @@ class packstack::neutron::rabbitmq ()
file { $files_to_set_owner:
owner => 'neutron',
group => 'neutron',
require => Package['openstack-neutron'],
require => Package['neutron'],
}
File[$files_to_set_owner] ~> Service<| tag == 'neutron-service' |>
}

View File

@ -25,13 +25,19 @@ class packstack::nova::api ()
auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
}
if hiera('CONFIG_NOVA_PCI_ALIAS') == '' {
$pci_alias = false
} else {
$pci_alias = hiera('CONFIG_NOVA_PCI_ALIAS')
}
class { '::nova::api':
api_bind_address => $bind_host,
metadata_listen => $bind_host,
enabled => true,
neutron_metadata_proxy_shared_secret => hiera('CONFIG_NEUTRON_METADATA_PW_UNQUOTED', undef),
default_floating_pool => $default_floating_pool,
pci_alias => hiera('CONFIG_NOVA_PCI_ALIAS'),
pci_alias => $pci_alias,
sync_db_api => true,
osapi_compute_workers => hiera('CONFIG_SERVICE_WORKERS'),
metadata_workers => hiera('CONFIG_SERVICE_WORKERS'),

View File

@ -9,7 +9,7 @@ class {'::packstack::prereqs':
create_resources(sshkey, hiera('SSH_KEYS', {}))
if hiera('CONFIG_NTP_SERVERS', undef) != undef {
if hiera('CONFIG_NTP_SERVERS', '') != '' {
include '::packstack::chrony'
}

View File

@ -7,7 +7,7 @@ class {'::packstack::prereqs':
stage => init,
}
if hiera('CONFIG_NTP_SERVERS', undef) != undef {
if hiera('CONFIG_NTP_SERVERS', '') != '' {
include '::packstack::chrony'
}
@ -38,8 +38,8 @@ if hiera('CONFIG_GLANCE_INSTALL') == 'y' {
if hiera('CONFIG_CINDER_INSTALL') == 'y' {
include '::packstack::keystone::cinder'
include '::packstack::cinder'
include '::packstack::cinder::rabbitmq'
include '::packstack::cinder'
if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' {
include '::packstack::cinder::ceilometer'
}
@ -71,7 +71,6 @@ if hiera('CONFIG_NOVA_INSTALL') == 'y' {
include '::packstack::nova'
include '::packstack::nova::common'
include '::packstack::nova::api'
include '::packstack::nova::cert'
include '::packstack::nova::conductor'
if hiera('CONFIG_IRONIC_INSTALL') == 'y' {

View File

@ -7,7 +7,7 @@ class {'::packstack::prereqs':
stage => init,
}
if hiera('CONFIG_NTP_SERVERS', undef) != undef {
if hiera('CONFIG_NTP_SERVERS', '') != '' {
include '::packstack::chrony'
}

View File

@ -237,6 +237,9 @@ else
$SUDO yum -y install openstack-packstack
fi
# Make sure there are no other puppet modules in the system (happens in gate)
$SUDO rm -rf /etc/puppet/modules/*
# Make sure the fqdn is associated to the IP in /etc/hosts
# Needed for Horizon SSL tests in Tempest
echo -e "\n127.0.0.1 $(facter fqdn)" | $SUDO tee -a /etc/hosts