Add modulepath option when applying puppet inside docker.
When new module are added, we may miss the symlink in
/etc/puppet/modules. And for consistency as we mount the
/usr/share/openstack-puppet/modules directory it’s better to add it
to the modulepath.
Change-Id: I963aede41403ebbe3b9afb55a725b304a30a0cbb
Closes-Bug: #1736980
(cherry picked from commit 4a708af34a
)
This commit is contained in:
parent
0c569d5a0b
commit
2541400717
|
@ -227,7 +227,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
|
|||
|
||||
set +e
|
||||
FACTER_hostname=$HOSTNAME FACTER_uuid=docker /usr/bin/puppet apply \
|
||||
--detailed-exitcodes --color=false --logdest syslog --logdest console $TAGS /etc/config.pp
|
||||
--detailed-exitcodes --color=false --logdest syslog --logdest console --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules $TAGS /etc/config.pp
|
||||
rc=$?
|
||||
set -e
|
||||
if [ $rc -ne 2 -a $rc -ne 0 ]; then
|
||||
|
@ -245,6 +245,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
|
|||
done
|
||||
rsync -a -R --delay-updates --delete-after $rsync_srcs /var/lib/config-data/${NAME}
|
||||
|
||||
|
||||
# Also make a copy of files modified during puppet run
|
||||
# This is useful for debugging
|
||||
mkdir -p /var/lib/config-data/puppet-generated/${NAME}
|
||||
|
|
|
@ -163,7 +163,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 1}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'tripleo::firewall::rule'
|
||||
CONFIG: *step_config
|
||||
|
|
|
@ -169,7 +169,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 5}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::constraint::location'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::cinder::backup_bundle'
|
||||
|
|
|
@ -162,7 +162,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 5}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::constraint::location'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::cinder::volume_bundle'
|
||||
|
|
|
@ -248,7 +248,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation,galera_ready,mysql_database,mysql_grant,mysql_user'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::database::mysql_bundle'
|
||||
|
|
|
@ -150,7 +150,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::database::redis_bundle'
|
||||
|
|
|
@ -190,7 +190,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'tripleo::firewall::rule,pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
|
||||
CONFIG:
|
||||
|
|
|
@ -142,7 +142,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 5}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --tags file_line,concat,augeas,TAGS --debug -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::constraint::location'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::manila::share_bundle'
|
||||
|
|
|
@ -112,7 +112,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 3}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ip,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation'
|
||||
CONFIG:
|
||||
|
|
|
@ -185,7 +185,7 @@ outputs:
|
|||
list_join:
|
||||
- '; '
|
||||
- - "cp -a /tmp/puppet-etc/* /etc/puppet; echo '{\"step\": 2}' > /etc/puppet/hieradata/docker.json"
|
||||
- "FACTER_uuid=docker puppet apply --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
- "FACTER_uuid=docker puppet apply --modulepath /etc/puppet/modules:/opt/stack/puppet-modules:/usr/share/openstack-puppet/modules --tags file,file_line,concat,augeas,TAGS -v -e 'CONFIG'"
|
||||
params:
|
||||
TAGS: 'pacemaker::resource::bundle,pacemaker::property,pacemaker::resource::ocf,pacemaker::constraint::order,pacemaker::constraint::colocation,rabbitmq_policy,rabbitmq_user'
|
||||
CONFIG: 'include ::tripleo::profile::base::pacemaker;include ::tripleo::profile::pacemaker::rabbitmq_bundle'
|
||||
|
|
Loading…
Reference in New Issue