<div dir="ltr">Cross-posting this from the users list, as I'm hoping to get some developer guidance in order to put together a PR:<div><br></div><div>I've built a Pacemaker cluster with two nodes in an active/passive configuration, with the active node running the Unison service.<div><br></div><div>The service runs continuously with 'watch' enabled, in order to sync files to another region.<div><br></div><div>Both the Unison users's home directory and the sync'd files directory are on shared storage.</div><div><br></div><div>During a failover from one node to another, this process is followed.</div><div><br></div><div>1. Stop Unison service on old node.</div><div>2. Unmount shared storage on old node.</div><div>3. Mount shared storage on new node.</div><div>4. Start Unison service on new node.</div><div><br></div><div>This *mostly* works, but I sometimes get errors when starting Unison on the new node, mostly to do with corrupted archive files ('end of file exception').</div><div><br></div><div>I suspect this is due to the way the Unison service is stopped on the old node, which leaves the archive files in a corrupted state.</div><div><br></div><div>Given that the Unison process is continuously running with 'watch', is there some recommended way to stop it such that the archives on both the sync source and destination are left in a clean state?</div></div></div><div><br></div><div>Over on the user's list, Benjamin suggested that some code could be added to Unison to catch a signal that would then shut it down in an orderly way.</div><div><br></div><div>I don't mind taking a crack at that, but I have zero experience in the Unison code base, so it would be helpful if someone could maybe give me some high-level tips about approach and where to start digging in the code?</div><div><br></div><div>Chad</div></div>