deploy-rs icon indicating copy to clipboard operation
deploy-rs copied to clipboard

Rollback not working as expected.

Open flopraden opened this issue 4 years ago • 2 comments

Hi,

I was testing the rollback feature and tested when I made mistake with sshd service and networking.

restarting the following units: network-addresses-ens18.service, sshd.service
⭐ ℹ️ [activate] [INFO] Activation succeeded!
⭐ ℹ️ [activate] [INFO] Magic rollback is enabled, setting up confirmation hook...
⭐ ℹ️ [activate] [INFO] Waiting for confirmation event...
setting up /etc...
⭐ ❌ [activate] [ERROR] Error waiting for confirmation event: Timeout elapsed for confirmation
⭐ ⚠️ [activate] [WARN] De-activating due to error
warning: unknown setting 'experimental-features'
switching from generation 19 to 18
⭐ ⚠️ [activate] [WARN] Removing generation by ID 19
warning: unknown setting 'experimental-features'
removing generation 19
⭐ ℹ️ [activate] [INFO] Attempting to re-activate the last generation
warning: unknown setting 'experimental-features'
activating the configuration...
reloading user units for root...
setting up tmpfiles
restarting the following units: network-addresses-ens18.service

As expected, deploy rollback but instead of restarting network & sshd (like the switch profile do), it only restart network.

Testing with only mistake in network or sshd, the rollback works.

Is there somethings I missed?

Best,

flopraden avatar Feb 20 '21 15:02 flopraden

I'm not sure why that could be, deploy-rs doesn't do anything special when it comes to rollbacks either, it just re-activates the older generation, removes your new generation, then runs the activation script for your old (now current) generation. The problem here is likely a bug in NixOS I'm thinking, @balsoft might have a better idea of why this could be?

notgne2 avatar Feb 22 '21 03:02 notgne2

Nope, no idea unfortunately. Intuitively, may this be related to restart limits?

balsoft avatar Feb 24 '21 15:02 balsoft