Bug 1518066

Summary: ovirt-engine-backend contains jar files that shouldn't be there
Product: Red Hat Enterprise Virtualization Manager Reporter: Sandro Bonazzola <sbonazzo>
Component: ovirt-engineAssignee: Martin Perina <mperina>
Status: CLOSED ERRATA QA Contact: Pavol Brilla <pbrilla>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2.0CC: juan.hernandez, lsurette, pstehlik, rbalakri, Rhev-m-bugs, rnori, srevivo, ykaul
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-15 17:46:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sandro Bonazzola 2017-11-28 06:28:00 UTC
Description of problem:
$  rpm -qlvp ovirt-engine-backend-4.2.0-0.5.master.el7.noarch.rpm| grep jar | grep -v ^l
-rw-r--r--    1 root    root                    64075 nov 14 15:02 /usr/share/java/ovirt-engine/aaa.jar
-rw-r--r--    1 root    root                  4361961 nov 14 15:02 /usr/share/java/ovirt-engine/bll.jar
-rw-r--r--    1 root    root                     9569 nov 14 15:02 /usr/share/java/ovirt-engine/builtin.jar
-rw-r--r--    1 root    root                  1104823 nov 14 15:02 /usr/share/java/ovirt-engine/dal.jar
-rw-r--r--    1 root    root                    27454 nov 14 15:02 /usr/share/java/ovirt-engine/scheduler.jar
-rw-r--r--    1 root    root                   131235 nov 14 15:02 /usr/share/java/ovirt-engine/searchbackend.jar
-rw-r--r--    1 root    root                   942849 nov 14 15:02 /usr/share/java/ovirt-engine/vdsbroker.jar
-rw-rw-r--    1 root    root                     9024 nov 14 13:39 /usr/share/ovirt-engine/engine.ear/docs.war/WEB-INF/lib/docs.jar
-rw-rw-r--    1 root    root                   158534 nov 14 13:37 /usr/share/ovirt-engine/engine.ear/enginesso.war/WEB-INF/lib/enginesso.jar
-rw-rw-r--    1 root    root                    23308 nov 14 13:37 /usr/share/ovirt-engine/engine.ear/services.war/WEB-INF/lib/branding.jar
-rw-rw-r--    1 root    root                    23528 nov 14 13:39 /usr/share/ovirt-engine/engine.ear/services.war/WEB-INF/lib/services.jar
-rw-rw-r--    1 root    root                    18537 nov 14 13:39 /usr/share/ovirt-engine/engine.ear/welcome.war/WEB-INF/lib/welcome.jar
-rw-rw-r--    1 root    root                    77761 nov 14 13:36 /usr/share/ovirt-engine/modules/common/com/netflix/config/main/archaius-core.jar
-rw-rw-r--    1 root    root                    16442 nov 14 13:36 /usr/share/ovirt-engine/modules/common/com/netflix/hystrix/contrib/main/hystrix-metrics-event-stream.jar
-rw-rw-r--    1 root    root                   290223 nov 14 13:36 /usr/share/ovirt-engine/modules/common/com/netflix/hystrix/main/hystrix-core.jar
-rw-rw-r--    1 root    root                   257224 nov 14 13:36 /usr/share/ovirt-engine/modules/common/com/nimbusds/main/nimbus-jose-jwt.jar
-rw-rw-r--    1 root    root                   738300 nov 14 13:36 /usr/share/ovirt-engine/modules/common/io/reactivex/rxjava/main/rxjava.jar
-rw-rw-r--    1 root    root                    77882 nov 14 13:36 /usr/share/ovirt-engine/modules/common/net/minidev/main/json-smart.jar
-rw-rw-r--    1 root    root                     6571 nov 14 13:36 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/api/metamodel-server/main/metamodel-server.jar
-rw-rw-r--    1 root    root                     7117 nov 14 13:37 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/auth-plugin/main/auth-plugin.jar
-rw-rw-r--    1 root    root                     3995 nov 14 13:39 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/logger/main/logger.jar


Version-Release number of selected component (if applicable):
4.2.0-0.5.master.el7

How reproducible:
100%

Actual results:
3rd party jars are bundled within ovirt-engine-backend

Expected results:
3rd party packages should be in rhvm-dependencies and symlinked in ovirt-engine-backend

Comment 1 Sandro Bonazzola 2017-11-28 07:23:17 UTC
I addressed some of the jars in upstream spec file, still to be addressed at least in downstream packaging:

-rw-rw-r--    1 root    root                   257224 nov 14 13:36 /usr/share/ovirt-engine/modules/common/com/nimbusds/main/nimbus-jose-jwt.jar
-rw-rw-r--    1 root    root                    77882 nov 14 13:36 /usr/share/ovirt-engine/modules/common/net/minidev/main/json-smart.jar
-rw-rw-r--    1 root    root                     6571 nov 14 13:36 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/api/metamodel-server/main/metamodel-server.jar
-rw-rw-r--    1 root    root                     7117 nov 14 13:37 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/auth-plugin/main/auth-plugin.jar
-rw-rw-r--    1 root    root                     3995 nov 14 13:39 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/logger/main/logger.jar

Comment 2 Yaniv Kaul 2017-11-28 07:29:44 UTC
Would be interesting to understand how they got here in the first place.

Comment 3 Sandro Bonazzola 2017-11-28 07:35:45 UTC
nimbus-jose-jwt.jar has been added solving bug #1416491 in patch https://gerrit.ovirt.org/#/c/71200/

Comment 4 Sandro Bonazzola 2017-11-28 07:37:14 UTC
json-smart.jar has been added in the same patch as in comment #3

Comment 5 Sandro Bonazzola 2017-11-28 07:39:39 UTC
About those in common/org/ovirt/engine/core: they're not built from ovirt-engine code so they shouldn't be here. Any reason for having these built outside ovirt-engine code tree?

