How to Stop cMix and Validating for Performing Multi-Era Maintenance

Thanks to Keith which answered a Question on Discord.

Start by going to xx network Wallet > Staking > Account actions and press Stop to the right of the stash account.

On the node computer …

$ sudo systemctl stop xxnetwork-cmix 
$ sudo systemctl stop xxnetwork-chain

On the gateway computer …

$ sudo systemctl stop xxnetwork-gateway 
$ sudo systemctl stop xxnetwork-chain

Since maintenance often requires rebooting, you will also want to temporarily disable the services so they do not start again each time you reboot. So additionally run …

On the node computer …

$ sudo systemctl disable xxnetwork-cmix 
$ sudo systemctl disable xxnetwork-chain

On the gateway computer …

$ sudo systemctl disable xxnetwork-gateway 
$ sudo systemctl disable xxnetwork-chain

After you have completed the maintenance …

On the node computer …

$ sudo ln -s /opt/xxnetwork/xxnetwork-cmix.service /etc/systemd/system
$ sudo ln -s /opt/xxnetwork/xxnetwork-chain.service /etc/systemd/system
$ sudo systemctl daemon-reexec
$ sudo systemctl start xxnetwork-chain

On the gateway computer …

$ sudo ln -s /opt/xxnetwork/xxnetwork-gateway.service /etc/systemd/system
$ sudo ln -s /opt/xxnetwork/xxnetwork-chain.service /etc/systemd/system
$ sudo systemctl daemon-reexec
$ sudo systemctl start xxnetwork-chain

Check the chain.log on both computers to see they have completed syncing. You will see Idle and Imported log messages such as …

2022-08-08 17:16:37 💤 Idle (37 peers), best: #3770905 (0x96a3…94d1), finalized #3770902 (0xd3a2…38e5), ⬇ 477.4kiB/s ⬆ 642.0kiB/s    
2022-08-08 17:16:42 💤 Idle (37 peers), best: #3770905 (0x96a3…94d1), finalized #3770903 (0x8aa7…0ed0), ⬇ 243.3kiB/s ⬆ 247.7kiB/s    
2022-08-08 17:16:42 ✨ Imported #3770906 (0x0bf6…4d67)    
2022-08-08 17:16:42 ✨ Imported #3770906 (0x7540…62f7)    
2022-08-08 17:16:47 💤 Idle (37 peers), best: #3770906 (0x0bf6…4d67), finalized #3770904 (0x2acb…d930), ⬇ 315.9kiB/s ⬆ 685.9kiB/s

Once both are synced …
On the node computer …

$ sudo systemctl start xxnetwork-cmix 

On the gateway computer …

$ sudo systemctl start xxnetwork-gateway 

To enable the services to start at boot run …
On the node computer …

$ sudo systemctl enable xxnetwork-cmix 
$ sudo systemctl enable xxnetwork-chain

On the gateway computer …

$ sudo systemctl enable xxnetwork-gateway 
$ sudo systemctl enable xxnetwork-chain

Finally, go to xx network Wallet > Staking > Account actions and press Validate to the right of the stash account. Then wait to be elected.

That clearly won’t work for anyone who setup their services according to the Wiki, because disabling services removes the systemd service file symlink.

Keith fixed that problem, should work now.

No, he hasn’t. It doesn’t work exactly how it’s supposed to not work.

ubuntu@node:~$ sudo systemctl disable xxnetwork-cmix
[sudo] password for ubuntu: 
Removed /etc/systemd/system/xxnetwork-cmix.service.
Removed /etc/systemd/system/multi-user.target.wants/xxnetwork-cmix.service.

ubuntu@node:~$ sudo systemctl enable xxnetwork-cmix
Failed to enable unit: Unit file xxnetwork-cmix.service does not exist.

Yes, I have fixed the procedure. See the changes made to the OP. The changes made to the OP result in the services being enabled. Below is an example using xxnetwork-gateway.service

$ sudo systemctl stop xxnetwork-gateway.service 
$ sudo systemctl disable xxnetwork-gateway.service 
Removed /etc/systemd/system/xxnetwork-gateway.service.
Removed /etc/systemd/system/multi-user.target.wants/xxnetwork-gateway.service.
$ ls /etc/systemd/system | grep xx
$ sudo ln -s /opt/xxnetwork/xxnetwork-gateway.service /etc/systemd/system
$ ls /etc/systemd/system | grep xx
xxnetwork-gateway.service
$ sudo systemctl daemon-reexec 
$ sudo systemctl enable xxnetwork-gateway.service
Created symlink /etc/systemd/system/multi-user.target.wants/xxnetwork-gateway.service → /opt/xxnetwork/xxnetwork-gateway.service.

Oh, I see.

I misunderstood the claim that the procedure was changed elsewhere (which isn’t the case, as the procedure hasn’t changed). Didn’t realize that you actually edited his original post here.