Bug 1450989 - Vdsm client is not aware when connection is stale
Summary: Vdsm client is not aware when connection is stale
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Bindings-API
Version: 4.19.20
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.3
: 4.19.16
Assignee: Piotr Kliczewski
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-15 14:04 UTC by Piotr Kliczewski
Modified: 2017-07-06 13:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-06 13:17:14 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 58029 0 None None None 2017-05-15 14:07:43 UTC
oVirt gerrit 76181 0 ovirt-4.1 MERGED stomp: make client user aware that no connection available 2017-05-23 09:10:52 UTC

Description Piotr Kliczewski 2017-05-15 14:04:57 UTC
When using vdsm client it is not possible to understand whether the connection is still open. During hosted engine configuration vdsm is restarted so it is important to understand when connection to vdsm is not active.

Comment 1 Nikolai Sednev 2017-06-05 09:02:43 UTC
Please provide reproduction steps for this bug.

Comment 2 Piotr Kliczewski 2017-06-05 09:34:36 UTC
When using vdsm.client module we need to connect and call any verb (getCapabilities). When client code is still running restart vdsm and attempt to call a verb again.

The client should raise Disconnected error.

Comment 3 Nikolai Sednev 2017-06-05 11:55:07 UTC
    from vdsm import client
    cli = client.connect(localhost, 54321, use_tls=True)
    cli.Host.getCapabilities()
    ...
    # systemctl restart vdsmd
     
    cli.Host.getCapabilities()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python2.7/site-packages/vdsm/client.py", line 247, in _call
        responses = self._client.call(req, timeout=timeout)
      File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 362, in call
        call = self.call_async(*reqs)
      File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 368, in call_async
        self.call_cb(call.callback, *reqs)
      File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 384, in call_cb
        self._transport.send(ctx.encode())
      File "/usr/lib/python2.7/site-packages/yajsonrpc/stompreactor.py", line 564, in send
        headers,
      File "/usr/lib/python2.7/site-packages/yajsonrpc/stompreactor.py", line 414, in send
        raise stomp.Disconnected()
    yajsonrpc.stomp.Disconnected


Works for me on these components on host:
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
mom-0.5.9-1.el7ev.noarch
ovirt-imageio-daemon-1.0.0-0.el7ev.noarch
libvirt-client-2.0.0-10.el7_3.9.x86_64
ovirt-vmconsole-1.0.4-1.el7ev.noarch
vdsm-4.19.17-1.el7ev.x86_64
ovirt-hosted-engine-ha-2.1.1-1.el7ev.noarch
ovirt-host-deploy-1.6.5-1.el7ev.noarch
ovirt-imageio-common-1.0.0-0.el7ev.noarch
qemu-kvm-rhev-2.6.0-28.el7_3.10.x86_64
ovirt-hosted-engine-setup-2.1.2-2.el7ev.noarch
sanlock-3.4.0-1.el7.x86_64
ovirt-setup-lib-1.1.1-1.el7ev.noarch
ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch
Linux version 3.10.0-514.21.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Apr 22 02:41:35 EDT 2017
Linux 3.10.0-514.21.1.el7.x86_64 #1 SMP Sat Apr 22 02:41:35 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)

Engine:
rhev-guest-tools-iso-4.1-5.el7ev.noarch
rhevm-dependencies-4.1.1-1.el7ev.noarch
rhevm-4.1.3.1-0.1.el7.noarch
rhevm-setup-plugins-4.1.2-1.el7ev.noarch
rhevm-branding-rhev-4.1.0-1.el7ev.noarch
rhevm-doc-4.1.3-1.el7ev.noarch
Linux version 3.10.0-514.16.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Fri Mar 10 13:12:32 EST 2017
Linux  3.10.0-514.16.1.el7.x86_64 #1 SMP Fri Mar 10 13:12:32 EST 2017 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)


Note You need to log in before you can comment on or make changes to this bug.