autotest/tp-libvirt — pull request #58 by jferlan (2014-03-12 17:13:45+00:00)
Title: find_storage_pool_sources: Handle vg_create failure

When running on f19, this test is failing for me when trying to do
the vgcreate. Not quite sure why, but because of the failure the
iSCSI server wasn't cleaned up causing issues in other tests. So
add some cleanup for that condition before emiting a test failure.
Without the try/except - the failure is just an ERROR with ugly
traceback in the debug.log:

ERROR type_specific.io-github-autotest-libvirt.virsh.find_storage_pool_sources.positive_test.local_logical_source -> CmdError: Command failed, rc=5, Command returned non-zero exit status [context: Creating volume group 'virttest_vg_0' by using '/dev/sda']
* Command:
vgcreate virttest_vg_0 /dev/sda
Exit status: 5
...
Device /dev/sda not found (or ignored by filtering).
Unable to add physical volume '/dev/sda' to volume group 'virttest_vg_0'.
...

Also, just for reference it's the following vgcreate information on f19:

LVM version: 2.02.98(2) (2012-10-15)
Library version: 1.02.77 (2012-10-15)
Driver version: 4.27.0

My f20 system is fine:

LVM version: 2.02.103(2) (2013-10-04)
Library version: 1.02.82 (2013-10-04)
Driver version: 4.27.0