Skip to content

Best-effort attempt to check for remote maintenance#195

Closed
lbonanomi wants to merge 1 commit into
Autodesk:masterfrom
lbonanomi:179
Closed

Best-effort attempt to check for remote maintenance#195
lbonanomi wants to merge 1 commit into
Autodesk:masterfrom
lbonanomi:179

Conversation

@lbonanomi
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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