When I log in after trying to debug something I find that the command prompt gives me the following:
1 2 3 4 5 |
core@ci ~ $ ssh -i tco-gold.pem core@10.2.3.6 Last login: Wed May 27 19:45:10 2015 from 10.2.3.7 CoreOS stable (633.1.0) Failed Units: 1 coreos-cloudinit-547659032.service |
So to figure out where my script went wrong, I simply have to run the command:
1 |
systemctl status -l <name of service> |
So in my case it was:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
core@coreos633-jenkins-slave ~ $ systemctl status -l coreos-cloudinit-547659032.service ● coreos-cloudinit-547659032.service - Unit generated and executed by coreos-cloudinit on behalf of user Loaded: loaded (/run/systemd/system/coreos-cloudinit-547659032.service; static; vendor preset: disabled) Drop-In: /run/systemd/system/coreos-cloudinit-547659032.service.d └─50-Description.conf, 50-ExecStart.conf Active: failed (Result: exit-code) since Wed 2015-05-27 19:44:41 UTC; 2min 58s ago Process: 562 ExecStart=/bin/bash /var/lib/coreos-cloudinit/scripts/547659032 (code=exited, status=255) Main PID: 562 (code=exited, status=255) May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/plugin/ May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/plugin/desktop/ May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/plugin/desktop/sun_java.png May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/plugin/desktop/sun_java.desktop May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/COPYRIGHT May 27 19:44:40 coreos633-jenkins-slave.novalocal bash[562]: jre1.7.0_51/THIRDPARTYLICENSEREADME-JAVAFX.txt May 27 19:44:41 coreos633-jenkins-slave.novalocal bash[562]: getaddrinfo ssh-keyscan: Name or service not known May 27 19:44:41 coreos633-jenkins-slave.novalocal systemd[1]: coreos-cloudinit-547659032.service: main process exited, code=exited, status=255/n/a May 27 19:44:41 coreos633-jenkins-slave.novalocal systemd[1]: Unit coreos-cloudinit-547659032.service entered failed state. May 27 19:44:41 coreos633-jenkins-slave.novalocal systemd[1]: coreos-cloudinit-547659032.service failed. |
It turns out, I put an extra ssh-keyscan in the the script and it thought it was the hostname!
Removing the extra characters worked.