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

Nova API > 2.87 breaks fetching cpu_info from hypervisor #3026

Open
samuelallan72 opened this issue Apr 5, 2024 · 0 comments · May be fixed by #3028
Open

Nova API > 2.87 breaks fetching cpu_info from hypervisor #3026

samuelallan72 opened this issue Apr 5, 2024 · 0 comments · May be fixed by #3028

Comments

@samuelallan72
Copy link

Please see discussion at openstack-exporter/openstack-exporter#268.

The root of the error is at

switch t := s.CPUInfo.(type) {
case string:
tmpb = []byte(t)
case map[string]interface{}:
tmpb, err = json.Marshal(t)
if err != nil {
return err
}
default:
return fmt.Errorf("CPUInfo has unexpected type: %T", t)
}

Here, with Nova API > 2.87, CPUInfo is nil, causing the error.

samuelallan72 added a commit to samuelallan72/gophercloud that referenced this issue Apr 10, 2024
@samuelallan72 samuelallan72 linked a pull request Apr 10, 2024 that will close this issue
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 a pull request may close this issue.

1 participant