Bug 1546679 - When host being set to active via WEBUI, hosted-engine --vm-status returns errors in CLI if interrupted.
Summary: When host being set to active via WEBUI, hosted-engine --vm-status returns er...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-ha
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Martin Sivák
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-19 10:25 UTC by Nikolai Sednev
Modified: 2019-05-16 12:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-26 08:30:16 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
puma18 host A (16.84 MB, application/x-xz)
2018-02-19 10:25 UTC, Nikolai Sednev
no flags Details
host B puma19 (14.30 MB, application/x-xz)
2018-02-19 10:28 UTC, Nikolai Sednev
no flags Details
engine (9.54 MB, application/x-xz)
2018-02-19 10:30 UTC, Nikolai Sednev
no flags Details

Description Nikolai Sednev 2018-02-19 10:25:59 UTC
Created attachment 1397813 [details]
puma18 host A

Description of problem:
When host being set to active via WEBUI, hosted-engine --vm-status returns errors in CLI if interrupted.

puma18 ~]# hosted-engine --vm-status


--== Host 1 status ==--

conf_on_shared_storage             : True
Status up-to-date                  : True
Hostname                           : puma18
Host ID                            : 1
Engine status                      : {"reason": "vm not running on this host", "health": "bad", "vm": "down_missing", "detail": "unknown"}
Score                              : 0
stopped                            : False
Local maintenance                  : True
crc32                              : f5b5be40
local_conf_timestamp               : 86488
Host timestamp                     : 86488
Extra metadata (valid at timestamp):
        metadata_parse_version=1
        metadata_feature_version=1
        timestamp=86488 (Mon Feb 19 12:12:46 2018)
        host-id=1
        score=0
        vm_conf_refresh_time=86488 (Mon Feb 19 12:12:46 2018)
        conf_on_shared_storage=True
        maintenance=True
        state=LocalMaintenance
        stopped=False


--== Host 2 status ==--

conf_on_shared_storage             : True
Status up-to-date                  : True
Hostname                           : puma19
Host ID                            : 2
Engine status                      : {"health": "good", "vm": "up", "detail": "Up"}
Score                              : 3400
stopped                            : False
Local maintenance                  : False
crc32                              : 0b84e029
local_conf_timestamp               : 76150
Host timestamp                     : 76150
Extra metadata (valid at timestamp):
        metadata_parse_version=1
        metadata_feature_version=1
        timestamp=76150 (Mon Feb 19 12:12:44 2018)
        host-id=2
        score=3400
        vm_conf_refresh_time=76150 (Mon Feb 19 12:12:44 2018)
        conf_on_shared_storage=True
        maintenance=False
        state=EngineUp
        stopped=False
You have new mail in /var/spool/mail/root
[root@puma18 ~]# hosted-engine --vm-status
^CTraceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_setup/vm_status.py", line 214, in <module>
    if not status_checker.print_status():
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_setup/vm_status.py", line 110, in print_status
    all_host_stats = self._get_all_host_stats()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_setup/vm_status.py", line 75, in _get_all_host_stats
    all_host_stats = ha_cli.get_all_host_stats()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py", line 144, in get_all_host_stats
    return self.get_all_stats(self.StatModes.HOST)
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/client/client.py", line 92, in get_all_stats
    stats = broker.get_stats_from_storage()
  File "/usr/lib/python2.7/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py", line 135, in get_stats_from_storage
    result = self._proxy.get_stats()
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1303, in single_request
    response = h.getresponse(buffering=True)
  File "/usr/lib64/python2.7/httplib.py", line 1089, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 444, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 400, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib64/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt


Version-Release number of selected component (if applicable):
rhvm-appliance-4.2-20180202.0.el7.noarch
ovirt-hosted-engine-ha-2.2.5-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.10-1.el7ev.noarch
Linux 3.10.0-693.19.1.el7.x86_64 #1 SMP Thu Feb 1 12:34:44 EST 2018 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
100%

Steps to Reproduce:
1.Deploy SHE vintage over NFS on pair of ha-hosts.
2.Add one data storage domain to get SHE-VM autoimported.
3.Assuming first host "A" is hosting SHE-VM, set it in to maintenance via WEBUI.
4.Once SHE-VM migrated to host "B", activate via WEBUI host "A".
5.Run hosted-engine --vm-status in CLI on host "A" and then after a second or two, abort using "ctrl+c" abort sequence.

Actual results:
Host that being activated exits with errors.

Expected results:
No errors should appear after aborting the command.

Additional info:
Sosreport from host "A" (puma18) and host "B" (puma19) and the engine are attached.

Comment 1 Nikolai Sednev 2018-02-19 10:28:39 UTC
Created attachment 1397814 [details]
host B puma19

Comment 2 Nikolai Sednev 2018-02-19 10:30:12 UTC
Created attachment 1397815 [details]
engine

Comment 3 Yaniv Lavi 2018-02-26 08:30:16 UTC
Sound like a edge case. Closing.
If a user complains, we will reconsider.

Comment 4 Franta Kust 2019-05-16 12:54:52 UTC
BZ<2>Jira re-sync


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