Change in vdsm[master]: Cisco VM-FEX support vdsm hooks

asegurap at redhat.com asegurap at redhat.com
Tue Nov 6 16:13:37 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: Cisco VM-FEX support vdsm hooks
......................................................................


Patch Set 13: (2 inline comments)

....................................................
File vdsm_hooks/vmfex/before_vm_migrate_destination.py
Line 132:         return
Line 133:     #Now we know for sure that the pool exists...
Line 134:     #are there VMs running, and are they using 802.1Qbh?
Line 135:     #if yes, can't touch the existing pool
Line 136:     if not qbhInUse(conn):
It would be safer to hold the lock on creation and usage. In fact the ideal thing would be to acquire some dedicated libvirt lock, but as d.yasny pointed out that lock probably does not exist in libvirt.
Line 137:     #no VMs use the existing pool, it can be checked and updated
Line 138:         #is the pool the same as list of available dNICs?
Line 139:         if not compareDPoolToUsableNics(conn):
Line 140:         #not the same, something changed, recreating


....................................................
File vdsm_hooks/vmfex/before_vm_start.py
Line 105: def createDirectPool(conn):
Line 106:     with open('/var/run/vdsm/hook-vmfex.lock', 'w') as f:
Line 107:         fcntl.flock(f.fileno(), fcntl.LOCK_EX)
Line 108:         try:
Line 109:             #singleton - doublecheck after taking lock
Would it be possible to move some of this to hooky.py or however the common hooks library is called?
Line 110:             #to avoid a race between two threads
Line 111:             if 'direct-pool' in conn.listNetworks():
Line 112:                 dpool = conn.networkLookupByName('direct-pool')
Line 113:                 #destroy and undefine direct-pool


--
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: 13
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