mej / nhc

LBNL Node Health Check
Other
226 stars 79 forks source link

Existence of DEBUG variable sets debugging for at least "check_cmd_output" test; any workaround? #74

Open novosirj opened 5 years ago

novosirj commented 5 years ago

Hi there. Running NHC 1.4.2.

For the GPFS-related "mm" commands (eg. mmgetstate, which is what we're looking at), the mere existence of a DEBUG variable turns on debugging, meaning a whole mess of junk is logged in NHC (making the nhc.log very large and a whole lot less useful). Any idea of a possible workaround? I tried DEBUG=0 /usr/lpp/mmfs/bin/mmgetstate, but no good there.

mej commented 5 years ago

At the end of nhcmain_finalize_env(), you'll see an export line that includes the DEBUG variable. Try removing DEBUG from that line. See if that helps.

mej commented 3 years ago

I plan to address this issue by renaming the variable to ${NHC_DEBUG} instead of just ${DEBUG}. Since that is a breaking change, it will have to go into the 1.5 tree.

For NHC 1.4.x, as a workaround, removing the export flag for the ${DEBUG} variable should do the trick. Alternatively, you could definitely make the aforementioned breaking change yourself (i.e., sed -i -e s/DEBUG/NHC_DEBUG/g' nhc) if you wanted to get ahead of that (which will be happening for 1.5 regardless anyway...). :-)