Page MenuHomePhabricator

Make a fact for project_id on labs instances
Closed, ResolvedPublic

Description

It's going to be ugly, but we're going to need this

Event Timeline

Andrew raised the priority of this task from to Needs Triage.
Andrew updated the task description. (Show Details)
Andrew subscribed.
Andrew added a project: Cloud-Services.
Andrew set Security to None.

Isn't that what ${instanceproject} is?

It is, but it comes from ldap. Would be nice if we could get it from metadata instead (but it isn't in there :( )

Andrew triaged this task as Medium priority.May 13 2015, 3:16 PM

Change 220991 had a related patch set uploaded (by Andrew Bogott):
Add a labsproject fact that doesn't rely on ldap config.

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

Note that the attached patch will only work once the metadata has been updated for legacy instances.

ok, I've added the project-id metadata setting to every instance.

Change 220991 merged by Andrew Bogott:
Add a labsproject fact that doesn't rely on ldap config.

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

(This is almost totally done, needs verification before closing)

ok, the fact is in place and works. It depends on the insertion of project-id into metadata by sink_nova_ldap.

In Libery and later, metadata will provide project_id automatically, and we can switch the fact over to use that and strip out the project-id code from sink_nova_ldap.

Some of our code still relies on the ldap $::instanceproject puppet variable, so those refs need to be purged before this bug is closed.

Can we also then get rid of the ldap variable from wikitech puppet groups?

...I think so? But I'm confused by the phrase 'wikitech puppet group'

Change 230652 had a related patch set uploaded (by Andrew Bogott):
replace $::instanceproject with $::labsproject

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

AFAIU operations/puppet's modules/shinken/files/shinkengen, Shinken uses the LDAP data to get a list of instances for a project, so that needs to be updated as well.

scfc: yes, see blocking bug list

Change 230652 merged by Andrew Bogott:
replace $::instanceproject with $::labsproject

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