canonical / hardware-observer-operator

A charm to setup prometheus exporter for IPMI, RedFish and RAID devices from different vendors.
Apache License 2.0
7 stars 14 forks source link

Exporter installation failure status will be wiped on update event #252

Closed dashmage closed 1 month ago

dashmage commented 1 month ago

If one of the exporters fail to install as part of the install event handler, then the charm is set to BlockedStatus. However, when the update status event handler runs after that, we clear away this message that the exporter failed to install.

jneo8 commented 1 month ago

Any reason why it's failing in the install part?

dashmage commented 1 month ago

Not 100% sure currently. But we do have another issue open to track this

dashmage commented 1 month ago

After digging into this a bit more, it looks like we use the _stored.resource_installed flag to track both if a resource installation fails or if an exporter install fails. So technically, my original issue is incorrect since the charm will go into blocked state but the behaviour is a bit confusing due to the usage of the same variable to track the state in both situations.

If the exporter install is failing, we're setting the resource_installed state to False which doesn't make sense. We should independently verify this by checking the exporter health in the update status event handler.