Prevent calling fenced multiple times on TrueNAS HA systems
This only effects TrueNAS HA appliances. Diagnosing another problem unrelated, I discovered that calling fenced multiple times on the same system can cause the box to panic.
This is because once the process is daemonized, it will make a check
if (saved_key == disk.ourkey):means that if the stamp that is queued to be placed on the disk matches the key that has already been placed on the disk, it will panic the box.
The simple solution here is to add logic to carp-state-change-hook.py to create a "lock" file that fenced will reference and make sure doesn't already exist before starting. The reason why it should be in carp-state-change-hook.py is that is the only place that calls fenced.
#3 Updated by Caleb St. John almost 2 years ago
- Status changed from In Progress to Ready for Testing
- Needs Merging changed from Yes to No
1. ssh into active controller
2. type in "fenced" at the CLI
3. check /var/log/messages for verbiage like "Oct 30 14:38:33 tn02-b [fenced:121] fenced is already running. exiting"