Dan Kenigsberg has uploaded a new change for review.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
vdsm.utils: drop unused ImagePathStatus and getPidNiceness
Change-Id: I78a732c6204385a3c33c4a1aea2cc78e3f404bb6 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/utils.py 1 file changed, 0 insertions(+), 43 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/20674/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py index 7551d0a..93fbed7 100644 --- a/lib/vdsm/utils.py +++ b/lib/vdsm/utils.py @@ -559,49 +559,6 @@ return (proc.returncode, out, err)
-class ImagePathStatus(threading.Thread): - def __init__(self, cif, interval=None): - if interval is None: - interval = config.getint('irs', 'images_check_times') - self._interval = interval - self._cif = cif - self.storageDomains = {} - self._stopEvent = threading.Event() - threading.Thread.__init__(self, name='ImagePathStatus') - if self._interval > 0: - self.start() - - def stop(self): - self._stopEvent.set() - - def _refreshStorageDomains(self): - self.storageDomains = self._cif.irs.repoStats() - del self.storageDomains["status"] - if "args" in self.storageDomains: - del self.storageDomains["args"] - - def run(self): - try: - while not self._stopEvent.isSet(): - if self._cif.irs: - self._refreshStorageDomains() - self._stopEvent.wait(self._interval) - except: - logging.error("Error while refreshing storage domains", - exc_info=True) - - -def getPidNiceness(pid): - """ - Get the nice level of a process. - - :param pid: the PID of the process. - :type pid: int - """ - stat = file('/proc/%s/stat' % (pid)).readlines()[0] - return int(stat.split(') ')[-1].split()[16]) - - def tobool(s): try: if s is None:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5126/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4322/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5200/ : FAILURE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5127/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4323/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5201/ : SUCCESS
Mark Wu has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 2: Code-Review+1
Petr Šebek has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 2: Verified+1 Code-Review+1
Antoni Segura Puimedon has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 2: Code-Review+1
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
vdsm.utils: drop unused ImagePathStatus and getPidNiceness
Change-Id: I78a732c6204385a3c33c4a1aea2cc78e3f404bb6 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/20674 Reviewed-by: Mark Wu wudxw@linux.vnet.ibm.com Reviewed-by: Petr Šebek psebek@redhat.com Tested-by: Petr Šebek psebek@redhat.com Reviewed-by: Antoni Segura Puimedon asegurap@redhat.com --- M lib/vdsm/utils.py 1 file changed, 0 insertions(+), 44 deletions(-)
Approvals: Antoni Segura Puimedon: Looks good to me, but someone else must approve Mark Wu: Looks good to me, but someone else must approve Petr Šebek: Verified; Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm.utils: drop unused ImagePathStatus and getPidNiceness ......................................................................
Patch Set 2: Code-Review+2
vdsm-patches@lists.fedorahosted.org