Bug 1377069

Summary: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
Product: [oVirt] vdsm Reporter: Aleksey <aleksey.maksimov>
Component: ToolsAssignee: Nir Soffer <nsoffer>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.18.12CC: bugs, fdeutsch, mgoldboi, nsoffer, oourfali, tnisan
Target Milestone: ovirt-4.0.5Keywords: Regression
Target Release: 4.18.15Flags: rule-engine: ovirt-4.0.z+
rule-engine: blocker+
mgoldboi: planning_ack+
rule-engine: devel_ack+
pstehlik: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 07:40:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1372237    

Description Aleksey 2016-09-18 07:48:10 UTC
Description of problem:


Version-Release number of selected component (if applicable):

oVirt Engine Version: 4.0.3-1.el7.centos


How reproducible:

Every time I call the commands:

* hosted-engine --set-maintenance --mode=global
* hosted-engine --set-maintenance --mode=none

Actual results:

The message appears:

/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/storage_backends.py:15: DeprecationWarning: vdscli uses xmlrpc. since ovirt 3.6 xmlrpc is deprecated, please use vdsm.jsonrpcvdscli
  import vdsm.vdscli


Expected results:

Do not show DeprecationWarning.

Additional info:

This message (DeprecationWarning) prevents normal tracking the status of execution of commands in my custom automation scripts, for example in my script for HostedEngine backup.

Comment 1 Nir Soffer 2016-09-18 09:48:57 UTC
Reported on user list:
http://lists.ovirt.org/pipermail/users/2016-September/042813.html

Note that vdsClient is *not* supported, and will be removed in the future version.

The best way to automated vdsm is using vdscli library, used by vdsClient.

Note that this module is also deprecated and we are working on replacing it with
a jsonrpc library, but this work is not completed yet.

Regardless, these warnings are meant for developers and should never be used in
vdsClient.

This patch removes the warnings, replacing them with logging to the devel logger:
https://gerrit.ovirt.org/62209.

This patch fixes this issue, avoiding unexpected messages in vdsClient:
https://gerrit.ovirt.org/64099

Comment 2 Nir Soffer 2016-09-18 10:32:34 UTC
This regression introduced in:
https://gerrit.ovirt.org/60318

Comment 3 Tal Nisan 2016-09-19 09:09:10 UTC
Moving to infra as the regression was introduced by them

Comment 4 Oved Ourfali 2016-09-19 09:26:46 UTC
What's the regression here?
The fact we have warnings?

Comment 5 Tal Nisan 2016-09-19 11:28:29 UTC
From what it seems this is what Aleksey is complaining about, I guess this behavior was intentional so in that case it can be closed as NOTABUG but since infra team introduced this change they are the ones to decide how to proceed :)

Comment 6 Oved Ourfali 2016-09-19 11:39:21 UTC
We will decide indeed.
Removing the Regression keyword anyway.

Comment 7 Nir Soffer 2016-09-19 11:45:35 UTC
(In reply to Tal Nisan from comment #5)
> From what it seems this is what Aleksey is complaining about, I guess this
> behavior was intentional 

If this behaviour was intentional, this is even worse.

> so in that case it can be closed as NOTABUG but
> since infra team introduced this change they are the ones to decide how to
> proceed :)

No, we cannot close this, we just need to fix this quickly.
See http://gerrit.ovirt.org/64100.
(We don't need the other patches, this patch is enough)

Showing developer warnings to users is *not* ok. This is rude and irresponsible
behavior.

Developer warnings are for developers; they should control if warnings are
displayed or not.

The patch that introduced this regression configured the warnings.filter 
in a library module, so the developer of the program importing this module
have no way to disable the warnings.

And this change as backported to 4.0, braking existing software.

Comment 8 Nir Soffer 2016-09-19 11:46:07 UTC
(In reply to Oved Ourfali from comment #6)
> We will decide indeed.
> Removing the Regression keyword anyway.

This is a regression, do not remove it.

Comment 9 Oved Ourfali 2016-09-19 11:50:16 UTC
Assigning to Nir based on the above.

Comment 10 Oved Ourfali 2016-09-19 11:50:51 UTC
Nir - please set the target according to what you see fit.

Comment 11 Red Hat Bugzilla Rules Engine 2016-09-19 12:11:51 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 12 Nir Soffer 2016-09-28 10:07:46 UTC
Testing this change:

Run any vdsClient command, the warning mentioned in the description should be 
displayed.

Can also be verified on hosted engine setup:

    hosted-engine --set-maintenance --mode=none

Comment 13 Jiri Belka 2016-10-06 11:04:48 UTC
ok, vdsm-4.18.15-1.el7ev.x86_64

no more 'DeprecationWarning' with current vdsm rpm