Bug 1471158 - HTML5 Console Does Not Display From SSUI VMWare
Summary: HTML5 Console Does Not Display From SSUI VMWare
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - Service
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Allen W
QA Contact: Kedar Kulkarni
URL:
Whiteboard: ssui:html5:console
: 1522877 (view as bug list)
Depends On: 1442884
Blocks: 1505545 1505546 1510131
TreeView+ depends on / blocked
 
Reported: 2017-07-14 14:26 UTC by myoder
Modified: 2022-03-13 14:21 UTC (History)
17 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1505545 1505546 1510131 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:55:49 UTC
Category: Bug
Cloudforms Team: VMware
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ssui (35.43 KB, image/jpeg)
2017-07-14 14:26 UTC, myoder
no flags Details
console error (9.39 KB, image/jpeg)
2017-07-14 14:27 UTC, myoder
no flags Details
HTML5 VNC Console not supported for vSphere65 (197.14 KB, image/png)
2017-09-16 02:13 UTC, Kedar Kulkarni
no flags Details
VNC VM Console Console is disabled in 5.8.2 (223.71 KB, image/png)
2017-09-16 02:15 UTC, Kedar Kulkarni
no flags Details

Description myoder 2017-07-14 14:26:04 UTC
Description of problem:
In the SSUI, the HTML5 Console link is not working for a Rhel 7.3 image on VMware.  The console shows up blank with a "Server disconnected (code: 1006)" on the header.

Uploading logs and images of issue.

Version-Release number of selected component (if applicable):
CFME 5.7.2.1.20170406142927_0a1ad0e
VMware vCenter Server Appliance 6.5.0

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 myoder 2017-07-14 14:26:59 UTC
Created attachment 1298380 [details]
ssui

Comment 3 myoder 2017-07-14 14:27:18 UTC
Created attachment 1298381 [details]
console error

Comment 4 Chris Kacerguis 2017-07-14 14:28:56 UTC
Could you please provide the eve.log and the console.log?

You can see how to get the console.log here:

https://developers.google.com/web/tools/chrome-devtools/console/#working_with_the_console_history

Comment 12 Chris Kacerguis 2017-07-17 13:58:53 UTC
Chris H - Please backport to Euwe ASAP

Comment 13 Chris Hale 2017-07-17 17:27:44 UTC
Backport PR for 5.7 release , https://github.com/ManageIQ/manageiq-ui-service/pull/847

Comment 15 Kedar Kulkarni 2017-09-15 19:16:07 UTC
Does not seems to be fixed. Still getting same error "Server disconnected (code: 1006)" with HTML5 Remote console for vSphere6.5. 

Console log from my browser:
util.js:218  Msg: noVNC ready: native WebSockets, canvas rendering
Util.Warn @ util.js:218
util.js:218 
Util.Warn @ util.js:218
VM532:161 WebSocket connection to 'wss://10.8.198.2/ws/console/72902d67ef63c031293d11cfcca133e9' failed: Connection closed before receiving a handshake response
WrappedWebSocket @ VM532:161
util.js:218 WebSocket on-error event
Util.Warn @ util.js:218
util.js:218 WebSocket on-close event
Util.Warn @ util.js:218
util.js:220  Msg: Server disconnected (code: 1006)
Util.Error @ util.js:220
util.js:218 
Util.Warn @ util.js:218

