disk-image-create deleting system /dev during image create
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
Fix Released
|
Critical
|
Unassigned |
Bug Description
The disk-image-create run by nodepool is causing problems by deleting the contents of the /dev directory. This appears to happen as a result of /dev getting bind mounted to the working space of the image getting created and then a bulk mv command moving all the staged input files onto the target disk image. This swoops up /dev's content in the move.
The command triggered by nodepool (observed via ps):
nodepool 10846 4465 0 20:23 pts/3 00:00:01 /usr/bin/python /usr/local/
nodepool 10890 8727 0 20:23 ? 00:00:00 /bin/bash /usr/local/
(Note, -t is missing a qcow2 arg. This appears to result from a nodepool config parse bug which will be submitted separately.)
The image.log file shows the last actions of the build as:
2016-01-25 20:25:57,037 INFO nodepool.
2016-01-25 20:25:57,040 INFO nodepool.
2016-01-25 20:25:57,043 INFO nodepool.
2016-01-25 20:25:57,071 INFO nodepool.
2016-01-25 20:25:57,599 INFO nodepool.
2016-01-25 20:25:57,600 INFO nodepool.
2016-01-25 20:25:57,600 INFO nodepool.
2016-01-25 20:25:57,600 INFO nodepool.
2016-01-25 20:25:57,601 INFO nodepool.
2016-01-25 20:25:57,601 INFO nodepool.
2016-01-25 20:25:57,601 INFO nodepool.
2016-01-25 20:25:57,602 INFO nodepool.
2016-01-25 20:25:59,369 INFO nodepool.
2016-01-25 20:25:59,369 INFO nodepool.
After this point the build system is hosed. A reboot returns normal operation.
Here are the bind mounts inplace at the time of the mv:
root@ci:~# mount | grep bind
/mnt/opt/
/mnt/opt/
/dev on /mnt/opt/
/dev/pts on /mnt/opt/
The system image on which the build is occurring is defined by the openstackci configuration
http://
If disk-image-create is called by hand via the nodepool user account (with -t fixed) the same problem occurs:
TMPDIR=/opt/dib_tmp DIB_IMAGE_
Interestingly, if called from an ordinary user account the image build succeeds without breaking /dev:
# as ubuntu user
disk-image-create ubuntu vm
Changed in diskimage-builder: | |
importance: | Undecided → Critical |
Changed in diskimage-builder: | |
status: | New → Fix Released |
This is the log from the /var/log/ nodepool/ image/image. log for a build triggered by
nodepool image-build trustyvm
run from the nodepool account on the ci node defined by openstackci.
This triggers a background process from nodepoold:
/bin/bash /usr/local/ bin/disk- image-create -x -t qcow2 --no-tmpfs --qemu-img-options compat=0.10 -o /opt/nodepool_dib/4 ubuntu vm