Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 950479

Summary: [AIO] Error: Could not create local datacenter
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Pavel Stehlik <pstehlik>
Component: RPMsAssignee: Fernando Nasser <fnasser>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1.0CC: acathrow, alourie, bazulay, iheim, jkt, juan.hernandez, myarboro, Rhev-m-bugs, sgrinber
Target Milestone: ER8Keywords: Regression, Reopened, TestBlocker
Target Release: EAP 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-29 20:42:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine-setup_2013_04_10_10_38_57.log.tgz
none
engineAIO.log none

Description Pavel Stehlik 2013-04-10 10:02:23 UTC
Created attachment 733601 [details]
engine-setup_2013_04_10_10_38_57.log.tgz

Description of problem:
 Installing AIO:
override-httpd-config:         yes
http-port:                     80
https-port:                    1243
host-fqdn:                     slot-7.rhev.lab.eng.brq.redhat.com
auth-pass:                     ********
org-name:                      rhev.lab.eng.brq.redhat.com
default-dc-type:               NFS
db-remote-install:             local
db-local-pass:                 ********
nfs-mp:                        /var/lib/exports/iso_2013_04_10_10_38_58
override-firewall:             iptables
config-allinone:               yes
storage-path:                  /data/tt
superuser-pass:                ********
...
Configuring HTTPD...                                              [ DONE ]
AIO: Creating storage directory...                                [ DONE ]
AIO: Adding Local Datacenter and cluster...                    [ ERROR ]
Error: Could not create local datacenter
Please check log file /var/log/ovirt-engine/engine-setup_2013_04_10_10_38_57.log for more information

Version-Release number of selected component (if applicable):
sf13

How reproducible:
100%

Steps to Reproduce:
1. yum install rhevm-setup-plugin-allinone
2. rhevm-setup
3.
  
Actual results:


Expected results:


Additional info:
2013-04-10 10:46:59::INFO::all_in_one_100::434::root:: JBoss is up and running.
2013-04-10 10:46:59::DEBUG::setup_sequences::59::root:: running initAPI
2013-04-10 10:46:59::DEBUG::all_in_one_100::220::root:: Initiating the API object
2013-04-10 10:47:01::DEBUG::setup_sequences::59::root:: running createDC
2013-04-10 10:47:01::DEBUG::all_in_one_100::236::root:: Creating the local datacenter
2013-04-10 10:47:02::ERROR::all_in_one_100::242::root:: Traceback (most recent call last):
  File "/usr/share/ovirt-engine/scripts/plugins/all_in_one_100.py", line 240, in createDC
    version=params.Version(major=MAJOR, minor=MINOR)))
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/brokers.py", line 2399, in add
    headers={"Expect":expect, "Correlation-Id":correlation_id}
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 170, in add
    return self.request('POST', url, body, headers)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 199, in request
    noParse=noParse)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 248, in __doRequest
    raise RequestError, response
RequestError: ^M
status: 500^M
reason: Internal Server Error^M
detail: JBAS014580: Unexpected Error

2013-04-10 10:47:02::DEBUG::setup_sequences::62::root:: Traceback (most recent call last):
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/share/ovirt-engine/scripts/plugins/all_in_one_100.py", line 243, in createDC
    raise Exception(ERROR_CREATE_LOCAL_DATACENTER)
Exception: Error: Could not create local datacenter

...

2013-04-10 10:47:02::ERROR::rhevm-setup::2344::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-setup", line 2338, in <module>
    main(confFile)
  File "/usr/bin/rhevm-setup", line 2112, in main
    runSequences()
  File "/usr/bin/rhevm-setup", line 2031, in runSequences
    controller.runAllSequences()
  File "/usr/share/ovirt-engine/scripts/setup_controller.py", line 54, in runAllSequences
    sequence.run()
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 154, in run
    step.run()
  File "/usr/share/ovirt-engine/scripts/setup_sequences.py", line 60, in run
    function()
  File "/usr/share/ovirt-engine/scripts/plugins/all_in_one_100.py", line 243, in createDC
    raise Exception(ERROR_CREATE_LOCAL_DATACENTER)
Exception: Error: Could not create local datacenter

Comment 1 Pavel Stehlik 2013-04-22 08:41:04 UTC
Created attachment 738457 [details]
engineAIO.log

engine.log just in case.

