forked from vmware/govmomi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid possible panic in govc metric commands
Newer versions of vCenter may return a CounterId via QueryAvailablePerfMetric() which does not have a corresponding PerfCounterInfo entry in PerformanceManager's perfCounter property. This results in a panic by a few of the govc metric commands and any application using performance.Manager.AvailableMetric with Sort enabled. While this may be a bug in vCenter, it is included in some recent release versions. This workaround avoids the panic by ignoring any CounterId w/o a PerfCounterInfo. Also updated vcsim's PerformanceManager.QueryCounter to match real vCenter's behavior. Where null is returned for an unknown CounterId. Closes vmware#2835
- Loading branch information
Showing
5 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters