I have created a spot VM to test the preemption process that I will be using in my clusters later in production. I have added a shutdown-script to the VM which creates and uploads a flag file to GCP storage for failure recovery /resumption of the job.
I have then simulated the preemption by simulating host maintenance on my VM (using `gcloud compute instances simulate-maintenance-event` command) and expected the VM to run the shutdown script when stopping and create and copy the file to the storage.
I can not see the VM doing the expected behavior when simulating the preemption, as if it is not running the shutdown script, however, it does as expected when I stop the VM manually both via the console and from within the VM itself using `shutdown now` command.
I wonder why this is happening and if I have configured something wrong?