2013-04-10 10:47:00,462 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-2) calling GetConfigurationValueQuery (ApplicationMode) with null version, using default general for version
2013-04-10 10:47:00,482 WARN  [org.ovirt.engine.core.bll.GetConfigurationValueQuery] (ajp-/127.0.0.1:8702-2) calling GetConfigurationValueQuery (VdcVersion) with null version, using default general for version
2013-04-10 10:47:01,992 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-3) Operation Failed: JBAS014580: Unexpected Error: javax.ejb.EJBException: JBAS014580: Unexpected Error
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInNoTx(CMTTxInterceptor.java:188) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:237) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:374) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:218) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-2]
    at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-2]
    at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-2]
    at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3.jar:7.2.0.Final-redhat-3]

Comment 2 Alex Lourie 2013-04-22 15:45:47 UTC
Hi Pavel

Please update the hibernate-validator package manually and try again.

Comment 3 Pavel Stehlik 2013-04-29 20:42:45 UTC
Alex - indeed, update to hibernate4-validator-4.3.1-1.Final_redhat_1.1.ep6.el6.4.noarch solved it.

Comment 4 Alex Lourie 2013-04-29 23:58:02 UTC
Hi Pavel

Thanks for the testing!

We cannot close the bug yet - we will move it to eap so they can fix their packaging and dependencies. According to Juan Hernandes:

"I see in the logs that the version of JBoss is 7.2, so we are using EAP 6.1. I also see in the logs that the version of hibernate-validator is 4.2.0.Final, but the version of hibernate-validator included in EAP 6.1 should be 4.3.1.Final (at least that is what is included in EAP 6.1 Alpha).

Changes have been made to hibernate-validator to remove the dependency on jtype, so I guess that the dependency removed from hibernate-validator somewhere between 4.2.0.Final and 4.3.1.Final but the hibernate-package hasn't probably been updated."

Comment 8 Juan Hernández 2013-05-06 12:04:45 UTC
I think this should be changed to the RPMs component, as I believe it is a packaging issue.

Note that this happened with EAP 6.1, and the relevant message from the attached log is the following:

Caused by: java.lang.NoClassDefFoundError: com/googlecode/jtype/TypeUtils
	at org.hibernate.validator.engine.ValidatorImpl.createIteratorForCascadedValue(ValidatorImpl.java:540) [hibernate-validator.jar:4.2.0.Final-redhat-1]
	at org.hibernate.validator.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:476) [hibernate-validator.jar:4.2.0.Final-redhat-1]
	at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322) [hibernate-validator.jar:4.2.0.Final-redhat-1]
	at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139) [hibernate-validator.jar:4.2.0.Final-redhat-1]

I think this happens because the installation of the EAP 6.1 RPMs didn't force the installation of hibernate-validator 4.3.1 as it should. In my opinion this can be solved adding "Requires: hibernate4-validator >= 4.3.1" to one of the EAP .spec files.

Comment 9 Fernando Nasser 2013-05-06 14:02:32 UTC
I've added the Requires as above (it was using the same version as the other hibernate4 components, which is no longer true).

However...  if the installation instructions are followed this will not occur.  The presence in the repository of a newer version of hibernate4-validator would cause that package to be updated (as it is verified both by our tests and TPS).

So there is a grave user error happening here and there may be other problems in this installation.  I strongly suggest following the instructions that cause all available updates from the EAP channel (or repo) to be applied.

Comment 10 Itamar Heim 2013-05-06 14:41:42 UTC
Hi Fernando,

can you please be a bit more specific?
iirc, we've worked hard so installation instruction won't need any "jboss specific" guidelines by fixing the inconsistencies which existed in the past.

we have an issue if RHEL has RPMs which are newer versions than JBoss ones. we can't disable the rhel channel for yum updates. as far as yum is concerned, RHEL is more updated if they release a newer version of same rpm?
if you don't ever plan to move to the RHEL rpm, why not increase the epoch of your rpm so it will always be newer?

thanks,
   Itamar

