Change in vdsm[master]: v2v: Convert VM from external source to Data Domain
nsoffer at redhat.com
nsoffer at redhat.com
Tue Mar 31 20:31:39 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: v2v: Convert VM from external source to Data Domain
......................................................................
Patch Set 15:
(2 comments)
https://gerrit.ovirt.org/#/c/37509/15/vdsm/v2v.py
File vdsm/v2v.py:
Line 83: class V2VError(Exception):
Line 84: ''' Base class for job related error '''
Line 85:
Line 86:
Line 87: class JobExists(V2VError):
> conventionally, exception names should end with Error.
These exceptions prove that this convention is wrong - addition of "Error" suffix will not make this code worse.
Line 88: ''' Job already exists in _jobs collection '''
Line 89: err_name = 'V2VJobExists'
Line 90:
Line 91:
Line 350: return
Line 351: logging.debug("Trying to kill virt-v2v (attempt %d/%d)",
Line 352: i + 1, self.ABORT_RETRIES)
Line 353: try:
Line 354: self._proc.kill()
> proper way is send SIGTERM, potentially couple of times, and then SIGKILL j
I agree, we should use the standard procedure here:
- Send SIGTERM every second
- After TERM_TIMEOUT, switch to SIGKILL
- After KILL_TIMEOUT, fail
But this code is not in the scope of v2v - this is generic process termination code, that should have been part of Popen. Lets move it to utils.terminate_process()
Line 355: except OSError as e:
Line 356: if e.errno == errno.ESRCH:
Line 357: logging.debug("virt-v2v terminated with exit code: %d",
Line 358: self._proc.returncode)
--
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: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini 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