Description of problem: With current master snapshot, after deploy, trying to set a console password fails with: # hosted-engine --add-console-password --password=pass Command VM.updateDevice with args {'vmID': 'b3bc7f7b-2b88-4758-8192-05242f61ba21', 'params': {'deviceType': 'graphics', 'existingConnAction': 'keep', 'graphicsType': 'vnc', 'params': {}, 'ttl': '120', 'password': 'pass'}} failed: (code=100, message=General Exception: ('expected string or bytes-like object',)) In vdsm.log: 2019-12-25 11:39:00,880+0200 INFO (jsonrpc/3) [api.virt] START updateDevice(params={'deviceType': 'graphics', 'existingConnAction': 'keep', 'graphicsType': 'vnc', 'params': {}, 'ttl': '120' , 'password': '********'}) from=::1,50446, vmId=b3bc7f7b-2b88-4758-8192-05242f61ba21 (api:48) 2019-12-25 11:39:00,899+0200 ERROR (jsonrpc/3) [api] FINISH updateDevice error=expected string or bytes-like object (api:134) Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 124, in method ret = func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 357, in updateDevice return self.vm.updateDevice(params) File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 2985, in updateDevice return self._updateGraphicsDevice(params) File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 2961, in _updateGraphicsDevice params['params'] File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4644, in _setTicketForGraphicDev saslpasswd2.remove_vnc_password(vnc_username) File "/usr/lib/python3.6/site-packages/vdsm/virt/saslpasswd2.py", line 50, in remove_vnc_password return supervdsm.getProxy().saslpasswd2_remove_vnc_password(username) File "/usr/lib/python3.6/site-packages/vdsm/common/supervdsm.py", line 56, in __call__ return callMethod() File "/usr/lib/python3.6/site-packages/vdsm/common/supervdsm.py", line 54, in <lambda> **kwargs) File "<string>", line 2, in saslpasswd2_remove_vnc_password File "/usr/lib64/python3.6/multiprocessing/managers.py", line 772, in _callmethod raise convert_to_error(kind, result) TypeError: expected string or bytes-like object Version-Release number of selected component (if applicable): How reproducible: Always, I think. Steps to Reproduce: 1. Deploy hosted-engine 2. hosted-engine --add-console-password --password=pass 3. Actual results: Fails as above Expected results: Succeeds Additional info: Checking the git log, I think this is a result of: https://gerrit.ovirt.org/98354 There, the line: elif vnc_username is not None: Was changed to 'else:', so unconditionally we call: saslpasswd2.remove_vnc_password(vnc_username) Since we do not pass a username: https://github.com/oVirt/ovirt-hosted-engine-setup/blob/master/src/ovirt_hosted_engine_setup/vdsm_helper.py#L96 This fails. Well, I think. If this change is intended, please move the bug to hosted-engine and tell us what missing params we should pass. Otherwise, please revert that part of the patch, or whatever that's needed to solve this bug. Thanks.
Now verified that changing the line as explained in Addition Info indeed fixes the bug and I can get a vnc console.
Yeah, I think I simplified the code too much. Does this fix the problem or is there anything more to it?
(In reply to Tomasz Barański from comment #2) > Yeah, I think I simplified the code too much. > > Does this fix the problem or is there anything more to it? This fixes, see comment 1.
Still failing: ovirt-ansible-hosted-engine-setup-1.0.34-1.el8ev.noarch ovirt-hosted-engine-setup-2.4.0-1.el8ev.noarch ovirt-hosted-engine-ha-2.4.0-1.el8ev.noarch vdsm-4.40.0-180.giteba0b75.el8ev.x86_64 # hosted-engine --add-console-password --password=pass Command VM.updateDevice with args {'vmID': '398121a7-2571-44da-8cab-f5eea646ab1a', 'params': {'deviceType': 'graphics', 'existingConnAction': 'keep', 'graphicsType': 'vnc', 'params': {}, 'ttl': '120', 'password': 'pass'}} failed: (code=100, message=General Exception: ('expected string or bytes-like object',)) vdsm.log: 2020-01-23 15:28:45,302+0100 ERROR (jsonrpc/7) [api] FINISH updateDevice error=expected string or bytes-like object (api:134) Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/vdsm/common/api.py", line 124, in method ret = func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/vdsm/API.py", line 357, in updateDevice return self.vm.updateDevice(params) File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 2985, in updateDevice return self._updateGraphicsDevice(params) File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 2961, in _updateGraphicsDevice params['params'] File "/usr/lib/python3.6/site-packages/vdsm/virt/vm.py", line 4644, in _setTicketForGraphicDev saslpasswd2.remove_vnc_password(vnc_username) File "/usr/lib/python3.6/site-packages/vdsm/virt/saslpasswd2.py", line 50, in remove_vnc_password return supervdsm.getProxy().saslpasswd2_remove_vnc_password(username) File "/usr/lib/python3.6/site-packages/vdsm/common/supervdsm.py", line 56, in __call__ return callMethod() File "/usr/lib/python3.6/site-packages/vdsm/common/supervdsm.py", line 54, in <lambda> **kwargs) File "<string>", line 2, in saslpasswd2_remove_vnc_password File "/usr/lib64/python3.6/multiprocessing/managers.py", line 772, in _callmethod raise convert_to_error(kind, result) TypeError: expected string or bytes-like object reproduce steps: 1. deploy hosted-engine 2. hosted-engine --add-console-password --password=pass
I think that the build you used does not include the fix, please try a newer one. Thanks.
I used build from 2020-01-17 which came in 9 days after this bug was moved to ON_QA. But I tried the newest one and it works "You can now connect the hosted-engine VM with VNC at ..." Verified in vdsm-4.40.1-1.el8ev.x86_64
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.