Comment 11 Itamar Heim 2013-05-06 14:44:26 UTC
(In reply to comment #10)
> Hi Fernando,
> 
> can you please be a bit more specific?
> iirc, we've worked hard so installation instruction won't need any "jboss
> specific" guidelines by fixing the inconsistencies which existed in the past.
> 
> we have an issue if RHEL has RPMs which are newer versions than JBoss ones.
> we can't disable the rhel channel for yum updates. as far as yum is
> concerned, RHEL is more updated if they release a newer version of same rpm?
> if you don't ever plan to move to the RHEL rpm, why not increase the epoch
> of your rpm so it will always be newer?
> 
> thanks,
>    Itamar

hmmm, i got confused with bug 958545 in this comment. please ignore

Comment 12 Pavel Janousek 2013-05-07 06:49:31 UTC
EAP-6.0.1 instance updated as documented in [1] works as expected. Hibernate-validator is deployed from hibernate4-validator-4.3.1-1.Final_redhat_1.1.ep6.el6.4.noarch.rpm - it's a correct version. This has been true at least from ER4, in ER3 I can't say for sure because we've discovered some differences between ZIP and RPM set in Hibernate, but from my LOG hibernate-validator doesn't look affected.

[1] http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Installation_Guide/Upgrade_the_JBoss_Enterprise_Application_Platform_6_RPM_Installation.html

Comment 13 Juan Hernández 2013-05-07 08:15:57 UTC
When RHEV-M is upgraded we don't run "yum update", but the equivalent to "yum update rhevm". The RHEV-M package requires the following packages, which we expect to transitively bring all the correct versions:

  Requires: jbossas-standalone >= 0:7.1.3
  Requires: jbossas-modules-eap >= 0:7.1.3

It is my understanding that the purpose of the jbossas-modules-eap package is to contain all the module descriptors and the dependencies (including the version number) on the packages that provide the actual .jar files. If these dependencies aren't correct, like in this bug, then our update doesn't work correctly.

Fernando, Pavel, what you are saying is that we need to run "yum update" as part of the RHEV-M update process. This doesn't seem ideal to me, as it would update everything in the machine, maybe including completely unrelated things that the user may not want to update. I believe that it is better to make sure that "yum update jboss-modules-eap" works correctly, and I would go so far as to say that this should be included in the EAP update tests.

Itamar, it is my understanding from comment 9 that currently we can't trust "yum update rhevm", so we need to run "yum update" in our upgrade tool.

Comment 14 Pavel Janousek 2013-05-07 08:34:25 UTC
I can't say if jbossas-modules-eap brings every required dependency, but I guess no and the reason is not only because some packages (some natives, Apache HTTPd, Javadoc etc.) are only optional. Is this expectation specified somewhere as requirement for this package?

But in current state, it makes sense for me to do dependency to not only jbossas-standalone and jbossas-modules-eap, but to all packages included in jboss-eap6 group ("yum groupinfo jboss-eap6").

Because if your update procedure is aka "yum update rhevm", I'm pretty sure, you can get another EAP instance after update - e.g. what about Apache HTTPd server baked on MW BU side (not on BaseOS side)? In your scenario will be updated as well (in the case it was installed before)? Apache HTTPd is updated in EAP-6.1.0 as well.

If you can strictly update only JBoss EAP, what about --disablerepo/--enablerepo command line switches of yum itself? As possible solution, enable only "jbappplatform-6-i386-server-6-rpm" or "jbappplatform-6-x86_64-server-6-rpm" RHN channel plus (mandatory, because EAP-6.1.0 brings new dependencies to BaseOS as well) BaseOS channel during general can be sufficient.

Comment 15 Pavel Janousek 2013-05-07 08:36:57 UTC
Huh, typo in last sentence (BZ doesn't support edit of a comment):

...during general "yum update" can be....

Comment 16 Juan Hernández 2013-05-07 09:03:54 UTC
(In reply to comment #14)
> I can't say if jbossas-modules-eap brings every required dependency, but I
> guess no and the reason is not only because some packages (some natives,
> Apache HTTPd, Javadoc etc.) are only optional. Is this expectation specified
> somewhere as requirement for this package?
> 
> But in current state, it makes sense for me to do dependency to not only
> jbossas-standalone and jbossas-modules-eap, but to all packages included in
> jboss-eap6 group ("yum groupinfo jboss-eap6").

Till now those dependencies have worked well for us, but I agree that including all the packages in the jboss-eap-6 group is good. So our list should be something like this (for 6.1):

  Requires: jbossas-appclient >= 0:7.2
  Requires: jbossas-bundles  >= 0:7.2
  Requires: jbossas-core >= 0:7.2
  Requires: jbossas-domain >= 0:7.2
  Requires: jbossas-hornetq-native >= 0:7.2
  Requires: jbossas-jbossweb-native >= 0:7.2
  Requires: jbossas-modules-eap >= 0:7.2
  Requires: jbossas-product-eap >= 0:7.2
  Requires: jbossas-standalone >= 0:7.2
  Requires: jbossas-welcome-content-eap >= 0:7.2

However, my understanding from comment 9 is that even if we do this we don't have any guarantee if we do "yum update rhevm", as the only update that is tested is the complete "yum update". The issue in this bug in particular won't be solved by these additional dependencies.

> Because if your update procedure is aka "yum update rhevm", I'm pretty sure,
> you can get another EAP instance after update - e.g. what about Apache HTTPd
> server baked on MW BU side (not on BaseOS side)? In your scenario will be
> updated as well (in the case it was installed before)? Apache HTTPd is
> updated in EAP-6.1.0 as well.

I am not sure I understand. What do yum mean by "get another EAP instance"? And do you mean that the Apache httpd packages from the base channel have to be replaced with the packages from the jboss-eap-6 channel in order to have a supported installation? To be honest, the existence of these packages in the EAP 6 channel is new to me, please elaborate.

> If you can strictly update only JBoss EAP, what about
> --disablerepo/--enablerepo command line switches of yum itself? As possible
> solution, enable only "jbappplatform-6-i386-server-6-rpm" or
> "jbappplatform-6-x86_64-server-6-rpm" RHN channel plus (mandatory, because
> EAP-6.1.0 brings new dependencies to BaseOS as well) BaseOS channel during
> general can be sufficient.

We could use those switches and enable the base, RHEV-M and EAP channels only, but the net result is the same: if we run "yum update" we will be updating things from the base channel that the user may not want to update (kernel, glibc, etc).

Comment 17 Pavel Janousek 2013-05-07 12:07:56 UTC
(In reply to comment #16)
> However, my understanding from comment 9 is that even if we do this we don't
> have any guarantee if we do "yum update rhevm", as the only update that is
> tested is the complete "yum update". The issue in this bug in particular
> won't be solved by these additional dependencies.

I can't say for sure right now. But you are right, this use-case isn't tested at all, so the result is undefined yet.

> > Because if your update procedure is aka "yum update rhevm", I'm pretty sure,
> > you can get another EAP instance after update - e.g. what about Apache HTTPd
> > server baked on MW BU side (not on BaseOS side)? In your scenario will be
> > updated as well (in the case it was installed before)? Apache HTTPd is
> > updated in EAP-6.1.0 as well.
> 
> I am not sure I understand. What do yum mean by "get another EAP instance"?
> And do you mean that the Apache httpd packages from the base channel have to
> be replaced with the packages from the jboss-eap-6 channel in order to have
> a supported installation? To be honest, the existence of these packages in
> the EAP 6 channel is new to me, please elaborate.

Apache HTTPd is one (not alone) of the optional part available in JBoss channel (version 2.2.22). Unfortunately it is a bit special because it is available in BaseOS channel (version 2.2.15) as well. Fortunately both Apaches are supported use-cases for customer's deployment and are covered by EAP QE.

What I've not so clearly highlight above is the fact - I assume you have installed EAP-6.0.1 plus some additional (not mandatory) part of it - e.g. Apache HTTPd from JBoss EAP channel - your and mine system state is the same before update. Whenever you try to update your EAP-6.0.1 instance like:
- yum update rhevm
- yum groupupdate jboss-eap6

as the result you will get another instance of system than I or anybody else who do only plain 'yum update'. At least, your instance will not have updated Apache HTTPd, but mine will. This can't be fixed by dependencies in .spec file because Apache HTTPd isn't mandatory part of JBoss EAP instance and it isn't necessary to be installed during 'you groupinstall jboss-eap6' command invocation.

> > If you can strictly update only JBoss EAP, what about
> > --disablerepo/--enablerepo command line switches of yum itself? As possible
> > solution, enable only "jbappplatform-6-i386-server-6-rpm" or
> > "jbappplatform-6-x86_64-server-6-rpm" RHN channel plus (mandatory, because
> > EAP-6.1.0 brings new dependencies to BaseOS as well) BaseOS channel during
> > general can be sufficient.
> 
> We could use those switches and enable the base, RHEV-M and EAP channels
> only, but the net result is the same: if we run "yum update" we will be
> updating things from the base channel that the user may not want to update
> (kernel, glibc, etc).

But customer has to have up-to-date system whenever he can try to update his instance. This comes (at least) from [1], but this requirement/prerequisite is there for a long time - so if customer can have EAP-6.1.0, it has to have up-to-date BaseOS as well. Without this prerequisite we can have (and have to support) infinite number of different instance states - impossible.

[1] http://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/6.1/html/Installation_Guide/chap-Requirements.html#Installation_Prerequisites_for_JBoss_Enterprise_Application_Platform_6

Comment 18 Juan Hernández 2013-05-07 12:36:05 UTC
So the only possible conclusion is that we need to run full "yum update" from our upgrade tool. I created bug 960581 to track that.

Comment 22 Fernando Nasser 2013-05-10 16:42:51 UTC
jbossas-modules-eap now has
Requires: hibernate4-validator >= 4.3.1

Comment 23 Pavel Janousek 2013-05-14 06:40:46 UTC
Looks fixed in EAP-6.1.0-ER8, will be verified after RPM re-spin finally.

Comment 24 Pavel Janousek 2013-05-14 11:59:57 UTC
Verified during EAP-6.1.0-ER8 test cycle, fixed as Fernando describes in comment #22.