vmbuilder blkid output parsing broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
Fix Released
|
Medium
|
Soren Hansen | ||
vm-builder (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Here's the traceback I receive when trying to run python-vm-builder on one machine (and interestingly, it passed fully on a different machine which was Karmic from day one; system where it fails was upgrade from at least as far back as Hardy).
2010-03-09 23:23:29,285 INFO : sed: warning: failed to get security context of /tmp/fileH0Tvpe: No data availablesed: warning: failed to get security context of /tmp/fileqCRxm0: No data availableUpdating /boot/grub/menu.lst ... done
2010-03-09 23:23:29,285 INFO :
2010-03-09 23:23:29,311 INFO : sed: -e expression #1, char 84: unterminated `s' command
Traceback (most recent call last):
File "/usr/bin/
cli.main()
File "/usr/lib/
hypervisor.
File "/usr/lib/
self.
File "/usr/lib/
call_
File "/usr/lib/
getattr(plugin, func, log_no_
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=
File "/usr/lib/
raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.
The problem is that blkid -ovalue returns a string over multiple lines and that seems to fail. Eg.
# blkid -p -sUUID -ovalue /dev/sda1
34efc44f-
1.0
ext2
filesystem
From some furher testing it seems "-p" and "-s" options don't really work together:
# blkid -ovalue -sUUID -p /dev/sda1
34efc44f-
1.0
ext2
filesystem
# blkid -ovalue -sUUID -c /dev/null /dev/sda1
34efc44f-
If man page is to be trusted, the only thing -p does is set -c /dev/null, so here's a patch that makes it work for me.
blkid behaves exactly the same on my two Karmic machines, so I suspet the code path is not even executed on the system with the fresh install.
tags: | added: patch |
tags: | added: kernel-series-unknown |
tags: | removed: kernel-series-unknown |
summary: |
- blkid output parsing broken + vmbuilder blkid output parsing broken |
Changed in vm-builder (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in vmbuilder: | |
milestone: | none → 0.12.4 |
Changed in vm-builder (Ubuntu Lucid): | |
milestone: | ubuntu-10.04 → none |
tags: |
added: patch-accepted-upstream removed: patch patch-forwarded-upstream |
I like the patch, but would like to see if I could get this fixed in blkid instead. I'll add the patch regardless, because people might be using vmbuilder with a broken version of blkid.