Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix `govuk_node_list --with-puppet-class` to show all the hosts #10049
it returns all the values:
- We were doing on-call out of hours reboots this morning and noticed that on the AWS side none of the AWS hostnames made any sense. "It would be nice if the reboot check could show what class of machine that is". This would avoid us having to login to the AWS Console, search the EC2 section for the hostname and _then_ check against the reboots doc. - Turns out this will already work, but only if the `govuk_node_list` command it relies on works properly itself. - Before, the `--with-puppet-class` function wasn't iterating through the instances properly as the `return` statement was returning the first instance it found (in all my testing, either `mongo-1` or `whitehall-backend-1`). This fixes it so that rather than: ``` $ govuk_node_list --with-puppet-class ip-10-1-6-48.eu-west-1.compute.internal:whitehall-backend-1 $ ``` it returns all the values: ``` $ govuk_node_list --with-puppet-class [...] ip-10-1-6-231.eu-west-1.compute.internal:content-store-1 ip-10-1-6-45.eu-west-1.compute.internal:draft-cache-1 ip-10-1-6-185.eu-west-1.compute.internal:cache-1 ip-10-1-6-4.eu-west-1.compute.internal:rabbitmq ip-10-1-6-48.eu-west-1.compute.internal:whitehall-backend-1 $ ``` https://trello.com/c/dw9iaOBM/1676-improve-reboot-required-icinga-check-wording
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.