GCE shutdown-script with CoreOS

149 views
Skip to first unread message

Chad Autry

unread,
Jan 22, 2016, 10:30:03 PM1/22/16
to gce-discussion
I've entered a shutdown-script and a startup-script into the Custom Metadata of my GCE instance running CoreOS.
The startup-script executes perfectly, but I don't see any evidence the shutdown-script is even invoked. I've tried shutting down from the console, and by executing 'sudo shutdown' 
I've attached a picture of me Custom Metadata.

Anyone else have the same issue or spot what my problem is?
customMetadata.png

Kamran (Google Cloud Support)

unread,
Jan 24, 2016, 8:15:50 PM1/24/16
to gce-discussion

Hey Chad,

The following command in shut-down script kills the container:

sudo docker exec mc_server /bin/sh /usr/bin/containerizedMinecraftServer.sh exec "say The Virtual Machine is being shut down. Turning off saves and backing up the world."

It seems a line in containerizedMinecraftServer.sh script which writes to a named pipe file ( /tmp/srv-input) inside the container is causing of the issue.

Sincerely,

Chad Autry

unread,
Jan 24, 2016, 8:52:12 PM1/24/16
to gce-discussion
That command works as expected when executed from the console and not invoked from a shutdown-script.

Anyways, to take the internals of the command out of the question, I edited my shutdown-script to have
echo 'shutdown-script test' | sudo tee --append /minecraft/shutdownTest.log
as the first line.

When shutting down the VM, then restarting I don't see the file. /minecraft is a mounted persistent disk if that matters.

Kamran (Google Cloud Support)

unread,
Feb 4, 2016, 7:57:08 PM2/4/16
to gce-discussion

Hi Chad,

I've opened a public issue tracker for this issue on this link. We are currently investigating this problem. You can star the link to receive any status updates or additional information which will be posted there.

Thank you,
Reply all
Reply to author
Forward
0 new messages