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(a)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:
--
To view, visit
http://gerrit.ovirt.org/20674
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78a732c6204385a3c33c4a1aea2cc78e3f404bb6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>