Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nova API > 2.87 breaks fetching cpu_info from hypervisor #3026

Closed
@samuelallan72

Description

@samuelallan72

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions