Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/217723
Change subject: Further attempts to have puppet pick up the right fqdn ...................................................................... Further attempts to have puppet pick up the right fqdn Change-Id: Ib340e028470df26cc6830f355cc240c0ebe5aabb --- M modules/labs_bootstrapvz/files/firstboot.sh M modules/labs_vmbuilder/files/firstboot.sh 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/23/217723/1 diff --git a/modules/labs_bootstrapvz/files/firstboot.sh b/modules/labs_bootstrapvz/files/firstboot.sh index 3b81999..c9e7090 100644 --- a/modules/labs_bootstrapvz/files/firstboot.sh +++ b/modules/labs_bootstrapvz/files/firstboot.sh @@ -97,13 +97,13 @@ sed -i "s/_FQDN_/${fqdn}/g" /etc/puppet/puppet.conf sed -i "s/_MASTER_/${master}/g" /etc/puppet/puppet.conf sed -i "s/^domain .*$/domain ${fqdn}/g" /etc/resolv.conf +nscd -i hosts # This is only needed when running bootstrap-vz on # a puppetmaster::self instance, and even then # it isn't perfect mkdir /var/lib/puppet/client -puppet agent --enable systemctl restart nslcd.service systemctl restart nscd.service @@ -137,5 +137,6 @@ echo "Warning: Timed out trying to detect NFS mounts." fi +puppet agent --enable # Force initial puppet run puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff --waitforcert=10 --certname=${idfqdn} --server=${master} diff --git a/modules/labs_vmbuilder/files/firstboot.sh b/modules/labs_vmbuilder/files/firstboot.sh index bc042fc..b3f22b3 100644 --- a/modules/labs_vmbuilder/files/firstboot.sh +++ b/modules/labs_vmbuilder/files/firstboot.sh @@ -41,8 +41,6 @@ fi # At this point, all (the rest of) our disk are belong to LVM. -puppet agent --enable - binddn=`grep 'binddn' /etc/ldap.conf | sed 's/.* //'` bindpw=`grep 'bindpw' /etc/ldap.conf | sed 's/.* //'` hostsou=`grep 'nss_base_hosts' /etc/ldap.conf | sed 's/.* //'` @@ -75,6 +73,7 @@ sed -i "s/_FQDN_/${fqdn}/g" /etc/puppet/puppet.conf sed -i "s/_MASTER_/${master}/g" /etc/puppet/puppet.conf sed -i "s/^domain .*$/domain ${fqdn}/g" /etc/resolv.conf +nscd -i hosts /etc/init.d/nslcd restart /etc/init.d/nscd restart @@ -109,5 +108,6 @@ echo "Warning: Timed out trying to detect NFS mounts." fi +puppet agent --enable # Force initial puppet run puppet agent --onetime --verbose --no-daemonize --no-splay --show_diff --waitforcert=10 --certname=${fqdn} --server=${master} -- To view, visit https://gerrit.wikimedia.org/r/217723 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib340e028470df26cc6830f355cc240c0ebe5aabb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott <abog...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits