Francesco Romani has posted comments on this change.

Change subject: v2v: Convert VM from external source to Data Domain
......................................................................


Patch Set 5:

(4 comments)

http://gerrit.ovirt.org/#/c/37509/5/vdsm/v2v.py
File vdsm/v2v.py:

Line 96: def get_converted_vm(jobId):
Line 97:     global _jobs
Line 98:     with _lock:
Line 99:         if jobId not in _jobs:
Line 100:             return {'status': errCode['invalidV2VJob']}
> all the return errCode will be fix in next version
OK
Line 101:         elif _jobs[jobId].status != 'done':
Line 102:             return {'status': errCode['V2VJobNotDone']}
Line 103: 
Line 104:     try:


Line 120:                 kill_zombie_jobs()
Line 121:     return {'status': doneCode, 'ovf': ovf}
Line 122: 
Line 123: 
Line 124: def kill_zombie_jobs():
Still concerned, sorry. Please try using utils.execCmd, maybe also in another 
(draft) patch.
Line 125:     '''
Line 126:     make sure that we don't have virt-v2v jobs that vdsm doesn't know 
about.
Line 127:     this can be due to crash/restarting vdsm service or a general io 
blocking
Line 128:     problem in virt-v2v.


Line 181:     Parsing the stdout
Line 182:     """
Line 183:     def __init__(self, uri, username, password, vmProperties, jobId, 
cif):
Line 184:         self._thread = threading.Thread(target=self._run)
Line 185:         self._thread.setDaemon(True)
for next submission (if any), just use

  self._thread.daemon = True
Line 186:         self._uri = uri
Line 187:         self._username = username
Line 188:         self._password = password
Line 189:         self._vmProperties = vmProperties


Line 339:                  'volumeID': disk['volumeID']}
Line 340: 
Line 341:         volPath = self._cif.prepareVolumePath(drive)
Line 342:         volPath = volPath.split('/images/')[0]
Line 343:         volPath = self._cif.teardownVolumePath(drive)
I'd be happier with something like

  volPath = self._cif.prepareVolumePath(drive)
  try:
      return volPath.split('/images/')[0]
  finally:
      self._cif.teardownVolumePath(drive)

Maybe I'm overthinking that. Let's hear about the other reviewers too.
Line 344:         return volPath
Line 345: 
Line 346: 
Line 347: def _mem_to_mib(size, unit):


-- 
To view, visit http://gerrit.ovirt.org/37509
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I34bd86d5a87ea8c42113c4a732f87ddd4ceab9ea
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to