Comment 16 Chris Kacerguis 2017-09-15 19:21:21 UTC
The message you pasted seems to imply that it is not getting a response from the server (which doesn't have anything to do with the code).  Do you have an appliance we can test on?

Comment 18 Chris Kacerguis 2017-09-15 21:41:56 UTC
Thank you.  Looking at the appliance, there is no IP address associated with that VM

https://10.8.198.2/api/services/3/vms/26?expand=software&attributes=ipaddresses,lans,storage

My thought is that it has something to do with the lack of IP address.

Comment 19 Kedar Kulkarni 2017-09-15 22:44:08 UTC
Hey Chris, I created another VM which does have  IP address but still error exists.
please check this URL: https://10.8.198.2/api/services/4/vms/29?
expand=software&attributes=ipaddresses,lans,storage

Hope it makes sense.

Thanks,KK.

Comment 20 Chris Kacerguis 2017-09-15 23:19:08 UTC
I see that it has an IP address, however I cannot connect to that machine manually (without MIQ).  Both the error and the fact that I cannot connect to VNC on the machine you created points to the issue is not with MIQ.

Comment 21 Kedar Kulkarni 2017-09-16 02:11:31 UTC
Hey Chris, 

Does it have something to do with https://github.com/ManageIQ/manageiq/issues/13798 ? 

Because neither OPS UI neither Service UI is opening VNC Console to vSphere65 VMs. Also if you check VNC console for vSphere65 on the CFME 5.8.2, it is disabled. But it is not disabled on CFME 5.7.4

Comment 22 Kedar Kulkarni 2017-09-16 02:13:20 UTC
Created attachment 1326657 [details]
HTML5 VNC Console not supported for vSphere65

OPS UI also throws similar error

Comment 23 Kedar Kulkarni 2017-09-16 02:15:05 UTC
Created attachment 1326658 [details]
VNC VM Console Console is disabled in 5.8.2

Comment 24 Chris Kacerguis 2017-09-18 14:06:30 UTC
Possibly.  That said, this issue would appear to be for the "Appliance" component...not the SUI

Comment 26 Sudhir Mallamprabhakara 2017-09-20 15:09:43 UTC
Chris/Gregg T/Dave - I am modifying the priority to High as there is an associated customer case.

And I am changing the status to assigned..

Comment 32 Kedar Kulkarni 2017-10-12 14:15:35 UTC
The BZ Title seems to be misleading here.
Here's the thing: 

For VMware 6.5, in OPS UI, if you try to open the VM Console, you will find that "VM Console" button is disabled, and if you hover over the button you should see a message that "VMware ESXi 6.5 does not support VNC Console"

For VMware 6.5, in the SSUI, if you open the VM console for a VM that is provisioned on VMware 6.5, then it is definitely going to fail, if I am correct, the reason is again "VMware ESXi 6.5 does not support VNC Console"

But the real problem is, this VM console button in SSUI, should be disabled as it is in the OPS UI, or it should be able to default to "WebMKS" console which is supported in VMware 6.5.

That can solve this bug. Please let me know if it makes sense. 

Thanks,
KK.

Comment 33 Allen W 2017-10-12 14:51:07 UTC
Chiming in here, SUI receives a few params from the api that read `{supports_console?:true, supports_launch_cockpit?:true }`

In this line: https://github.com/manageiq/manageiq-ui-service/blob/39345ca822ec20cf57df4b607874ecac01bd118d/client/app/states/services/details/details.html#L237 the SUI then shows or hides the console button based on the above mentioned flag.

The OpsUI takes in account if `vmware? && !supported_vendor_api` to either show or hide the button (here: https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/helpers/application_helper/button/vm_vnc_console.rb#L10) 

This logic does not belong in the SUI, one would expect the API would take make these evaluations and return `supports_console?:false` when applicable.

I propose this bz be reassigned 👍🏿

Comment 34 Chris Pelland 2017-10-12 15:21:03 UTC
Hi Gregg,

Can someone on your team/API take a look at this BZ?

Thanks,
Chris

Comment 39 Kedar Kulkarni 2017-10-18 20:12:33 UTC
The problem still persists in SSUI for VMware 6.5. In OPS UI HTML5 VNC VM Console is disabled, I feel same should be done for SSUI, or default it to WebMKS in SSUI.

CFME 5.9.0.2 last checked

Comment 54 Jillian Tullo 2017-10-20 19:59:44 UTC
Just validated that the API does support supports_console? and supports_launch_cockpit? through a decorator, ie:

GET /api/services?expand=resources,vms&decorators=vms.supports_console?

Perhaps there should be an attribute that can be passed back to determine the types of consoles supported, to determine the type of console that is requested?

Comment 55 Chris Hale 2017-10-23 18:55:57 UTC
GH PR https://github.com/ManageIQ/manageiq-ui-service/pull/1132.

Comment 59 Kedar Kulkarni 2017-10-26 16:32:57 UTC
Hello, I recently verified with 5.9.0.4 and I can still see the issue "Server disconnected (code: 1006)" Please take a look at fix again.

Comment 60 Chris Kacerguis 2017-10-26 16:44:46 UTC
This fix was just merged into master (https://github.com/ManageIQ/manageiq-ui-service/pull/1165), so it is likely not in your build yet.

Comment 61 Kedar Kulkarni 2017-11-03 17:29:25 UTC
In 5.9.0.5, I do not see this bug getting resolved. I can still access the console and it ends up in error state. Inspecting the console button in DOM, seems like the API changes for support_vnc_console? decorator are not incorporated. 

This PR: https://github.com/ManageIQ/manageiq-ui-service/pull/1195/files seems to be the one that will resolve this issue, but it is not merged.

Comment 63 Chris Kacerguis 2017-11-06 15:07:59 UTC
We merged in the fix, it will take a day or so to make it into the builds.

Comment 66 Kedar Kulkarni 2017-11-17 20:52:21 UTC
Removed Fixed in Version. It is not fixed.

Comment 67 Chris Kacerguis 2017-11-17 21:26:03 UTC
Needs a change from the API team.  Waiting on that.

Comment 68 Chris Kacerguis 2017-11-30 15:37:49 UTC
PR for Euwe: 
https://github.com/ManageIQ/manageiq-ui-service/pull/1283

Cannot be merged until this is backported: 
https://github.com/ManageIQ/manageiq/pull/16519

Comment 69 Allen W 2017-12-07 16:41:02 UTC
posting this as the work is all merged in here (for the record): https://github.com/ManageIQ/manageiq-ui-service/pull/1280

Comment 70 Allen W 2017-12-07 16:41:41 UTC
*** Bug 1522877 has been marked as a duplicate of this bug. ***

Comment 71 Kedar Kulkarni 2018-07-02 20:23:03 UTC
In 5.10.0.2 I noticed that VM Console was enabled in SSUI if Configuration in OPS UI has Console Access set to VNC. (For vSphere 5.5, vSphere6)

Also, VM Console button for vSphere6.5 was disabled with appropriate error msg in a tooltip when you hover over.

If Configuration in OPS UI is set to something other than VNC(such as WebMKS or VMRC) then VM Console button is hidden or greyed out.

Comment 72 Kedar Kulkarni 2018-07-02 20:32:13 UTC
VM Console in Service UI for 5.10.0.2 has following issue: https://bugzilla.redhat.com/show_bug.cgi?id=1597393


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