Change in vdsm[master]: vdscli: do not use the warnings module
Francesco Romani has abandoned this change. Change subject: vdscli: do not use the warnings module .. Abandoned replaced by https://gerrit.ovirt.org/#/c/64100/2 -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
gerrit-hooks has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
gerrit-hooks has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
gerrit-hooks has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
Martin Sivák has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 1: Ah, Nir is right, because we log during import. And the logging subsystem won't be ready at that time.. -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
Martin Sivák has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 1: Nir: the logger will be unconfigured, but messages should be propagated by default and end up in the root logger. The only place where you would get the error message will be projects with no logging at all I think. -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
Martin Sivák has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 1: (2 comments) https://gerrit.ovirt.org/#/c/64117/1/lib/vdsm/vdscli.py File lib/vdsm/vdscli.py: PS1, Line 40: "devel" Nir is right that the logger will cause issues in projects importing the lib. 1) it will be not configured 2) the name is too generic for a library PS1, Line 40: _devel I still have an issue with the name :) Use log_devel or something more readable. -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
Nir Soffer has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 1: Code-Review-1 Logging to secret logger in a library means the log would show in the program importing this module. This is not unacceptable for existing application, so I think we should avoid this. Currently applications which do not configure logging will show this: No handlers could be found for logger "devel" Application like vdsm-tool and hosted-engine will probably show the log to standard error, not acceptable as this is log for developers, not users. -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
gerrit-hooks has posted comments on this change. Change subject: vdscli: do not use the warnings module .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco RomaniGerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: vdscli: do not use the warnings module
Francesco Romani has uploaded a new change for review. Change subject: vdscli: do not use the warnings module .. vdscli: do not use the warnings module Due the possible memory leaks, switch to our new 'devel' logger. Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Signed-off-by: Francesco Romani--- M lib/vdsm/vdscli.py 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/64117/1 diff --git a/lib/vdsm/vdscli.py b/lib/vdsm/vdscli.py index 22e7bc8..17b6a29 100644 --- a/lib/vdsm/vdscli.py +++ b/lib/vdsm/vdscli.py @@ -21,11 +21,12 @@ from __future__ import absolute_import from __future__ import print_function + +import logging import os import re from six.moves import xmlrpc_client as xmlrpclib import sys -import warnings from xml.parsers.expat import ExpatError from .sslcompat import sslutils @@ -34,6 +35,9 @@ _TRUSTED_STORE_PATH = '/etc/pki/vdsm' ADDRESS = '0' PORT = 54321 + + +_devel = logging.getLogger("devel") def wrap_transport(transport): @@ -136,10 +140,11 @@ server = xmlrpclib.Server('http://%s' % hostPort, transport) return server -warnings.simplefilter("always", category=DeprecationWarning) -warnings.warn( + +_devel.warning( "vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use " -"vdsm.jsonrpcvdscli", DeprecationWarning, stacklevel=2) +"vdsm.jsonrpcvdscli") + if __name__ == '__main__': print('connecting to %s:%s ssl %s ts %s' % ( -- To view, visit https://gerrit.ovirt.org/64117 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3481538292cf1a77329faf3d7701767b6e0bfd60 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org