Bug 1471158 - [EUWE] HTML5 Console Does Not Display From SSUI VMWare
[EUWE] HTML5 Console Does Not Display From SSUI VMWare
Status: POST
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - Service (Show other bugs)
5.7.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.10.0
Assigned To: Allen W
Kedar Kulkarni
ssui:html5:console
: TestOnly
: 1522877 (view as bug list)
Depends On: 1442884
Blocks: 1505545 1505546 1510131
  Show dependency treegraph
 
Reported: 2017-07-14 10:26 EDT by myoder
Modified: 2018-02-14 23:21 EST (History)
20 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1505545 1505546 1510131 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: Bug
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: VMware


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

  None (edit)
Description myoder 2017-07-14 10:26:04 EDT
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 10:26 EDT
Created attachment 1298380 [details]
ssui
Comment 3 myoder 2017-07-14 10:27 EDT
Created attachment 1298381 [details]
console error
Comment 4 Chris Kacerguis 2017-07-14 10:28:56 EDT
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 09:58:53 EDT
Chris H - Please backport to Euwe ASAP
Comment 13 Chris Hale 2017-07-17 13:27:44 EDT
Backport PR for 5.7 release , https://github.com/ManageIQ/manageiq-ui-service/pull/847
Comment 15 Kedar Kulkarni 2017-09-15 15:16:07 EDT
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 15:21:21 EDT
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 17:41:56 EDT
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 18:44:08 EDT
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 19:19:08 EDT
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-15 22:11:31 EDT
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-15 22:13 EDT
Created attachment 1326657 [details]
HTML5 VNC Console not supported for vSphere65

OPS UI also throws similar error
Comment 23 Kedar Kulkarni 2017-09-15 22:15 EDT
Created attachment 1326658 [details]
VNC VM Console Console is disabled in 5.8.2
Comment 24 Chris Kacerguis 2017-09-18 10:06:30 EDT
Possibly.  That said, this issue would appear to be for the "Appliance" component...not the SUI
Comment 26 Sudhir Mallamprabhakara 2017-09-20 11:09:43 EDT
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 10:15:35 EDT
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 10:51:07 EDT
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 11:21:03 EDT
Hi Gregg,

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

Thanks,
Chris
Comment 39 Kedar Kulkarni 2017-10-18 16:12:33 EDT
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 15:59:44 EDT
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 14:55:57 EDT
GH PR https://github.com/ManageIQ/manageiq-ui-service/pull/1132.
Comment 59 Kedar Kulkarni 2017-10-26 12:32:57 EDT
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 12:44:46 EDT
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 13:29:25 EDT
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 10:07:59 EST
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 15:52:21 EST
Removed Fixed in Version. It is not fixed.
Comment 67 Chris Kacerguis 2017-11-17 16:26:03 EST
Needs a change from the API team.  Waiting on that.
Comment 68 Chris Kacerguis 2017-11-30 10:37:49 EST
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 11:41:02 EST
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 11:41:41 EST
*** Bug 1522877 has been marked as a duplicate of this bug. ***

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