Change in vdsm[master]: v2v: Convert VM from external source to Data Domain

nsoffer at redhat.com nsoffer at redhat.com
Mon Mar 16 10:28:14 UTC 2015


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 <shavivi at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list