Read access to /sys/class/infiniband_mad

NHC (LBNL Node Health Check) is an application used to check the health of systems/compute nodes.

Among many other things, NHC can check the status of InfiniBand hardware. One check NHC performs is against the actual version of the InfiniBand userland libs.

Unfortunately, there is not currently a way for a Snap to access the path /sys/class/infiniband_mad/abi_version and thus, the check fails.

Since NHC can be configured to perform lots of different hardware checks, it might make sense to run it in classic mode though that would be a topic for another post.

Is it worthwhile to create a bug to give Snaps access to /sys/class/infiniband_mad?

1 Like

Pinging @jdstrand & @pedronis for thoughts on this.

No need to file a bug; I’ve captured this for the next batch of policy updates. It should be in 2.45.

2 Likes

When investigating this, it seems that this rule from hardware-observe should work for you:

/sys/{block,bus,class,devices,firmware}/{,**} r,

Can you make sure that your snap plugs hardware-observe and that the interface is connected? (You will have to use snap connect <your snap name>:hardware-observe after installing; see snap connections <your snap name> for status).

Yep that worked. Must have missed this somehow in my testing. Thanks!

1 Like