From 8b642ecacccf72c2619441f9e13ce3364cf2a83a Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 7 Oct 2016 11:12:00 -0700 Subject: [PATCH] Run a primer puppet run before parallel puppet We are seeing races in the puppet apply test to create /opt/system-config/hieradata. Avoid this by running a simple hello world puppet manifest prior to running all of our test manifests in parallel. This should force the ansible puppet role to populate all the things on disk first avoiding races. Change-Id: If3946f561535ba315f018ab3122dcde56144240f --- tools/apply-test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/apply-test.sh b/tools/apply-test.sh index a0477301d6..1a57fcc156 100755 --- a/tools/apply-test.sh +++ b/tools/apply-test.sh @@ -59,8 +59,16 @@ if [[ $FOUND == "0" ]]; then exit 1 fi +cat > applytest/primer.pp << EOF +class helloworld { + notify { 'hello, world!': } +} +EOF + sudo mkdir -p /var/run/puppet sudo -E bash -x ./install_modules.sh +echo "Running apply test primer to avoid setup races when run in parallel." +./tools/test_puppet_apply.sh applytest/primer.pp echo "Running apply test on these hosts:" find applytest -name 'puppetapplytest*.final' -print0 find applytest -name 'puppetapplytest*.final' -print0 | \