Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

[Question] Handles simulated termination events? #8

Open
ernsheong opened this issue Jan 1, 2019 · 7 comments
Open

[Question] Handles simulated termination events? #8

ernsheong opened this issue Jan 1, 2019 · 7 comments

Comments

@ernsheong
Copy link

ernsheong commented Jan 1, 2019

Hi there,

Does this handle simulated terminations via Stopping a preemptible instance manually? Initial test seems to suggest not, node was not being drained

If not, how can we test terminations?

Thanks,
Jonathan

@petervandenabeele
Copy link

Seeing similar behaviour; a manual STOP seemed to trigger no action at all by the node-termination-handler (neither in the logs, or nothing cordoned).

Should we send the signal manually to test the behaviour ?

@meysammeisam
Copy link

@vishh

@vishh
Copy link
Contributor

vishh commented Mar 12, 2019

What base image (COS vs Ubuntu) was used for the test? Was the test performed on GKE?

@meysammeisam
Copy link

Yes, GKE COS.

@wbyoung
Copy link

wbyoung commented Apr 2, 2019

If you follow the code from here, I'm pretty sure this does not handle manual termination.

@Monnoroch
Copy link

Any pointers as to how would one add support for manual termination too?

@jbartus
Copy link

jbartus commented Oct 24, 2019

@larsha answered this for me in the gke slack, you can "simulate" (manually invoke) this with: gcloud compute instances simulate-maintenance-event <instance>

I validated with a standalone ubuntu pod running this curl:

curl "http://metadata.google.internal/computeMetadata/v1/instance/preempted?wait_for_change=true" -H "Metadata-Flavor: Google"

And then running the simulate-maintenance-event command above. The curl returned TRUE right before the pod died.

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

No branches or pull requests

7 participants