Bug 1475845 - novnc doesn't work
novnc doesn't work
Status: MODIFIED
Product: ovirt-engine
Classification: oVirt
Component: Frontend.Core (Show other bugs)
future
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-4.2.0
: ---
Assigned To: jniederm
Liran Rotenberg
: Regression
Depends On: 1502652
Blocks: 1481293
  Show dependency treegraph
 
Reported: 2017-07-27 09:09 EDT by jniederm
Modified: 2017-11-16 18:15 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine.log (4.73 KB, text/plain)
2017-07-27 09:09 EDT, jniederm
no flags Details
browser-console.log (1.64 KB, text/plain)
2017-07-27 09:10 EDT, jniederm
no flags Details
logs related (769.63 KB, application/x-xz)
2017-09-25 07:57 EDT, Liran Rotenberg
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 80059 master MERGED core: novnc import of css and js fixed 2017-08-03 09:21 EDT
oVirt gerrit 82183 master MERGED engine: fixup custom patternfly vertical nav commit 2017-09-25 09:35 EDT
oVirt gerrit 82399 master MERGED engine: novnc JSP fix 2017-10-16 11:28 EDT
oVirt gerrit 83852 master MERGED spec: require novnc 0.5.x 2017-11-14 07:18 EST

  None (edit)
Description jniederm 2017-07-27 09:09:14 EDT
Created attachment 1305360 [details]
engine.log

Description of problem:
Invoking noVNC console opens new tab with just a grey background.

It looks like the page tries to load resources that are no provided by current branding any more.

Version-Release number of selected component (if applicable):
4.2 master, commit 121657eb31

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with VNC graphic protocol
2. Run the VM
3. Select novnc in Console Options dialog
4. Invoke Console of the VM

Actual results:
New browser tab pops up with just a grey page

Expected results:
working console

Additional info:
Comment 1 jniederm 2017-07-27 09:10 EDT
Created attachment 1305362 [details]
browser-console.log
Comment 2 jniederm 2017-07-31 09:23:44 EDT
It is failing because jQuery and other resources form package patternfly1 can't be found. Regression introduced by path https://gerrit.ovirt.org/#/c/61716/13/Makefile. Moving to UX.
Comment 3 Oved Ourfali 2017-07-31 09:34:32 EDT
Greg, can you take a look?
Comment 4 Greg Sheremeta 2017-08-01 08:14:45 EDT
Hi,

Those resources are still around, but they've moved. The paths to them probably shouldn't be hardcoded in novnc.jsp (and other console jsps).

see stylesheets.tag and javascripts.tag. You may want to try to use those, like the sso or welcome apps do.

New paths (as seen in right click view source of webadmin):

<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/web_admin.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/common.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/gwt_common.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/patternfly/dist/css/patternfly.min.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/patternfly/dist/css/patternfly-additions.min.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/patternfly-ovirt.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-patternfly-compat.css">
<link rel="stylesheet" type="text/css" href="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt.css">
<script type="text/javascript" src="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/jquery-ui-dist/jquery-ui.min.js"></script>
<script type="text/javascript" src="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/ovirt-engine/webadmin/theme/00-ovirt.brand/patternfly-3.25.1-custom.min.js"></script>
<script type="text/javascript" src="/ovirt-engine/webadmin/theme/00-ovirt.brand/ovirt-js-dependencies/insertion-query/insQ.min.js"></script>
Comment 5 Red Hat Bugzilla Rules Engine 2017-08-01 10:07:13 EDT
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Comment 6 Liran Rotenberg 2017-09-25 07:57 EDT
Created attachment 1330498 [details]
logs related
Comment 7 Liran Rotenberg 2017-09-25 08:04:52 EDT
Hi,
I tried to verify the bug on: 
4.2.0-0.0.master.20170924221426.git196b802.el7.centos

The websocket service is up and running, listening on 6100.
Currently i'm getting only "Internal Server Error" when I try to invoke the noVNC.
Comment 8 Red Hat Bugzilla Rules Engine 2017-09-25 08:04:57 EDT
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 9 jniederm 2017-09-25 08:15:26 EDT
Relevant engine log records:

2017-09-25 12:25:01,978+03 ERROR [org.ovirt.engine.core.utils.servlet.ServletUtils] (default task-9) [755de8ed] Can't read file '/etc/ovirt-engine/branding/00-ovirt.brand/patternfly-functions-vertical-nav-custom-3.26.1.js' for request '/ovirt-engine/sso/theme/00-ovirt.brand/patternfly-functions-vertical-nav-custom-3.26.1.js', will send a 404 error response.
2017-09-25 12:25:02,070+03 ERROR [org.ovirt.engine.core.utils.servlet.ServletUtils] (default task-31) [] Can't read file '/etc/ovirt-engine/branding/00-ovirt.brand/patternfly-functions-vertical-nav-custom-3.26.1.js' for request '/ovirt-engine/sso/theme/00-ovirt.brand/patternfly-functions-vertical-nav-custom-3.26.1.js', will send a 404 error response.

