Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cgoudie opened this issue Dec 4, 2023 · 3 comments
Labels

Comments

@cgoudie
Copy link

cgoudie commented Dec 4, 2023

Affected version
At least 4.5.4 and 4.5.5-1

  • oVirt Engine: ovirt-engine-4.5.5-1.el8.noarch
  • Host OS Variant: Centos Stream 8 x64
  • VDSM version: vdsm-4.50.3.4-1.el9.x86_64

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 cgoudie added the bug label Dec 4, 2023
@cgoudie
Copy link
Author

cgoudie commented Dec 4, 2023

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
Copy link

humnab commented Jan 13, 2024

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

@humnab
Copy link

humnab commented Feb 21, 2024

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:

37c3dc5

sermakov-orion added a commit to sermakov-orion/ovirt-engine that referenced this issue Aug 2, 2024
##Fixes issue
This PR fixes the oVirt#900 issue.

##Changes introduced with this PR
Since the SecretValue structure is used in GWT, it should implement Serializable interface.
Also couple null checks were added to avoid NPE in the scenario explained in the oVirt#900 issue.

##Are you the owner of the code you are sending in, or do you have permission of the owner?
Yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants