oVirt / ovirt-engine

The oVirt Engine virtualization manager
Other
519 stars 271 forks source link

SerializationException: Type 'org.ovirt.engine.core.common.utils.SecretValue' was not included in the set of types... #900

Open cgoudie opened 12 months ago

cgoudie commented 12 months ago

Affected version At least 4.5.4 and 4.5.5-1

Describe the bug When you create a VM with TPMS Support enabled, the UI for the snapshot screen doesn't work. (EG: A Windows 11 VM). Due to a serialization error.

the server.log on the engine gives a pretty clear indication of the root cause:

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.ovirt.engine.core.common.utils.SecretValue' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = ***

Looks similar to https://bugzilla.redhat.com/show_bug.cgi?id=1422841

To reproduce 1) Create a Windows 11 configured VM with Trusted Platform Module: TPM Device Enabled checked. 2) Install Windows 11 on it. 3) Take a snapshot 4) Preview the snapshot. 5) Go back into the snapshots tab on the VM to either restore the original disk or commit the snapshot. Endless 500 errors just viewing the snapshots tab.

Steps to reproduce the behavior

Expected behavior

Snapshot management on VMs with TPMS should function.

Note: I've run this in a new incognito window, meaning no cache.

cgoudie commented 12 months ago

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.ovirt.engine.core.common.utils.SecretValue' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = *** at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:696) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.core.java.util.Map_CustomFieldSerializerBase.serialize(Map_CustomFieldSerializerBase.java:53) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.core.java.util.EnumMap_CustomFieldSerializer.serialize(EnumMap_CustomFieldSerializer.java:77) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.core.java.util.EnumMap_CustomFieldSerializer.serializeInstance(EnumMap_CustomFieldSerializer.java:100) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.core.java.util.EnumMap_CustomFieldSerializer.serializeInstance(EnumMap_CustomFieldSerializer.java:31) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:818) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:698) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:167) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:606) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:787) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:826) at deployment.engine.ear.webadmin.war//com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:698) at deployment.engine.ear.webadmin.war//com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:130) at deployment.engine.ear.webadmin.war//org.ovirt.engine.ui.extension.ObjectSerializer.serialize(ObjectSerializer.java:104) at deployment.engine.ear.webadmin.war//org.ovirt.engine.core.common.queries.QueryReturnValue_CustomFieldSerializer.serialize(QueryReturnValue_CustomFieldSerializer.java:27) ... 84 more

humnab commented 10 months ago

Happens also on: 4.5.6-0.master.20240102080404.git8d47cd71da.el8 Does not happen on: 4.5.3.2-1.el8

humnab commented 9 months ago

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'org.ovirt.engine.core.common.utils.SecretValue' was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.: instance = ***

Perhaps introduced here:

https://github.com/oVirt/ovirt-engine/commit/37c3dc58f416ccbd0faa45951fc8134608b35f7e