Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best-effort attempt to check for remote maintenance #195

Closed
wants to merge 1 commit into from
Closed

Best-effort attempt to check for remote maintenance #195

wants to merge 1 commit into from

Conversation

lbonanomi
Copy link

Per #179 this change attempts to poll a remote instance to check its maintenance status and abort update-stats.py if the instance is currently under-maintenance.

Checks are executed with the (batteries-included) http.client and json libraries instead of Requests to enhance portability

@larsxschneider
Copy link
Collaborator

Thanks for opening this PR, @lbonanomi !

I think there is an easier way to query the maintenance status. Can you try to run this command via the admin SSH console?

ghe-maintenance --query

More info here: https://help.github.com/en/enterprise/admin/installation/command-line-utilities#ghe-maintenance

@lbonanomi
Copy link
Author

@larsxschneider I agree that ghe-maintenance --query is simpler, it just seemed prudent to knock on the proverbial door before trying to log-in.

If you think calling on the maintenance API is the wrong thing to do may I try again with the CLI tools?

@larsxschneider
Copy link
Collaborator

I would prefer the CLI tools as we already have the SSH key to access the console nicely. Calling the maint API is not wrong, it is just that we would need to store additional credentials to access the API.

@lbonanomi
Copy link
Author

Closing this PR to pivot the test-for-maintenance model, I'll be back after the weekend with a CLI-based check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants