Open petrkozorezov opened 3 years ago
I've gotten annoyed a lot by this too, but I think basically this is semi-intentional.
This issue used to not exist, instead on rollback we would run the same activation command on the previous generation as would be used on the newer generation. We chose to replace that behaviour with the current behaviour as sometimes the activation command may change, and assuming that it doesn't is potentially dangerous. I don't remember if the previous functionality is anywhere in this Git history, and can't find the conversations regarding it right now, but deploy (the predecessor of deploy-rs) made that assumption: https://github.com/serokell/deploy/blob/master/deploy.sh#L148-L149.
What I think might be acceptible in this situation is to prefer /deploy-rs-activate
in the previous generation, but if unavailable, fallback to using the one out of the current generation.
What I think might be acceptible in this situation is to prefer /deploy-rs-activate in the previous generation, but if unavailable, fallback to using the one out of the current generation.
As someone who just got bitten migrating a system over to using deploy, this would definitely be nicer.
I'm trying to migrate my deployments to deploy-rs. And for one of my nodes (deployed with nixops) after the first attempt to deploy with deploy-rs something went wrong, network was lost, but magic rollback failed with
ERROR [activate] Error de-activating due to another error waiting for confirmation, oh no...: Failed to run command for re-activating the last generation: No such file or directory (os error 2)
As I understand it because
deploy-rs-activate
is calling in the old profile. https://github.com/serokell/deploy-rs/blob/9e405fbc5ab5bacbd271fd78c6b6b6877c4d9f8d/src/bin/activate.rs#L162I know that it's a corner case, but it's inconvenient.