Change in vdsm[master]: Cisco VM-FEX support vdsm hooks
danken at redhat.com
danken at redhat.com
Mon Nov 5 18:19:45 UTC 2012
Dan Kenigsberg has posted comments on this change.
Change subject: Cisco VM-FEX support vdsm hooks
......................................................................
Patch Set 12: I would prefer that you didn't submit this
(2 inline comments)
....................................................
File vdsm_hooks/vmfex/before_vm_migrate_destination.py
Line 95: dpool.create()
Line 96: sys.stderr.write('vmfex: created Direct-Pool Net \n')
Line 97: sys.stderr.write(xmlstr + '\n')
Line 98: except: # Need a traceback on ANY error, thus no specification
Line 99: sys.stderr.write('vmfex: Failed createDirectPool \n')
I don't understand why you've added this try-block. The write() at the end of this file already catches and prints this traceback.
If your point here was to ignore various libvirt errors - go ahead an enumerate them. Catch-all "except" is dangerous - if the pool was not created, you don't want to go on starting the VM.
Line 100: sys.stderr.write('vmfex: ERROR: %s\n' % traceback.format_exc())
Line 101: finally:
Line 102: fcntl.flock(f.fileno(), fcntl.LOCK_UN)
Line 103:
Line 98: except: # Need a traceback on ANY error, thus no specification
Line 99: sys.stderr.write('vmfex: Failed createDirectPool \n')
Line 100: sys.stderr.write('vmfex: ERROR: %s\n' % traceback.format_exc())
Line 101: finally:
Line 102: fcntl.flock(f.fileno(), fcntl.LOCK_UN)
this is wrong here, as "f" may not be defined here. it was correct in the former patch.
Line 103:
Line 104:
Line 105: def qbhInUse(conn):
Line 106: for vm in conn.listDomainsID():
--
To view, visit http://gerrit.ovirt.org/7547
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I45a7fa46919bb39a648dff190c40618395990e91
Gerrit-PatchSet: 12
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Yasny <dyasny at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dan Yasny <dyasny at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list