Andrew Bogott has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/369873 )
Change subject: Fix firstboot salt minion id on labs
......................................................................
Fix firstboot salt minion id on labs
A new labs instance provision the salt id without the labs project name
eg: instance.eqiad.wmflabs
/etc/resolv.conf is then updated to add 'search <project>.eqiad.wmflabs'
and the salt id is changed to include the project:
instance.project.eqiad.wmflabs
When the salt master auto accept minions, that causes the instance to be
registered under both id:
$ salt-key
instance.eqiad.wmflabs
instance.project.eqiad.wmflabs
$
And later causes salt to time out while trying to reach the improper id:
$ salt -v 'instance*' test.ping
instance.project.eqiad.wmflabs:
True
instance.eqiad.wmflabs
Minion did not return. [No response]
$
Ensure /etc/resolv.conf is generated before /etc/salt/minion is
provisionned.
The way to test it:
* merge this patch on the labs puppet master
* boot an instance
Once provisioned verify the salt id include the labs project name:
$ grep id: /var/log/daemon.log
Change-Id: I36334be5e1a3b112ae5dcd5461e8c03e099d7aa2
---
M modules/profile/manifests/base.pp
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Andrew Bogott: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/profile/manifests/base.pp
b/modules/profile/manifests/base.pp
index b973b5b..5df51c8 100644
--- a/modules/profile/manifests/base.pp
+++ b/modules/profile/manifests/base.pp
@@ -74,7 +74,11 @@
# TODO: Fix the whole top-scope variable override thing
# we currently have for these two
- include ::role::salt::minions
+ class { '::role::salt::minions':
+ # The minion id comes from DNS and we need /etc/resolv.conf to have
+ # search <project>.<site>.wmflabs to have a minion id matching the fqdn
+ require => Class['::base::resolving'],
+ }
include ::trebuchet
class { '::nrpe':
--
To view, visit https://gerrit.wikimedia.org/r/369873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I36334be5e1a3b112ae5dcd5461e8c03e099d7aa2
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Chasemp <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits