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

handle maintenance-event #42

Merged

Conversation

octu0
Copy link
Contributor

@octu0 octu0 commented Jun 3, 2024

I have added maintenance-event handling

Not Found in current implementation.

$ curl -s -H 'Metadata-Flavour: Google' http://metadata.google.internal/computeMetadata/v1/instance/maintenance-event
Not Found

configuration is as below:

$ cat /path/to/myconfig.json | jq .computeMetadata.v1.instance.maintenanceEvent
"NONE"

In my patch, it returns a json maintenanceEvent

$ curl -s -H 'Metadata-Flavor: Google' http://metadata.google.internal:8080/computeMetadata/v1/instance/maintenance-event
NONE

I am testing the following by launching two implementations, one current and one new

# current
$ gce_metadata_server -configFile /path/to/myconfig.json \
  -serviceAccountFile /path/to/mycredential.json \
  -interface "169.254.169.254" -port ":80" &

# my patch
$ gce_metadata_server -configFile /path/to/myconfig.json \
  -serviceAccountFile /path/to/mycredential.json \
  -interface "169.254.169.254" -port ":8080" &

@salrashid123 salrashid123 merged commit 62cc184 into salrashid123:master Jun 3, 2024
@octu0 octu0 deleted the topic-handle-maintenance-event branch June 4, 2024 01:32
@octu0
Copy link
Contributor Author

octu0 commented Jun 4, 2024

thank you!

@octu0 octu0 mentioned this pull request Jun 4, 2024
@octu0
Copy link
Contributor Author

octu0 commented Jun 4, 2024

I'm so sorry. please check #43

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