xapi-project / xen-api

The Xapi Project's XenAPI Server
http://xenproject.org/developers/teams/xapi.html
Other
346 stars 284 forks source link

Weird Ref in domain control VM's `snapshot_of` #4338

Closed benjamreis closed 1 year ago

benjamreis commented 3 years ago

We've encountered a few times now a weird behavior: Some domain control VM's have a weird value in their snapshot_of field: Ref:1 or Ref:8 or even an empty string sometimes...

One would assume this field would only contain either OpaqueRef:NULL or OpaqueRef:<uuid>.

We still have to find a way to reproduce the issue.

I think that the issue is within the import/export code since this is the only place where a Ref:<int> is used: https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/export.ml#L47-L52 https://github.com/xapi-project/xen-api/blob/master/ocaml/xapi/import.ml#L181

lippirk commented 3 years ago

Is this actually causing issues? It would be good to see a snippet from the logs to demonstrate that this is indeed a problem

benjamreis commented 3 years ago

Hmm this is causing issue in XenOrchestra XAPI's client because those are unexpected value for this field.

I have no logs since I can't reproduce it on demand, but I'll update some if I manage to do it.

julien-f commented 3 years ago

@lippirk We have a piece of code which dynamically needs to know (if we don't know to change the lib for every new class/field in the XAPI) if a field is an opaque refs, and this new behavior triggered some bugs on our side.

In the past we also encountered empty strings instead of OpaqueRef:NULL and we have worked around this.

We'll worked around this as well, but we wanted to notify the project :slightly_smiling_face: