~nuclearbob/qa-regression-testing/autotest

Viewing all changes in revision 6582.

  • Committer: Lucas Meneghel Rodrigues
  • Date: 2012-09-03 14:31:20 UTC
  • Revision ID: git-v1:6d2b14f05fc8264e836b0f691f099856c06bce53
virt.kvm_vm: Skip adding interface to TAP if it's already present

This is a solution for issue #520 - when trying to create
a TAP device, the interface might be already a member of
the bridge, so the addition will fail with an IOError, with
errno == errno.EBUSY (device or resource busy). That IOError
will be wrapped in our TAPCreationError exception. So, when
performing the operation, catch the TAPCreationError and
verify errno of the detail attribute, if it's errno.EBUSY,
skip the addition operation and continue.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: