evacuating an instance loses files specified via "--file" on the cli
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
I booted up an instance as follows in my stable/mitaka devstack environment:
$ echo "this is a test" > /tmp/my_
$ echo "blah1" > /tmp/file1
$ echo "blah2" > /tmp/file2
$ nova boot --flavor m1.tiny --image cirros-
This booted up an instance, and within the guest I ran the following:
$ mkdir mnt
$ mount /dev/sr0 mnt
$ cat mnt/openstack/
this is a test
$ umount mnt
$ cat /root/file1
blah1
$ cat /tmp/file2
blah2
Then I killed the compute node and ran "nova evacuate testing".
The evacuated instance had a config drive at /dev/sr0, but it did not have the /root/file1 or /tmp/file2 files. This is arguably incorrect.
It seems like a related issue is that if you boot with "--file" and then do a "nova rebuild" without the "--file" option then you lose the injected file. This makes sense since an evacuate is basically a rebuild to the same image.
As mentioned on IRC by mdbooth, it seems like the logical fix would be to store the injected file(s) in the DB. Which is not really ideal.