2
votes

we have a startup-script that is working fine, but it only gets executed after reboot.

i'm updating gcutil to gcloud compute and centos6 to centos7.

I'm not sure if this has something to do with security issues (SElinux?).

Can someone please help me debugging this?

Facts: There startup-script log doesn't exist at instance creation. Also, in output console it says that there is no startup-scripts.

After rebooting, everything goes how it should.

2
Just found this in Serial Console: localhost run-startup-scripts: ... curl: (6) Could not resolve host: metadata.google.internal; Unknown error - brdido
And after some seconds the following : NetworkManager[563]: <info> startup complete Is my instance querying for metadata before network manager starts? How do I solve this? - brdido

2 Answers

2
votes

Editing /usr/share/google/run-startup-scripts to sleep for 30 seconds works.

Just add :

sleep 30 (You may also try lower intervals)

It is an immediate answer for the problem but it is far from being the real solution.

My clues and how I got here are im my comments

0
votes

If I am not mistaking, the startup script executes only on system startup/reboot, so this should work as expected. Script gets executed after the machine is restarted. How are you passing it to the metadata server ? is it startup-script, startup-script-url, from GCS bucket ? I have seen "centos-7-v20141016" having issues processing startup scripts.