Not checking image format produces lots of useless messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Low
|
Unassigned |
Bug Description
The code for resizing partitionless images goes with the "tell, don't ask" idea and attempts to run extfs / mount utilities on an image even though they may fail. This produces lots of useless messages during the instance preparation, like these:
2013-11-21 06:45:07 20902 DEBUG nova.virt.
Command: sudo nova-rootwrap /etc/nova/
Exit code: 32
Stdout: ''
Stderr: 'mount: you must specify the filesystem type\n' mnt_dev /usr/lib/
2013-11-21 06:45:07 20902 DEBUG nova.virt.
2013-11-21 06:45:07 20902 DEBUG nova.virt.
2013-11-21 06:45:07 20902 DEBUG nova.virt.
2013-11-21 06:45:07 20902 DEBUG nova.openstack.
2013-11-21 06:45:07 20902 DEBUG nova.virt.
Command: sudo nova-rootwrap /etc/nova/
Exit code: 32
Stdout: ''
Stderr: 'mount: you must specify the filesystem type\n') setup /usr/lib/
2013-11-21 06:45:07 20902 DEBUG nova.virt.disk.api [req-939d5d50-
Command: sudo nova-rootwrap /etc/nova/
Exit code: 32
Stdout: ''
Stderr: 'mount: you must specify the filesystem type\n'. Cannot resize. is_image_
This could be fixed by doing a simple check on the the image itself to pick up the magic signature. This would allow to skip e2resize on non-extfs files and simple mounting on partitioned images without the error messages.
Changed in nova: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in nova: | |
status: | In Progress → Triaged |
Changed in nova: | |
status: | Triaged → Invalid |
I had the same error, when I make snapshot of a running instance.
Failed to mount filesystem: Unexpected error while running command. rootwrap. conf mount /dev/nbd14 /tmp/openstack- vfs-localfs4ZzQ mW python2. 7/dist- packages/ nova/virt/ disk/mount/ api.py: 198
Command: sudo nova-rootwrap /etc/nova/
Exit code: 32
Stdout: ''
Stderr: 'mount: you must specify the filesystem type\n' mnt_dev /usr/lib/
When I fix the error: nova/instances/ snapshots/ tmpNtVLgi/ 25c19f3475ae4fe c8f0dd3bb36dda2 e4.delta'
error: unable to execute QEMU command 'drive-mirror': Could not open '/var/lib/
I added the following line to /etc/apparmor/ abstractions/ libvirt- qemu nova/instances/ snapshots/ */*.delta rw,
/var/lib/
And then, the first error happened.
I think this problem may caused by apparmor. Because when I removed it , I can make snapshot of a running instance successfully. But when I used NFS as shared storage, apparmor must be used.