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

fix: ensure proper vSAN URI format in ResolveLibraryItemStorage #3586

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

dougm
Copy link
Member

@dougm dougm commented Oct 9, 2024

ConvertNamespacePathToUuidPath() fails when given: "ds:/path..."
Requires:
"ds:///path..."

ConvertNamespacePathToUuidPath() fails when given:
"ds:/path..."
Requires:
"ds:///path..."
@dougm dougm requested review from dilyar85 and ericvmw October 9, 2024 06:28
@ericvmw
Copy link
Contributor

ericvmw commented Oct 9, 2024

Thanks for the quick fix @dougm !
Just to double confirm: the change will make ResolveLibraryItemStorage work with both ds:/vmfs and ds:///vmfs datastore URI path, right?

@dougm
Copy link
Member Author

dougm commented Oct 9, 2024

Right @ericvmw , I tested manually using following, where Resolved URI is derived from ConvertNamespacePathToUuidPath:

% export GOVC_SHOW_UNRELEASED=true # for '-S' flag
% govc library.info -S -l /tkg-local/*/*.ovf
Name:              photon-5-v1.31.1---vmware.2-fips.ovf
  Path:            /tkg-local/photon-5-amd64-v1.31.1---vmware.2-fips-vkr.2/photon-5-v1.31.1---vmware.2-fips.ovf
  Size:            99.5KB
  Version:         1
  Datastore Path:  [vsanDatastore] contentlib-02bde409-f81f-4582-8757-15fc84028391/bee96e0e-f5a3-4daf-8d4b-ea65686a0da0/photon-5-v1.31.1---vmware.2-fips_45877ac7-96b8-451e-b4e2-d3b72b796fe5.ovf
  Resolved URI:    [vsanDatastore] e9dffe66-d40f-2df5-827a-bc97e1dacbc0/bee96e0e-f5a3-4daf-8d4b-ea65686a0da0/photon-5-v1.31.1---vmware.2-fips_45877ac7-96b8-451e-b4e2-d3b72b796fe5.ovf
Name:              photon-ova.ovf
  Path:            /tkg-local/photon-5-amd64-vmi-k8s-v1.30.1---vmware.1-fips-tkg.5/photon-ova.ovf
  Size:            98.2KB
  Version:         1
  Datastore Path:  [vsanDatastore] contentlib-02bde409-f81f-4582-8757-15fc84028391/fbc0b9ca-c320-4be1-b872-9cf7bc621333/photon-ova_0a9ebb7b-4020-4673-8c76-a8c41d0fd755.ovf
  Resolved URI:    [vsanDatastore] e9dffe66-d40f-2df5-827a-bc97e1dacbc0/fbc0b9ca-c320-4be1-b872-9cf7bc621333/photon-ova_0a9ebb7b-4020-4673-8c76-a8c41d0fd755.ovf

@dougm
Copy link
Member Author

dougm commented Oct 9, 2024

See also: https://go.dev/play/p/YAH36y7BObJ

Copy link
Contributor

@ericvmw ericvmw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @dougm!

@dougm dougm merged commit a11d573 into vmware:main Oct 9, 2024
10 checks passed
@dougm dougm deleted the ResolveLibraryItemStorage branch October 9, 2024 07:15
@dougm
Copy link
Member Author

dougm commented Oct 9, 2024

Release tag including this fix: https://github.com/vmware/govmomi/releases/tag/v0.44.1

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

Successfully merging this pull request may close these issues.

2 participants