[ovirt-devel] Upgrade to wildfly problem
Martin Mucha
mmucha at redhat.com
Tue Jun 30 06:39:45 UTC 2015
Thanks very much, for review.
I mistakenly used BootProtocol enum instead of NetworkBootProtocol enum, and relied on ordinal values of former instead on 'intValue's of latter.
updated.
M.
----- Original Message -----
> On 06/30/2015 08:25 AM, Martin Mucha wrote:
> > Hi,
> >
> > this is caused by new HostNetworkingAPI resp one its db upgrade script, not
> > by wildfly. I wrote 'fix' script yesterday, which should fix this. However
> > this patch did not get CR yet, and cannot be merged. But you can use it to
> > cure your environment manually. If you do, please let me know if
> > everything went ok.
> >
> > https://gerrit.ovirt.org/#/c/42977/
> I reviewed the patch, it needs an update
> > M.
> >
> > ----- Original Message -----
> >> Hi,
> >>
> >> I followed the upgrade to wildfly steps here [1]. And everything worked as
> >> expected. I was able to compile/run/update database without issues.
> >> However
> >> now when I start the engine, everything appears to work but I am getting
> >> the
> >> following stack trace over and over and over again in my engine log.
> >>
> >> 2015-06-29 11:47:44,240 WARN [org.ovirt.engine.core.vdsbroker.VdsManager]
> >> (DefaultQuartzScheduler_Worker-39) [] Failed to refresh VDS , vds =
> >> 'host1' :
> >> '932f05b4-e3b0-4e9a-ab99-77ff749138b3', error = 'No enum constant
> >> org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.1',
> >> continuing.
> >> 2015-06-29 11:47:44,241 ERROR [org.ovirt.engine.core.vdsbroker.VdsManager]
> >> (DefaultQuartzScheduler_Worker-39) [] Exception:
> >> java.lang.IllegalArgumentException: No enum constant
> >> org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.1
> >> at java.lang.Enum.valueOf(Enum.java:236) [rt.jar:1.7.0_79]
> >> at
> >> org.ovirt.engine.core.common.businessentities.network.NetworkBootProtocol.valueOf(NetworkBootProtocol.java:6)
> >> [common.jar:]
> >> at
> >> org.ovirt.engine.core.dao.network.NetworkAttachmentDaoDbFacadeImpl$NetworkAttachmentRowMapper.mapRow(NetworkAttachmentDaoDbFacadeImpl.java:96)
> >> [dal.jar:]
> >> at
> >> org.ovirt.engine.core.dao.network.NetworkAttachmentDaoDbFacadeImpl$NetworkAttachmentRowMapper.mapRow(NetworkAttachmentDaoDbFacadeImpl.java:79)
> >> [dal.jar:]
> >> at
> >> org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:92)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:1)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:649)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:587)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:637)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:706)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.executeCallInternal(PostgresDbEngineDialect.java:154)
> >> [dal.jar:]
> >> at
> >> org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresSimpleJdbcCall.doExecute(PostgresDbEngineDialect.java:120)
> >> [dal.jar:]
> >> at
> >> org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181)
> >> [spring-jdbc.jar:3.1.1.RELEASE]
> >> at
> >> org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:147)
> >> [dal.jar:]
> >> at
> >> org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeReadList(SimpleJdbcCallsHandler.java:109)
> >> [dal.jar:]
> >> at
> >> org.ovirt.engine.core.dao.network.NetworkAttachmentDaoDbFacadeImpl.getAllForHost(NetworkAttachmentDaoDbFacadeImpl.java:40)
> >> [dal.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkAttachmentsPersister.persistNetworkAttachments(HostNetworkAttachmentsPersister.java:69)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkTopologyPersisterImpl.persistTopology(HostNetworkTopologyPersisterImpl.java:280)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkTopologyPersisterImpl.persistAndEnforceNetworkCompliance(HostNetworkTopologyPersisterImpl.java:85)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.vdsbroker.HostNetworkTopologyPersisterImpl.persistAndEnforceNetworkCompliance(HostNetworkTopologyPersisterImpl.java:141)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.VdsManager.refreshCapabilities(VdsManager.java:666)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.HostMonitoring.beforeFirstRefreshTreatment(HostMonitoring.java:706)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.HostMonitoring.refreshVdsRunTimeInfo(HostMonitoring.java:128)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.HostMonitoring.refresh(HostMonitoring.java:84)
> >> [vdsbroker.jar:]
> >> at
> >> org.ovirt.engine.core.vdsbroker.VdsManager.onTimer(VdsManager.java:215)
> >> [vdsbroker.jar:]
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> [rt.jar:1.7.0_79]
> >> at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >> [rt.jar:1.7.0_79]
> >> at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >> [rt.jar:1.7.0_79]
> >> at java.lang.reflect.Method.invoke(Method.java:606)
> >> [rt.jar:1.7.0_79]
> >> at
> >> org.ovirt.engine.core.utils.timer.JobWrapper.invokeMethod(JobWrapper.java:81)
> >> [scheduler.jar:]
> >> at
> >> org.ovirt.engine.core.utils.timer.JobWrapper.execute(JobWrapper.java:52)
> >> [scheduler.jar:]
> >> at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
> >> [quartz.jar:]
> >> at
> >> org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
> >> [quartz.jar:]
> >>
> >> After some debugging it appears that the query from the database returns
> >> "1"
> >> as the value (which is correct as that is the value in the database). But
> >> then
> >> the NetworkBootProtocol.forValue fails due to the possible values being
> >> "NONE", "DHCP", "STATIC". Looking at the stored procedure there doesn't
> >> seem
> >> to be any translation between 1 and DHCP, so it makes sense for the
> >> failure.
> >> I
> >> compared the stored procedure to a clean new database and they are
> >> identical,
> >> so I am assuming my database is fine in that regard.
> >>
> >> If I modify the code to use NetworkBootProtocol.forValue instead of
> >> valueOf
> >> it
> >> works fine, but the valueOf code has been in there for a long time so if
> >> that
> >> was broken it would have been noticed a long time ago. I am out of
> >> thoughts,
> >> can anyone help me figure out what is going on?
> >>
> >> Thanks,
> >> Alexander
> >>
> >> [1] http://lists.ovirt.org/pipermail/devel/2015-June/010832.html
> >> _______________________________________________
> >> Devel mailing list
> >> Devel at ovirt.org
> >> http://lists.ovirt.org/mailman/listinfo/devel
> >>
> > _______________________________________________
> > Devel mailing list
> > Devel at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/devel
>
>
More information about the Devel
mailing list