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

Baremetal exporter misses some states and node names #135

Closed
ftarasenko opened this issue Oct 23, 2020 · 0 comments
Closed

Baremetal exporter misses some states and node names #135

ftarasenko opened this issue Oct 23, 2020 · 0 comments

Comments

@ftarasenko
Copy link

Hi,

I have problem getting node names and some states from baremetal exporter. In example below we can see that nodes miss names and provision_state.

# TYPE openstack_ironic_node gauge
openstack_ironic_node{console_enabled="false",id="2ab373f4-db7c-4348-87ec-bd6eda8f0aef",maintenance="false",name="",power_state="power on",provision_state="inspect failed"} 1
openstack_ironic_node{console_enabled="false",id="9ae2c5a4-22c9-48e2-a255-42a89dc8c567",maintenance="false",name="",power_state="power off",provision_state=""} 1
openstack_ironic_node{console_enabled="false",id="bffe7168-99ee-483a-b149-2c9f53501f70",maintenance="false",name="",power_state="power off",provision_state="manageable"} 1
openstack_ironic_node{console_enabled="false",id="fe110a59-0f85-4f1b-8823-bbd634abfae4",maintenance="false",name="",power_state="power on",provision_state="active"} 1

As a quick fix, I can set Microversion of Ironic Client to 1.58 and get node's names and correct states.


 // ListNodes : list nodes
 func ListNodes(exporter *BaseOpenStackExporter, ch chan<- prometheus.Metric) error {
+       exporter.Client.Microversion = "1.58"
        allPagesNodes, err := nodes.List(exporter.Client, nodes.ListOpts{}).AllPages()
        if err != nil {
                return err

And result is

openstack_ironic_node{console_enabled="false",id="2ab373f4-db7c-4348-87ec-bd6eda8f0aef",maintenance="false",name="node-sl-pca22",power_state="power on",provision_state="inspect failed"} 1
openstack_ironic_node{console_enabled="false",id="9ae2c5a4-22c9-48e2-a255-42a89dc8c567",maintenance="false",name="node-sl-pca23",power_state="power off",provision_state="available"} 1
openstack_ironic_node{console_enabled="false",id="bffe7168-99ee-483a-b149-2c9f53501f70",maintenance="false",name="node-sl-pca334",power_state="power off",provision_state="manageable"} 1
openstack_ironic_node{console_enabled="false",id="fe110a59-0f85-4f1b-8823-bbd634abfae4",maintenance="false",name="node-sl-pca325",power_state="power on",provision_state="active"} 1

I beleive that microversion check should be added to Ironic client (maybe others?)

Current behaviour of console client is to ask for maximum version, get supported version list if maximum is not supported and use best version available.

Tnx!

shotgun-20 added a commit to shotgun-20/openstack-exporter that referenced this issue Nov 5, 2020
shotgun-20 added a commit to shotgun-20/openstack-exporter that referenced this issue Nov 5, 2020
shotgun-20 added a commit to shotgun-20/openstack-exporter that referenced this issue Nov 5, 2020
shotgun-20 added a commit to shotgun-20/openstack-exporter that referenced this issue Nov 5, 2020
shotgun-20 added a commit to shotgun-20/openstack-exporter that referenced this issue Nov 6, 2020
mzijdemans pushed a commit to mzijdemans/openstack-exporter that referenced this issue Dec 27, 2022
* ironic microversion workaround (openstack-exporter#135)

Co-authored-by: Mikhail Sharkov <[email protected]>

* add baremetal resource_class metric

Co-authored-by: Mikhail Sharkov <[email protected]>
Co-authored-by: Jorge Niedbalski <[email protected]>
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

No branches or pull requests

1 participant