Page MenuHomePhabricator

puppet: remove cluster variable
Closed, ResolvedPublic

Description

while reviewing a change I noticed a comment from @Joe pointing out that lookups for the cluster hiera value need to pass the global $::cluster variable as a default. The use of a global value instead of a hiera default seemed odd to me and the fact that both the global value and the hiera key are named the same seemed a bit confusing.

Looking at the code it seems that we could get rid of the global cluster variable if we simply add a default to labs.yaml and comon.yaml, although i suspect I'm missing some historical context :). Or possibly this was needed before the hiera search order was changed

Event Timeline

jbond created this task.Mon, Oct 7, 10:05 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMon, Oct 7, 10:05 AM

Change 541213 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] puppet: change $::cluster variable to a hiera default

https://gerrit.wikimedia.org/r/541213

jbond added subscribers: Joe, fgiunchedi.
Joe added a comment.Mon, Oct 7, 1:55 PM

The reason for the presence of the global variable was that, back in the day, it was the only way to inject the "cluster" in WMCS VMs. Nowadays they can all use hiera so that should not be a problem anymore.

jbond added a comment.EditedMon, Oct 7, 2:08 PM

The reason for the presence of the global variable was that, back in the day, it was the only way to inject the "cluster" in WMCS VMs. Nowadays they can all use hiera so that should not be a problem anymore.

Thanks Joe, as recommended, i have added Andrew and Arturo to the change to confirm it is not needed

jbond triaged this task as Normal priority.Mon, Oct 7, 2:15 PM
jbond added a project: Cloud-Services.
Penggang1 removed jbond as the assignee of this task.Mon, Oct 7, 4:11 PM
Penggang1 set Due Date to Mon, Oct 7, 4:00 PM.
Penggang1 removed subscribers: fgiunchedi, Joe, Aklapper, jbond.
Reedy assigned this task to jbond.Mon, Oct 7, 4:23 PM
Reedy removed Due Date.
Reedy added subscribers: fgiunchedi, Joe, Aklapper, jbond.

Change 541213 merged by Jbond:
[operations/puppet@production] puppet: change $::cluster variable to a hiera default

https://gerrit.wikimedia.org/r/541213

jbond closed this task as Resolved.Wed, Oct 16, 12:02 PM