ostree icon indicating copy to clipboard operation
ostree copied to clipboard

Add `ostree admin rollback`

Open mwleeds opened this issue 6 years ago • 5 comments

After running ostree admin unlock --hotfix you are left with two deployments, the unlocked one and the locked one, the latter of which is labeled "(rollback)" in the ostree admin status output. But it's unclear how to deploy the rollback one. The man page for ostree admin deploy says it takes a refspec but the only difference between the two deployments is the deployment index.

mwleeds avatar Jan 29 '19 23:01 mwleeds

Do you want to deploy a new copy of the rollback (new etc merge), or actually put back the rollback as the default? (Related: I forgot that ostree admin doesn't have rollback like in RPM-OSTree). The former is just ostree admin deploy $REFSPEC, right?

jlebon avatar Jan 30 '19 16:01 jlebon

Do you want to deploy a new copy of the rollback (new etc merge), or actually put back the rollback as the default? (Related: I forgot that ostree admin doesn't have rollback like in RPM-OSTree). The former is just ostree admin deploy $REFSPEC, right?

In this case the latter is what I wanted, to go back to the state before the hotfix. I suppose ostree admin deploy $REFSPEC would work as long as $REFSPEC still points to the same commit and that command doesn't check for updates. I would think there would be a more direct way though.

mwleeds avatar Jan 30 '19 20:01 mwleeds

Yeah, seems like we're missing something analogous to rpm-ostree rollback.

jlebon avatar Jan 31 '19 14:01 jlebon

Related: #380. Though that one is in the context of automatic rollbacks.

jlebon avatar Jan 31 '19 14:01 jlebon

Is there a way to do this without a reboot?

Use case: Create a deployment with sudo ostree admin unlock --hotfix and then remove it without rebooting

sudo ostree admin status | grep '(rollback)$'

westurner avatar Apr 17 '24 00:04 westurner