test_spawn_raw_glance in XenAPIVMTestCase complains about missing pygrub
Bug #723621 reported by
Vish Ishaya
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Salvatore Orlando |
Bug Description
When running the tests I get the following output:
test_spawn_
oddly, it doesn't seem to make the test fail.
The os.popen command should probably be stubbed out or something to squelch this error.
Changed in nova: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in nova: | |
status: | Confirmed → Triaged |
Changed in nova: | |
status: | Triaged → Fix Committed |
Changed in nova: | |
milestone: | none → 2011.2 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
We should stub out is_vdi_pv in virt/xenapi/ vm_utils. py:
def is_vdi_pv(dev):
LOG. debug(_ ("Running pygrub against %s"), dev)
#try to find kernel string '(?<=kernel: )/.*(?: >)', line) 0).find( 'xen') != -1:
LOG. debug(_ ("Found Xen kernel %s") % m.group(0))
return True
LOG. debug(_ ("No Xen kernel found. Booting HVM.")) attached_ here(session, vdi_ref, True, is_vdi_pv)
output = os.popen('pygrub -qn /dev/%s' % dev)
for line in output.readlines():
m = re.search(
if m and m.group(
return False
return with_vdi_
The test does not fail because we do not check pygrub's exit code, we just parse its output (which is "pygrub: not found"!). If we are unable to find the string for a PV kernel in the output we automatically assume HVM.
I will stub out this function.