From Fedora Project Wiki
< User:Roshi | QA/AtomicTests
Description
This testcase ensures it's possible to upgrade an Atomic Host.
Setup
- Ensure you have a booted working Atomic Host
How to test
- Check what commit your host is currently at
# rpm-ostree status State: idle; auto updates disabled Deployments: ● ostree://fedora-atomic:fedora/28/x86_64/atomic-host Version: 28_Beta.1.3 (2018-03-28 22:24:38) Commit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73 GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
- As a privileged user (i.e. 'root'), save hash to a file (to refer to in the User:Roshi/QA/AtomicTests/Atomic_Rollback testcase)
# cat /ostree/repo/refs/heads/ostree/0/1/0 ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73 # cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1
- Run the upgrade
# rpm-ostree upgrade 1434 metadata, 7505 content objects fetched; 238483 KiB transferred in 131 seconds Copying /etc changes: 21 modified, 0 removed, 64 added Transaction complete; bootconfig swap: yes deployment count change: 1 Upgraded: GeoIP-GeoLite-data 2018.02-1.fc28 -> 2018.04-1.fc28 NetworkManager 1:1.10.4-1.fc28 -> 1:1.10.6-1.fc28 NetworkManager-libnm 1:1.10.4-1.fc28 -> 1:1.10.6-1.fc28 NetworkManager-team 1:1.10.4-1.fc28 -> 1:1.10.6-1.fc28 audit 2.8.2-4.fc28 -> 2.8.3-2.fc28 audit-libs 2.8.2-4.fc28 -> 2.8.3-2.fc28 audit-libs-python2 2.8.2-4.fc28 -> 2.8.3-2.fc28 audit-libs-python3 2.8.2-4.fc28 -> 2.8.3-2.fc28 bash 4.4.19-1.fc28 -> 4.4.19-2.fc28 bash-completion 1:2.7-3.fc28 -> 1:2.7-4.fc28 bind-export-libs 32:9.11.3-2.b1.fc28 -> 32:9.11.3-5.fc28 checkpolicy 2.7-5.fc28 -> 2.7-7.fc28 chrony 3.2-4.fc28 -> 3.3-1.fc28 cockpit-bridge 161-2.fc28 -> 164-1.fc28 cockpit-docker 161-2.fc28 -> 164-1.fc28 cockpit-networkmanager 161-2.fc28 -> 164-1.fc28 container-selinux 2:2.48-1.fc28 -> 2:2.55-1.fc28 ...
- Reboot the Host
- Verify you are booted into the new commit (output should look similar):
# rpm-ostree status State: idle; auto updates disabled Deployments: ● ostree://fedora-atomic:fedora/28/x86_64/atomic-host Version: 28.20180409.n.0 (2018-04-09 12:54:10) Commit: fe48516d3dc74dead8319521b4f3cddce21d940b42211c6c72ba8f66b0dca8f5 GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1 ostree://fedora-atomic:fedora/28/x86_64/atomic-host Version: 28_Beta.1.3 (2018-03-28 22:24:38) Commit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73 GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
- Verify original hash in /etc/file1 is still there
# cat /etc/file1 ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
- After reboot - test docker
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL" PASS
Expected Results
- Upgrade succeeds
- docker outputs PASS when ran