Xu He Jie has uploaded a new change for review.
Change subject: fix can't get ssl opt in vdsm sos plugin. ......................................................................
fix can't get ssl opt in vdsm sos plugin.
fix can't get ssl opt in vdsm sos plugin.
when execute sosreport will get exception as below:
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 693, in sosreport plug.setup() File "/usr/lib/python2.7/site-packages/sos/plugins/vdsm.py", line 82, in setup sslopt = ['', '-s '][config.getboolean('vars', 'ssl')] NoOptionError: No option 'ssl' in section: 'vars' Running plugins. Please wait ...
so add default value for ssl opt.
Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Signed-off-by: Xu He Jie xuhj@linux.vnet.ibm.com --- M vdsm/sos/vdsm.py.in 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/4349/1 -- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin. ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(2 inline comments)
.................................................... Commit Message Line 9: fix can't get ssl opt in vdsm sos plugin. why is the first line typed twice?
.................................................... File vdsm/sos/vdsm.py.in Line 79: config.read('/etc/vdsm/vdsm.conf') please verify, but I think that the right way to read the default is by
from vdsm import config
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 2: Verified
(1 inline comment)
.................................................... File vdsm/sos/vdsmd.py.in Line 24: from vdsm.config import config When sos/vdsm.py has same name with /usr/lib/python2.7/site-packages/vdsm, It can not 'import vdsm' with right module. If you want to load right module, it will make the code complex. So I choice easy way, just rename this file to vdsmd.py. and the name 'vdsmd' looks rational.
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 2: I would prefer that you didn't submit this
Would you please add a functional test, verifying that now
sosreport -o vdsmd
works.
I was about to +1 your patch, but come to think of it - your change may harm scripts expecting -o vdsm. Note that the current code should work if /etc/vdsm/vdsm.conf has ssl set explicitly. Could you find a way to hack around the problem (remove '' from sys.path just before from vdsm.config ??) without changing the module name?
In the worse case, you can
try: ssl = getboolean(ssl) excpet EEEE: ssl = True
I count it as bad, since it duplicates the default ssl value from vdsm.spec.
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 2:
Ok, I will try to add functional test and find hack method for import vdsm.config
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 3: Verified
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 3: Looks good to me, but someone else must approve
this patch looks unrelated to the topic of this branch, but I think it is fine. thanks!
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 4: Verified
nothing change with previous patch set
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 5: Verified
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Xu He Jie has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 6: Verified
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 6: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/sos/vdsm.py.in Line 63: os.environ["LVM_SYSTEM_DIR"] = os.path.join(constants.P_VDSM_RUN, this usage of os.path.join is unrelated to this patch. please remove, as it confuses people to think that it has some functional effect.
note that this module is so very Un*x-oriented, that having os.path.join is not *really* important. if you want it very much, send another patch with it.
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has posted comments on this change.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
Patch Set 7: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Dan Kenigsberg has submitted this change and it was merged.
Change subject: fix can't get ssl opt in vdsm sos plugin ......................................................................
fix can't get ssl opt in vdsm sos plugin
when execute sosreport will get exception as below:
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 693, in sosreport plug.setup() File "/usr/lib/python2.7/site-packages/sos/plugins/vdsm.py", line 82, in setup sslopt = ['', '-s '][config.getboolean('vars', 'ssl')] NoOptionError: No option 'ssl' in section: 'vars' Running plugins. Please wait ...
* import vdsm.config to plugin for using default value. * because can not import vdsm module when the plugin's name same with it. so add hack function for import vdsm python lib.
Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Signed-off-by: Xu He Jie xuhj@linux.vnet.ibm.com --- M vdsm/sos/vdsm.py.in 1 file changed, 17 insertions(+), 3 deletions(-)
Approvals: Dan Kenigsberg: Verified; Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/4349 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: Icbbc9a10202f191d0754bfae5c3f876b6c53a560 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
vdsm-patches@lists.fedorahosted.org