Comment 8 for bug 1602373

Revision history for this message
Scott Moser (smoser) wrote :

Verified.
# launch instance
sstack openstack server create --key-name=brickies --flavor=m1.small --config-drive=1 --image=$img --user-data=user-data --file=/my-file.txt=my-file.txt injected-file0

# on the instance (first boot, unpatched)
$ cat /etc/cloud/build.info
build_name: server
serial: 20160715
$ cat /run/my.log
=== FAIL: no file /my-file.txt ====
$ dpkg-query --show cloud-init
cloud-init 0.7.7~bzr1246-0ubuntu1~16.04.1

# update the system
$ sudo sh ./enable-proposed
$ sudo apt-get update
$ sudo apt-get install cloud-init
$ dpkg-query --show cloud-init
cloud-init 0.7.7~bzr1256-0ubuntu1~16.04.1

# similate first boot on pristine image
$ sudo rm -Rf /var/log/cloud-init /var/lib/cloud/
$ sudo reboot

# ssh in
$ cat /run/my.log
=== PASS: file /my-file.txt ====
hi mom

$ ls -l /my-file.txt
-rw-rw---- 1 root root 7 Jul 18 18:57 /my-file.txt
$ sudo cat /my-file.txt
hi mom