summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-16 23:33:19 +0000
committerGerrit Code Review <review@openstack.org>2017-06-16 23:33:19 +0000
commitad3d0da798addf6905957029bdbdfe2d509cc008 (patch)
tree7986398bb1955ca230d5f2649bee466ed48b618e
parent10c53f61891756e40e7bd1fc536df25e051485ae (diff)
parent74595a73210bb9cf5e0d688c57e9fa5423422603 (diff)
Merge "Make a copy of files touched by puppet in container"
-rwxr-xr-xdocker/docker-puppet.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py
index 4d9d40d..1321167 100755
--- a/docker/docker-puppet.py
+++ b/docker/docker-puppet.py
@@ -208,6 +208,13 @@ def mp_puppet_config((config_volume, puppet_tags, manifest, config_image, volume
208 done 208 done
209 rsync -a -R --delay-updates --delete-after $rsync_srcs /var/lib/config-data/${NAME} 209 rsync -a -R --delay-updates --delete-after $rsync_srcs /var/lib/config-data/${NAME}
210 210
211 # Also make a copy of files modified during puppet run
212 # This is useful for debugging
213 mkdir -p /var/lib/config-data/puppet-generated/${NAME}
214 rsync -a -R -0 --delay-updates --delete-after \
215 --files-from=<(find $rsync_srcs -newer /etc/ssh/ssh_known_hosts -print0) \
216 / /var/lib/config-data/puppet-generated/${NAME}
217
211 # Write a checksum of the config-data dir, this is used as a 218 # Write a checksum of the config-data dir, this is used as a
212 # salt to trigger container restart when the config changes 219 # salt to trigger container restart when the config changes
213 tar cf - /var/lib/config-data/${NAME} | md5sum | awk '{print $1}' > /var/lib/config-data/${NAME}.md5sum 220 tar cf - /var/lib/config-data/${NAME} | md5sum | awk '{print $1}' > /var/lib/config-data/${NAME}.md5sum