Add step to docker_puppet_tasks

This patch sets the step correctly for docker_puppet_tasks.
This is now required in order to match the 'step' in some
puppet manifests explicitly so that things like keystone
initialization run correctly.

Closes-bug: #1667454

Change-Id: If2bdd0b1051125674f116f895832b48723d82b3a
This commit is contained in:
Dan Prince 2017-02-23 14:42:19 -05:00
parent 571e67c136
commit f09f50f96a
3 changed files with 6 additions and 3 deletions

View File

@ -127,7 +127,7 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
mkdir -p /etc/puppet mkdir -p /etc/puppet
cp -a /tmp/puppet-etc/* /etc/puppet cp -a /tmp/puppet-etc/* /etc/puppet
rm -Rf /etc/puppet/ssl # not in use and causes permission errors rm -Rf /etc/puppet/ssl # not in use and causes permission errors
echo '{"step": 6}' > /etc/puppet/hieradata/docker.json echo '{"step": %(step)s}' > /etc/puppet/hieradata/docker.json
TAGS="" TAGS=""
if [ -n "%(puppet_tags)s" ]; then if [ -n "%(puppet_tags)s" ]; then
TAGS='--tags "%(puppet_tags)s"' TAGS='--tags "%(puppet_tags)s"'
@ -162,7 +162,8 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
fi fi
""" % {'puppet_tags': puppet_tags, 'name': config_volume, """ % {'puppet_tags': puppet_tags, 'name': config_volume,
'hostname': hostname, 'hostname': hostname,
'no_archive': os.environ.get('NO_ARCHIVE', '')}) 'no_archive': os.environ.get('NO_ARCHIVE', ''),
'step': os.environ.get('STEP', '6')})
with tempfile.NamedTemporaryFile() as tmp_man: with tempfile.NamedTemporaryFile() as tmp_man:
with open(tmp_man.name, 'w') as man_file: with open(tmp_man.name, 'w') as man_file:

View File

@ -68,6 +68,7 @@ resources:
- name: CONFIG - name: CONFIG
- name: NET_HOST - name: NET_HOST
- name: NO_ARCHIVE - name: NO_ARCHIVE
- name: STEP
{{primary_role_name}}DockerPuppetTasksDeployment{{step}}: {{primary_role_name}}DockerPuppetTasksDeployment{{step}}:
type: OS::Heat::SoftwareDeployment type: OS::Heat::SoftwareDeployment
@ -85,6 +86,7 @@ resources:
CONFIG: /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json CONFIG: /var/lib/docker-puppet/docker-puppet-tasks{{step}}.json
NET_HOST: 'true' NET_HOST: 'true'
NO_ARCHIVE: 'true' NO_ARCHIVE: 'true'
STEP: {{step}}
{% endfor %} {% endfor %}
# END primary_role_name docker-puppet-tasks # END primary_role_name docker-puppet-tasks

View File

@ -144,7 +144,7 @@ outputs:
[ 'keystone', 'keystone-manage', 'bootstrap', '--bootstrap-password', {get_param: AdminPassword} ] [ 'keystone', 'keystone-manage', 'bootstrap', '--bootstrap-password', {get_param: AdminPassword} ]
docker_puppet_tasks: docker_puppet_tasks:
# Keystone endpoint creation occurs only on single node # Keystone endpoint creation occurs only on single node
step_4: step_3:
- 'keystone_init_tasks' - 'keystone_init_tasks'
- 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain' - 'keystone_config,keystone_domain_config,keystone_endpoint,keystone_identity_provider,keystone_paste_ini,keystone_role,keystone_service,keystone_tenant,keystone_user,keystone_user_role,keystone_domain'
- 'include ::tripleo::profile::base::keystone' - 'include ::tripleo::profile::base::keystone'