Nir Soffer has posted comments on this change.

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


Patch Set 10:

(1 comment)

https://gerrit.ovirt.org/#/c/37509/10/vdsm/v2v.py
File vdsm/v2v.py:

Line 394:         self._status = STATUS.ABORT
Line 395:         logging.info('aborting job id: %r', self.id)
Line 396:         if self._proc.returncode is None:
Line 397:             ret, out, err = execCmd([EXT_KILL, '-9', self._proc.pid],
Line 398:                                     sudo=True)
> virt-v2v runs as root? If we are the parent process, it runs as vdsm, and w
There is a another success mode that must be checked - if the process did exit 
when calling kill(), you will get OSError with e.errno == errno.ESRCH.

    try:
        self._proc.kill()
    except OSError as e:
        if e.errno == errno.ESRCH:
            log process returncode
            return
        raise

This should be part of vdsm infrastructure. At this level, we should simply do 
proc.kill(timeout).
Line 399:             if len(err) > 0:
Line 400:                 self._status_msg = 'Error kill %s: %s' % 
(self._proc.pid, err)
Line 401:                 logging.error(self._status_msg)
Line 402: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I34bd86d5a87ea8c42113c4a732f87ddd4ceab9ea
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[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