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

Stuck on redfish-username or redfish-password: "invalid config: 'redfish-username' or 'redfish-password'" #216

Closed ethanmye-rs closed 2 months ago

ethanmye-rs commented 3 months ago

Hi, currently running hardware-observer, rev 59. it's deployed under some ceph-osd units, on bare metal machines (Dell R650). Redfish is enabled on the iDRAC interfaces, and I can test the username/password successfully with redfishtool.

I believe this is an issue with parsing, as the original password has a $ in it. Creating a new user without a $ in the password results in a successful authentication (based on debug logs for the unit). When passing the redfish-password config option, I am taking care to escape the $; checking the value with juju config hardware-observer confirms the password is set correctly. Interestingly, the status doesn't change from blocked/idle with "invalid config: 'redfish-username' or 'redfish-password'", despite having a seemingly successful connection from the debug log.

To replicate, just set your user password to include at least a $, although the password also contains other special chars (@)

Example of error from $ password: image

example of successful auth with "simple" password: image

Apologies for the screenshots, I can provide private logs on request.

ethanmye-rs commented 3 months ago

So I can workaround this issue by updating the redfish username and redfish password. The juju debug log shows 201 status codes, so I am logging in sucessfully and it seems to be able to talk to the iDRAC. However, I see "Exporter is not installed properly" in the debug log. Any ideas on how to reinstall this exporter?

chanchiwai-ray commented 2 months ago

So I can workaround this issue by updating the redfish username and redfish password. The juju debug log shows 201 status codes, so I am logging in sucessfully and it seems to be able to talk to the iDRAC. However, I see "Exporter is not installed properly" in the debug log. Any ideas on how to reinstall this exporter?

Can you try refreshing the charm to a newer revision, e.g. latest 69 revision? There was an issue before: if the redfish credentials wasn't correct at the beginning (during installation of the charm, the exporter will not be installed, and that issue should be fixed)

chanchiwai-ray commented 2 months ago

For the issue with "Exporter is not installed properly" after fixing the redfish credential, this was fixed in https://github.com/canonical/hardware-observer-operator/pull/192. Closing this for now, but free feel to reopen / open another issue.