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

fibre channel: symbolic_name attribute is not exposed to sysfs by all drivers #2919

Closed
machine424 opened this issue Feb 8, 2024 · 2 comments · Fixed by #2933
Closed

fibre channel: symbolic_name attribute is not exposed to sysfs by all drivers #2919

machine424 opened this issue Feb 8, 2024 · 2 comments · Fixed by #2933

Comments

@machine424
Copy link
Contributor

Host operating system: output of uname -a

node_exporter version: output of node_exporter --version

node_exporter command line flags

node_exporter log output

Are you running node_exporter in Docker?

What did you do that produced an error?

Used a driver that doesn't set the optional symbolic_name attribute:
Drivers can choose not to expose attributes to sysfs: https://github.com/torvalds/linux/blob/047371968ffc470769f541d6933e262dc7085456/include/scsi/scsi_transport_fc.h#L721-L764

Apart of symbolic_name, other attributes may not be exposed (see link above), we should take that into consideration.

This will need changes at https://github.com/prometheus/procfs/blob/dd493f45ddad658c99c4e58989222082cc0a0a96/sysfs/class_fibrechannel.go#L92-L134

What did you expect to see?

node_fibrechannel_info exposed without the non existing attributes (set them to empty string).
the others netrics exposed.

What did you see instead?

The collector fails with:

caller=collector.go:169 level=error msg="collector failed" name=fibrechannel duration_seconds=0.000490402 err="error obtaining FibreChannel class info: failed to read file \"/host/sys/class/fc_host/host0/symbolic_name\": open /host/sys/class/fc_host/host0/symbolic_name: no such file or directory"
@discordianfish
Copy link
Member

@machine424 Good find! Want to take a stab at fixing this? Should be straight forward to set this to "" or "N/A" if it doesn't exist

@machine424
Copy link
Contributor Author

sure, I'll give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants