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] QueryPerf PerfQuerySpec.MaxSample is optional, but treated as provided by clients when it isn't #3097

Closed
jsleblanc opened this issue Apr 16, 2023 · 1 comment · Fixed by #3098

Comments

@jsleblanc
Copy link
Contributor

Describe the bug
When querying performance counters using the QueryPerf method, the PerfQuerySpec argument defines an optional property called "maxSample" that will limit the number of samples returned. The documentation indicates that this property is optional and does not need to be specified by clients on their request. The issue is govcsim defines this property as a non-nullable integer, so clients that do not specify a value will result in maxSample defaulting to 0 and no data will be returned to the client.

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/c476b64b-c93c-4b21-9d76-be14da0148f9/04ca12ad-59b9-4e1c-8232-fd3d4276e52c/SDK/vsphere-ws/docs/ReferenceGuide/vim.PerformanceManager.QuerySpec.html

To Reproduce
Steps to reproduce the behavior:

  1. Make a call to QueryPerf for any entity/metric, specify entity, metricId, intervalId, startTime, endTime, but do not provide a value for "maxSample" on the PerfQuerySpec argument.

Expected behavior
QueryPerf should return simulated data, but sampleInfo on every PerfEntityMetric in the response is null.

Affected version
HEAD of main

@github-actions
Copy link
Contributor

Howdy 🖐   jsleblanc ! 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.

jsleblanc added a commit to jsleblanc/govmomi that referenced this issue Apr 16, 2023
…Sample is greater than 0 and the number of samples to generate is greater than maxSample

Closes: vmware#3097
dougm pushed a commit that referenced this issue Jun 27, 2023
…Sample is greater than 0 and the number of samples to generate is greater than maxSample

Closes: #3097
priyanka19-98 pushed a commit to priyanka19-98/govmomi that referenced this issue Jan 17, 2024
…Sample is greater than 0 and the number of samples to generate is greater than maxSample

Closes: vmware#3097
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant