I am a complete SLURM noob (just starting to be interested in this for work), so I apologize if I make erroneous offers, but I think I can point out something is wrong.
The first line in your startup sequence:
mkdir -p /tmp/slurmstate/clustername
, , clustername - .
, ( fopen fgets, . ).
, fopen - , ( ...). , , .
:
rmdir /tmp/slurmstate/clustername
mkdir -p /tmp/slurmstate, slurmstate, , clustername ( !).
clustername , slurm.conf. , slurm.conf, .
PS: , , , ... , , - , , . , ( ) (, , ).