Hi,
Thanks for taking the time to open a bug and help in making Ubuntu better.
I'm not able to recreate the issue you're seeing. Working off the doc at https://help.ubuntu.com/community/CloudInit . I've attached the user-data that was created by write-mime-multipart, but here is what I did to try to reproduce:
Then, inside the instance I did:
$ sudo sh -c 'for f in /root/*.log; do echo "#$f"; cat $f; done'
#/root/boothook.log
=== Wed Dec 5 19:09:36 UTC 2012: running /var/lib/cloud/instances/i-06d52c78/boothooks/my-boothook ===
#/root/userscript.log
=== Wed Dec 5 19:09:49 UTC 2012: running /var/lib/cloud/instance/scripts/my-userscript ===
That shows that the scripts ran 13 seconds apart (one early in boot and one later). And by their names, its clear that one ran as a boothook and one as a user-script.
Hi, /help.ubuntu. com/community/ CloudInit . I've attached the user-data that was created by write-mime- multipart, but here is what I did to try to reproduce:
Thanks for taking the time to open a bug and help in making Ubuntu better.
I'm not able to recreate the issue you're seeing. Working off the doc at https:/
# ami-9c78c0f5 = us-east-1 ubuntu- precise- 12.04-amd64- server- 20121026. 1
$ cat my-boothook
#!/bin/sh
echo "=== $(date): running $0 $* ===" | tee -a /root/boothook.log
echo myhostname > /etc/hostname
$ cat my-userscript t.log
#!/bin/sh
echo "=== $(date): running $0 $* ===" | tee -a /root/userscrip
$ write-mime- multipart --output= userdata. txt \ text/cloud- boothook my-userscript: text/x- shellscript
my-boothook:
$ euca-run-instances --key=brickies --instance- type=t1. micro \ data-file= userdata. txt ami-9c78c0f5
--user-
Then, inside the instance I did: cloud/instances /i-06d52c78/ boothooks/ my-boothook === userscript. log cloud/instance/ scripts/ my-userscript ===
$ sudo sh -c 'for f in /root/*.log; do echo "#$f"; cat $f; done'
#/root/boothook.log
=== Wed Dec 5 19:09:36 UTC 2012: running /var/lib/
#/root/
=== Wed Dec 5 19:09:49 UTC 2012: running /var/lib/
That shows that the scripts ran 13 seconds apart (one early in boot and one later). And by their names, its clear that one ran as a boothook and one as a user-script.