Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1063925

Summary: Network QoS class cast exception
Product: [Retired] oVirt Reporter: Doron Fediuck <dfediuck>
Component: ovirt-engine-coreAssignee: Lior Vernia <lvernia>
Status: CLOSED NOTABUG QA Contact: bugs <bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.4CC: acathrow, bazulay, dfediuck, gcheresh, gklein, iheim, lpeer, masayag, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-23 10:33:43 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:

Description Doron Fediuck 2014-02-11 16:14:16 UTC
Description of problem:
After adding an older host, the host moved to 'connecting' and class cast appears in the engine log.

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

Actual results:
2014-02-11 11:08:51,964 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand] (DefaultQuartzScheduler_Worker-39) Command GetCapabilitiesVDSCommand(HostName =, HostId = 90314e6d-0731-4d28-91b8-a2f0ac6b3a33, vds=Host[]) execution failed. Exception: ClassCastException: java.lang.String cannot be cast to java.util.Map
2014-02-11 11:08:51,966 WARN  [org.ovirt.engine.core.vdsbroker.VdsManager] (DefaultQuartzScheduler_Worker-39) Failed to refresh VDS , vds = 90314e6d-0731-4d28-91b8-a2f0ac6b3a33 :, error = java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map, continuing.: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
        at org.ovirt.engine.core.vdsbroker.vdsbroker.NetworkQosMapper.deserialize( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateNetworkDetailsInInterface( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.addHostNetworksAndUpdateInterfaces( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateNetworkData( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerObjectsBuilder.updateVDSDynamicData( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.GetCapabilitiesVDSCommand.executeVdsBrokerCommand( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.vdsbroker.VdsBrokerCommand.executeVDSCommand( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VDSCommandBase.executeCommand( [vdsbroker.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute( [dal.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsManager.refreshCapabilities( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.refreshVdsRunTimeInfo( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo.refresh( [vdsbroker.jar:]
        at org.ovirt.engine.core.vdsbroker.VdsManager.onTimer( [vdsbroker.jar:]
        at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) [:1.7.0_51]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( [rt.jar:1.7.0_51]
        at java.lang.reflect.Method.invoke( [rt.jar:1.7.0_51]
        at org.ovirt.engine.core.utils.timer.JobWrapper.execute( [scheduler.jar:]
        at [quartz.jar:]
        at org.quartz.simpl.SimpleThreadPool$ [quartz.jar:]
Expected results:

Additional info:

Comment 1 Moti Asayag 2014-02-11 20:55:20 UTC
What were the supported cluster levels by the host ? 
Is that host installed without any manual change to its cluster levels (by modifying to report 3.4 cluster level as well) ?

Comment 2 Itamar Heim 2014-02-16 08:23:46 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 3 Doron Fediuck 2014-02-17 09:42:48 UTC
VDSM version modified, and I'd not open this BZ if the behavior is that 'bad'.
Note that this is the only code part that has issues in this case.
So I'd catch the problem and throw a proper exception to handle it.

Comment 4 Lior Vernia 2014-02-17 12:46:23 UTC
For me this is not a bug. There is no "legitimate" way to get to this situation. You could also get class cast exceptions by putting arbitrary strings in DB columns where serialized collections are expected. It could be mitigated, but I don't think it's worth the attention.