Relates to https://gerrit.ovirt.org/c/81589.

File 'patternfly-functions-vertical-nav-custom-3.26.1.js' is not copied to $TARGET directory on my dev setup.
Comment 10 Greg Sheremeta 2017-09-25 09:37:45 EDT
(In reply to jniederm from comment #9)
> File 'patternfly-functions-vertical-nav-custom-3.26.1.js' is not copied to
> $TARGET directory on my dev setup.

my bad, fixed in 82183
Comment 11 Liran Rotenberg 2017-09-28 03:16:16 EDT
I tried to verify the bug again on 
4.2.0-0.0.master.20170925172449.git9d850a9.el7.centos

Now the engine log and the vdsm log looks fine(no error or warning just info) But the result is the same - code 500, Internal Server Error.
Comment 12 Greg Sheremeta 2017-09-28 16:31:44 EDT
Interesting, a different problem now.

org.apache.jasper.JasperException: JBWEB004036: File "obrand" not found
	at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:57)

line 23:
https://gerrit.ovirt.org/#/c/80059/3/backend/manager/modules/services/src/main/webapp/novnc-main.jsp 

Seems like that JSP can't find "obrand" anymore. I'll look into.
Comment 13 Greg Sheremeta 2017-09-29 19:23:10 EDT
(In reply to Greg Sheremeta from comment #12)
> Seems like that JSP can't find "obrand" anymore. I'll look into.
A dependency issue. I don't want to add a dependency from services on branding (and testing it, it didn't work anyway), so I worked around it in https://gerrit.ovirt.org/#/c/82399/
Comment 14 Greg Sheremeta 2017-10-19 08:50:54 EDT
(In reply to Greg Sheremeta from comment #13)
> I don't want to add a dependency from services on branding

Correction -- I did add the dependency and got it working. Hopefully this works now.
Comment 15 Liran Rotenberg 2017-10-31 05:46:41 EDT
Tried to verify on:
4.2.0-0.0.master.20171025204923.git6f4cbc5.el7.centos

I get a blank page when trying to invoke the noVNC.
The error shown in the browser is:
Loading failed for the <script> with source “.../ovirt-engine/services/files/novnc/include/jsunzip.js”.

The jsunzip.js is 404.

From the engine log:

2017-10-31 11:36:21,415+02 ERROR [org.ovirt.engine.core.utils.servlet.ServletUtils] (default task-8) [] Can't read file '/usr/share/ovirt-engine/files/novnc/include/jsunzip.js' for request '/ovirt-engine/services/files/novnc/include/jsunzip.js', will send a 404 error response.
2017-10-31 11:36:38,519+02 ERROR [org.ovirt.engine.core.utils.servlet.ServletUtils] (default task-32) [] Can't read file '/usr/share/ovirt-engine/files/novnc/include/jsunzip.js' for request '/ovirt-engine/services/files/novnc/include/jsunzip.js', will send a 404 error response.
Comment 16 Oved Ourfali 2017-10-31 05:48:44 EDT
Tomas - this doesn't sound ux-related.
Can you take a look?
Comment 17 Tomas Jelinek 2017-11-03 10:32:55 EDT
Indeed, taking.
The reason is that we need to specify all the libs for novnc to work and it does not require (hence does not contain) the jsunzip anymore. And it breaks because of this line: https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/services/src/main/webapp/novnc-main.jsp#L100
Comment 18 Michal Skrivanek 2017-11-07 10:19:38 EST
the remaining problem is due to novnc-0.6.1 which was recently added to centos virt sig repo. Update of ovirt-engine code is pending on bug 1502652. Unlikely to happen right now.
Sandro, I believe you nacked removal of that package and/or somehow separating it out so it's not available to oVirt users, right? 
A feasible option is to Require:novnc-0.5.0 in engine spec. Would that be ok?
Comment 19 Yaniv Kaul 2017-11-16 02:41:31 EST
Since all attached patches are merged, can this be moved to MODIFIED state?
Comment 20 jniederm 2017-11-16 18:15:31 EST
Done(In reply to Yaniv Kaul from comment #19)
> Since all attached patches are merged, can this be moved to MODIFIED state?

Done

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