Yaniv Bronhaim has uploaded a new change for review.
Change subject: Another missing of joinAll after using ThreadPool
......................................................................
Another missing of joinAll after using ThreadPool
ThreadPool initiates threads during its construct. The threads are
cleaned only by calling joinAll function.
This patch adds this call after using HSM_MailMonitor's threadPool.
Otherwise, the threads will stay alive until vdsm process will be
killed, and this was a leak.
Change-Id: I207d8db5863e11e89394b9144600b625282c51b6
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M vdsm/storage/storage_mailbox.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/9009/1
diff --git a/vdsm/storage/storage_mailbox.py b/vdsm/storage/storage_mailbox.py
index c537883..f6f5337 100644
--- a/vdsm/storage/storage_mailbox.py
+++ b/vdsm/storage/storage_mailbox.py
@@ -446,7 +446,7 @@
self.log.info("HSM_MailboxMonitor - Incoming mail monitoring thread stopped, clearing outgoing mail")
self._outgoingMail = EMPTYMAILBOX
self._sendMail() # Clear outgoing mailbox
-
+ self.tp.joinAll(waitForTasks=False)
class SPM_MailMonitor:
--
To view, visit http://gerrit.ovirt.org/9009
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I207d8db5863e11e89394b9144600b625282c51b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: remoteFileHandler: set PYTHONPATH properly for new process
......................................................................
remoteFileHandler: set PYTHONPATH properly for new process
PoolHandler.__init__() starts new process of remoteFileHandler.py.
To set the corrected PYTHONPATH for the new process, it copies existing
os.environ['PYTHONPATH'] and prepends "../:" to it. It's good for unit
test, but not for vdsmd service. When vdsmd.service is running as a
daemon, the current working dir is "/", and PYTHONPATH is not set
actually when vdsm is started. So the existing PYTHONPATH is empty and
"../" refers to "/". When new process of remoteFileHandler.py is started
this way, any attempt to import modules under /usr/share/vdsm will fail.
remoteFileHandler imports misc, and misc imports logUtils. logUtils.py
is under /usr/share/vdsm.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=875678
Change-Id: I8d4a38d5848f74d327b1d9f4ecadc6de6a0cc091
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M vdsm/storage/remoteFileHandler.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/9183/1
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
index 34de3ef..a2a9c41 100644
--- a/vdsm/storage/remoteFileHandler.py
+++ b/vdsm/storage/remoteFileHandler.py
@@ -227,7 +227,13 @@
try:
# Some imports in vdsm assume /usr/share/vdsm is in your PYTHONPATH
env = os.environ.copy()
- env['PYTHONPATH'] = "../:" + env.get('PYTHONPATH', "")
+ env['PYTHONPATH'] = "../"
+ try:
+ if os.environ['PYTHONPATH'] != "":
+ env['PYTHONPATH'] += ":" + os.environ['PYTHONPATH']
+ except KeyError:
+ pass
+ env['PYTHONPATH'] += ":" + constants.P_VDSM
self.process = BetterPopen([constants.EXT_PYTHON, __file__,
str(hisRead), str(hisWrite)], close_fds=False, env=env)
--
To view, visit http://gerrit.ovirt.org/9183
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d4a38d5848f74d327b1d9f4ecadc6de6a0cc091
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Saggi Mizrahi has uploaded a new change for review.
Change subject: Handle a race where it takes some time fot the cmdline to disappear after killing a process
......................................................................
Handle a race where it takes some time fot the cmdline to disappear after killing a process
Change-Id: I2d7a8190bb3b8e2251309b91f341a00f89618be5
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/miscTests.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/9204/1
diff --git a/tests/miscTests.py b/tests/miscTests.py
index 6d6b234..964fc74 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -24,6 +24,7 @@
import threading
from testrunner import VdsmTestCase as TestCaseBase
import inspect
+from vdsm import utils
import storage.outOfProcess as oop
import storage.misc as misc
@@ -86,7 +87,9 @@
sproc = misc.execCmd(args, sync=False, sudo=False)
sproc.kill()
try:
- self.assertEquals(misc.getCmdArgs(sproc.pid), tuple())
+ test = lambda: self.assertEquals(misc.getCmdArgs(sproc.pid),
+ tuple())
+ utils.retry(AssertionError, test, tries=10, sleep=0.1)
finally:
sproc.wait()
--
To view, visit http://gerrit.ovirt.org/9204
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d7a8190bb3b8e2251309b91f341a00f89618be5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Saggi Mizrahi has uploaded a new change for review.
Change subject: Fix problem where a 0 error code will cause remoteFileHandler to become a zombie
......................................................................
Fix problem where a 0 error code will cause remoteFileHandler to become a zombie
Change-Id: I738d9739673d11c15b882743d412b9b267013208
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M vdsm/storage/remoteFileHandler.py
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/8907/1
diff --git a/vdsm/storage/remoteFileHandler.py b/vdsm/storage/remoteFileHandler.py
index 43ee951..446087b 100644
--- a/vdsm/storage/remoteFileHandler.py
+++ b/vdsm/storage/remoteFileHandler.py
@@ -240,10 +240,12 @@
except:
pass
- # For some reason Thread might have been released if python is going
- # down. This makes sure that there are no issues when this happens
- if self.process.poll() and Thread:
- Thread(target=self.process.wait).start()
+ if not self.process.wait(0):
+ # For some reason Thread might have been released if python is
+ # going down. This makes sure that there are no issues when this
+ # happens
+ if Thread:
+ Thread(target=self.process.wait).start()
def __del__(self):
self.stop()
--
To view, visit http://gerrit.ovirt.org/8907
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I738d9739673d11c15b882743d412b9b267013208
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>