Mark Wu has uploaded a new change for review.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Bz#839919 remoteFileHandler.py: Add storage into python path
pickle need import modules in vdsm/storage, so add it to python path. Actually it's already done for RPC server side. This patch adds it for client side, and merge the code.
Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Signed-off-by: Mark Wu wudxw@linux.vnet.ibm.com --- M vdsm/storage/remoteFileHandler.py 1 file changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/6354/1 -- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Patch Set 1: I would prefer that you didn't submit this
Playing with sys.path deep inside a python application is quite evil.
If we must always hack it, why not use PYTHONPATH?
(I'm not happy about both options...)
-- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Mark Wu has posted comments on this change.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Patch Set 1:
PYTHONPATH doesn't help on runtime because it's only checked on python initialization. For new forked process, we can use it to hack. So PYTHONPATH can't resolve this problem. I am not sure except moving vdsm into standard library path, how to avoid hacking the path.
-- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm/storage/remoteFileHandler.py Line 46: from vdsm.betterPopen import BetterPopen Line 47: from vdsm import constants Line 48: # We add the parent directory so that imports that import the storage Line 49: # package would work even though CWD is inside the storage package. Line 50: sys.path.append(os.path.dirname(os.path.abspath(__file__))) Isn't this the current directory? The original code adds the parent directory Line 51: Line 52: Line 53: class Timeout(RuntimeError): Line 54: pass
-- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Saggi Mizrahi has posted comments on this change.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Patch Set 1: I would prefer that you didn't submit this
-- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Mark Wu has abandoned this change.
Change subject: Bz#839919 remoteFileHandler.py: Add storage into python path ......................................................................
Patch Set 1: Abandoned
Fixed by http://gerrit.ovirt.org/#/c/6463/
-- To view, visit http://gerrit.ovirt.org/6354 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: Id23c3d0be6eb2e2212172613ea8f3b0c58edce06 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Federico Simoncelli fsimonce@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org