Comment 6 Martin Perina 2017-11-28 07:58:00 UTC
(In reply to Sandro Bonazzola from comment #3)
> nimbus-jose-jwt.jar has been added solving bug #1416491 in patch
> https://gerrit.ovirt.org/#/c/71200/

(In reply to Sandro Bonazzola from comment #4)
> json-smart.jar has been added in the same patch as in comment #3

Yes, AFAIK they are not packaged anywhere, we have forgotten to add them rhvm-dependencies, I will post a patch today

Comment 7 Martin Perina 2017-11-28 08:50:07 UTC
(In reply to Sandro Bonazzola from comment #1)
> I addressed some of the jars in upstream spec file, still to be addressed at
> least in downstream packaging:
> 
> -rw-rw-r--    1 root    root                     3995 nov 14 13:39
> /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/logger/main/
> logger.jar

Content of the jar is created from sources within ovirt-engine project, looking at git log this jar is needed for ovirt-engine-extension-logger-log4j and it hasn't been changed in 4.2, so that shouldn't been an issue for 4.2.0

Anyway Ravi, do you remember why is this class org.ovirt.engine.core.logger.LoggerHandler packaged in logger.jar and it's not part of other existing engine JARs?

Comment 8 Martin Perina 2017-11-28 08:58:10 UTC
(In reply to Sandro Bonazzola from comment #1)
> I addressed some of the jars in upstream spec file, still to be addressed at
> least in downstream packaging:
> 
> /usr/share/ovirt-engine/modules/common/org/ovirt/engine/api/metamodel-server/
> main/metamodel-server.jar

Juan, do we have a reason why metamodel-server.jar is not provided by standalone RPM and it's packaged within ovirt-engine?

Comment 9 Martin Perina 2017-11-28 09:01:27 UTC
(In reply to Sandro Bonazzola from comment #1)
> I addressed some of the jars in upstream spec file, still to be addressed at
> least in downstream packaging:
> 
> -rw-rw-r--    1 root    root                     7117 nov 14 13:37
> /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/auth-plugin/
> main/auth-plugin.jar

auth-plugin was added by https://gerrit.ovirt.org/29693 but its content is being built from ovirt-engine sources. Am I right, Roy?

Comment 10 Juan Hernández 2017-11-28 09:10:11 UTC
The reason for including the metamodel-server.jar in the engine RPM is that it doesn't have a RPM packaging itself. Changing that would mean more work and no benefit. My advice is to leave it as it is.

Comment 11 Roy Golan 2017-11-28 10:40:39 UTC
(In reply to Martin Perina from comment #9)
> (In reply to Sandro Bonazzola from comment #1)
> > I addressed some of the jars in upstream spec file, still to be addressed at
> > least in downstream packaging:
> > 
> > -rw-rw-r--    1 root    root                     7117 nov 14 13:37
> > /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/auth-plugin/
> > main/auth-plugin.jar
> 
> auth-plugin was added by https://gerrit.ovirt.org/29693 but its content is
> being built from ovirt-engine sources. Am I right, Roy?

Yes. Nothing to address here.

Comment 12 Martin Perina 2017-11-29 07:59:12 UTC
Based on above the JAR file which is not build from ovirt-engine source is the metamodel and we have control on that project, so we can have it as JAR inside ovirt-engine

Comment 15 Pavol Brilla 2017-12-13 09:17:35 UTC
VErified

[root@10-37-137-34 ~]# rpm -qlv ovirt-engine-backend-4.2.0.2-0.1.el7.noarch | grep jar | grep -v ^l
-rw-r--r--    1 root    root                    64120 Dec 12 15:54 /usr/share/java/ovirt-engine/aaa.jar
-rw-r--r--    1 root    root                  4396494 Dec 12 15:54 /usr/share/java/ovirt-engine/bll.jar
-rw-r--r--    1 root    root                     9571 Dec 12 15:54 /usr/share/java/ovirt-engine/builtin.jar
-rw-r--r--    1 root    root                  1093301 Dec 12 15:54 /usr/share/java/ovirt-engine/dal.jar
-rw-r--r--    1 root    root                    27458 Dec 12 15:54 /usr/share/java/ovirt-engine/scheduler.jar
-rw-r--r--    1 root    root                   131447 Dec 12 15:54 /usr/share/java/ovirt-engine/searchbackend.jar
-rw-r--r--    1 root    root                   946096 Dec 12 15:54 /usr/share/java/ovirt-engine/vdsbroker.jar
-rw-rw-r--    1 root    root                     9024 Dec 12 14:23 /usr/share/ovirt-engine/engine.ear/docs.war/WEB-INF/lib/docs.jar
-rw-rw-r--    1 root    root                   158760 Dec 12 14:21 /usr/share/ovirt-engine/engine.ear/enginesso.war/WEB-INF/lib/enginesso.jar
-rw-rw-r--    1 root    root                    23311 Dec 12 14:21 /usr/share/ovirt-engine/engine.ear/services.war/WEB-INF/lib/branding.jar
-rw-rw-r--    1 root    root                    23528 Dec 12 14:23 /usr/share/ovirt-engine/engine.ear/services.war/WEB-INF/lib/services.jar
-rw-rw-r--    1 root    root                    18604 Dec 12 14:23 /usr/share/ovirt-engine/engine.ear/welcome.war/WEB-INF/lib/welcome.jar
-rw-rw-r--    1 root    root                     6574 Dec 12 14:20 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/api/metamodel-server/main/metamodel-server.jar
-rw-rw-r--    1 root    root                     7120 Dec 12 14:22 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/auth-plugin/main/auth-plugin.jar
-rw-rw-r--    1 root    root                     3999 Dec 12 14:23 /usr/share/ovirt-engine/modules/common/org/ovirt/engine/core/logger/main/logger.jar

Packages solo packaged:
https://bugzilla.redhat.com/show_bug.cgi?id=1482469
https://bugzilla.redhat.com/show_bug.cgi?id=1482434
https://bugzilla.redhat.com/show_bug.cgi?id=1483623

Comment 19 errata-xmlrpc 2018-05-15 17:46:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1488

Comment 20 Franta Kust 2019-05-16 13:03:47 UTC
BZ<2>Jira Resync