Document our usage of label
Problem Statement
During Incident: production#17465 (closed)
We had to relearn how Ansible built and created the groups leveraged for making changes owned by Deployer. Let's make a quick win and document how to troubleshoot the problem.
Solution(s)
- Document how to test the GCP plugin for Ansible. Currently it's a simple
make get-inventory
from thedeploy-tooling
repository, but this output is large and takes a bit of time to parse. Consider developing an easier way to accomplish this. - Consider adding comments in code to indicate where the label we require comes from: https://ops.gitlab.net/gitlab-com/gl-infra/deploy-tooling/-/blob/master/common_tasks/lb_facts.yml?ref_type=heads#L5 (
service_haproxy_main
is generated, not by us) - Add documentation to https://handbook.gitlab.com/handbook/infrastructure-standards/labels-tags/ to indicate the required use of the labels we leverage
- Consider modifying our code where it validates the group exists, and output an appropriate error and where to go look for a potential fix. Pseudo example:
if service_haproxy_main.empty: panic
- Consider if there's a better label, if yes, create an issue to make said change
Edited by John Skarbek