Created
September 19, 2016 18:25
-
-
Save nzwulfin/91dab312d35e103641b3bebb739da8b0 to your computer and use it in GitHub Desktop.
Manual test: synthetic upgrade and rollback target with ostree commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Set up new branch based on existing tree and deploy | |
sudo ostree commit -b synthetic_test --tree=ref=fedora-atomic:fedora-atomic/24/x86_64/docker-host | tee target_commit.txt | |
sudo ostree admin deploy synthetic_test | |
sudo systemctl reboot | |
atomic host status | |
<active commit == target_commit.txt> | |
## Create a 'noop' commit based on the new branch as an upgrade target | |
sudo ostree commit -b synthetic_test --tree=ref=synthetic_test | tee target_upgrade.txt | |
sudo atomic host upgrade | |
sudo systemctl reboot | |
atomic host status | |
<active commit == target_upgrade.txt> | |
## Rollback to new branch | |
sudo atomic host rollback | |
sudo systemctl reboot | |
atomic host status | |
<active commit == target_commit.txt> |
python synth_setup.py && atomic host status
sudo systemctl reboot
python synth_upgrade.py && atomic host status
sudo systemctl reboot
python synth_rollback.py && atomic host status
sudo systemctl reboot
Tests look sane. I'd add a follow-up check that the commit you rolled back to is indeed what you expect it to be.
Also note that instead of ostree admin deploy, you can use rpm-ostree rebase $ref, which also has a --reboot option. (All the other rpm-ostree commands used here also have a similar --reboot option, which might simplify your life).
I'm rethinking the setup portion to create the new tree, deploy it, create the updated tree, then reboot
This seems to work the way we'll need it to in Tunir
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jlebon, yes that will help a lot for parsing. Will investigate for current
atomic
andrpm-ostree
support for json output. That will also be easier to determine which commit id is booted, etc.