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

[BUG] ScsiLun.AlternateName data in vcsim is too large for a signed byte #3615

Open
ninjarobot opened this issue Nov 7, 2024 · 1 comment

Comments

@ninjarobot
Copy link

The ScsiLun alternate name in newer releases (v0.38.0 and newer) of vcsim contains data that doesn't meet the signed byte size. Here is an example of the data:

<alternateName>
    <namespace>GENERIC_VPD</namespace>
    <namespaceId>5</namespaceId>
    <data>0</data>
    <data>0</data>
    <data>0</data>
    <data>4</data>
    <data>0</data>
    <data>176</data>
    <data>177</data>
    <data>178</data>
</alternateName>

Per the vSphere API, this should be an array of xsd:byte:
image

An xsd:byte is called a byte, but it is actually a signed byte - between -128 and 127 per the XSD spec.

To Reproduce
Steps to reproduce the behavior:

  1. Launch vcsim using docker on any tag v0.38.0 or newer: docker run --rm -it -p 8989:8989 vmware/vcsim:v0.38.0
  2. Execute the WaitForUpdatesEx SOAP API, as this will return all the inventory, including this malformed data.
  3. Inspect the SOAP response, looking for alternateName where you'll see the <data> fields that contain values that overflow the xsd:byte range.

Expected behavior
The <data> fields in the alternateName should fit within the signed byte range of -128 to 127, like this (behavior from v0.37.3):

<alternateName>
    <namespace>GENERIC_VPD</namespace>
    <namespaceId>5</namespaceId>
    <data>-79</data>
</alternateName>

Affected version
vcsim:v0.38.0 up until latest v0.46.0

Additional context
This worked correctly in older versions of vcsim, up until running with docker using this tag: vmware/vcsim:v0.38.0, and I suspect this is related to the fix for #3469.

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Howdy 🖐   ninjarobot ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant