From Fedora Project Wiki
< User:Roshi | QA/AtomicTests
(Created page with "{{QA/Test_Case |description=This testcase ensures it's possible to upgrade an Atomic Host. {{Admon/note|Prerequisite|This testcase assumes you have already ran the [https://fe...") |
(updated for f28) |
||
Line 1: | Line 1: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description=This testcase ensures it's possible to | |description=This testcase ensures it's possible to rollback an Atomic Host. | ||
{{Admon/note|Prerequisite|This testcase assumes you have already ran the [https://fedoraproject.org/wiki/User:Roshi/QA/AtomicTests/Atomic_Upgrade upgrade testcase].}} | {{Admon/note|Prerequisite|This testcase assumes you have already ran the [https://fedoraproject.org/wiki/User:Roshi/QA/AtomicTests/Atomic_Upgrade upgrade testcase].}} | ||
|setup= | |setup= | ||
Line 6: | Line 6: | ||
|actions= | |actions= | ||
# Check to make sure you're on an upgraded host. | # Check to make sure you're on an upgraded host. | ||
# rpm-ostree status | <nowiki> | ||
# 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 | |||
</nowiki> | |||
# Write hash to a file | # Write hash to a file | ||
# cat /ostree/repo/refs/heads/ostree/1/1/0 | <nowiki> | ||
# cat /ostree/repo/refs/heads/ostree/1/1/0 | |||
fe48516d3dc74dead8319521b4f3cddce21d940b42211c6c72ba8f66b0dca8f5 | |||
# cat /ostree/repo/refs/heads/ostree/1/1/0 > /etc/file2 | |||
</nowiki> | |||
# Roll the host back | # Roll the host back | ||
rpm-ostree rollback | <nowiki> | ||
# rpm-ostree rollback | |||
Moving 'ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73.0' to be first deployment | |||
Transaction complete; bootconfig swap: yes deployment count change: 0 | |||
Downgraded: | |||
GeoIP-GeoLite-data 2018.04-1.fc28 -> 2018.02-1.fc28 | |||
NetworkManager 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 | |||
NetworkManager-libnm 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 | |||
NetworkManager-team 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 | |||
audit 2.8.3-2.fc28 -> 2.8.2-4.fc28 | |||
audit-libs 2.8.3-2.fc28 -> 2.8.2-4.fc28 | |||
audit-libs-python2 2.8.3-2.fc28 -> 2.8.2-4.fc28 | |||
audit-libs-python3 2.8.3-2.fc28 -> 2.8.2-4.fc28 | |||
bash 4.4.19-2.fc28 -> 4.4.19-1.fc28 | |||
bash-completion 1:2.7-4.fc28 -> 1:2.7-3.fc28 | |||
bind-export-libs 32:9.11.3-5.fc28 -> 32:9.11.3-2.b1.fc28 | |||
checkpolicy 2.7-7.fc28 -> 2.7-5.fc28 | |||
chrony 3.3-1.fc28 -> 3.2-4.fc28 | |||
cockpit-bridge 164-1.fc28 -> 161-2.fc28 | |||
cockpit-docker 164-1.fc28 -> 161-2.fc28 | |||
cockpit-networkmanager 164-1.fc28 -> 161-2.fc28 | |||
cockpit-ostree 164-1.fc28 -> 161-2.fc28 | |||
cockpit-system 164-1.fc28 -> 161-2.fc28 | |||
container-selinux 2:2.55-1.fc28 -> 2:2.48-1.fc28 | |||
... | |||
</nowiki> | |||
# Reboot the system | # Reboot the system | ||
|results= | |results= | ||
# | # Verify you are booted into the Beta deployment and upgraded deployment is staged | ||
# rpm-ostree status | <nowiki> | ||
# 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 | |||
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 | |||
</nowiki> | |||
# file2 should not exist and file1 should | # file2 should not exist and file1 should | ||
# cat /etc/file1 | <nowiki> | ||
# cat /etc/file1 | |||
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73 | |||
# cat /etc/file2 | |||
cat: /etc/file2: No such file or directory | |||
</nowiki> | |||
# Docker containers should still run | # Docker containers should still run | ||
<nowiki> | |||
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL" | |||
PASS | |||
</nowiki> | |||
}} | }} |
Revision as of 02:46, 11 April 2018
Description
This testcase ensures it's possible to rollback an Atomic Host.
Setup
- Ensure you have a booted working Atomic Host you've upgraded at least once.
How to test
- Check to make sure you're on an upgraded host.
# 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
- Write hash to a file
# cat /ostree/repo/refs/heads/ostree/1/1/0 fe48516d3dc74dead8319521b4f3cddce21d940b42211c6c72ba8f66b0dca8f5 # cat /ostree/repo/refs/heads/ostree/1/1/0 > /etc/file2
- Roll the host back
# rpm-ostree rollback Moving 'ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73.0' to be first deployment Transaction complete; bootconfig swap: yes deployment count change: 0 Downgraded: GeoIP-GeoLite-data 2018.04-1.fc28 -> 2018.02-1.fc28 NetworkManager 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 NetworkManager-libnm 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 NetworkManager-team 1:1.10.6-1.fc28 -> 1:1.10.4-1.fc28 audit 2.8.3-2.fc28 -> 2.8.2-4.fc28 audit-libs 2.8.3-2.fc28 -> 2.8.2-4.fc28 audit-libs-python2 2.8.3-2.fc28 -> 2.8.2-4.fc28 audit-libs-python3 2.8.3-2.fc28 -> 2.8.2-4.fc28 bash 4.4.19-2.fc28 -> 4.4.19-1.fc28 bash-completion 1:2.7-4.fc28 -> 1:2.7-3.fc28 bind-export-libs 32:9.11.3-5.fc28 -> 32:9.11.3-2.b1.fc28 checkpolicy 2.7-7.fc28 -> 2.7-5.fc28 chrony 3.3-1.fc28 -> 3.2-4.fc28 cockpit-bridge 164-1.fc28 -> 161-2.fc28 cockpit-docker 164-1.fc28 -> 161-2.fc28 cockpit-networkmanager 164-1.fc28 -> 161-2.fc28 cockpit-ostree 164-1.fc28 -> 161-2.fc28 cockpit-system 164-1.fc28 -> 161-2.fc28 container-selinux 2:2.55-1.fc28 -> 2:2.48-1.fc28 ...
- Reboot the system
Expected Results
- Verify you are booted into the Beta deployment and upgraded deployment is staged
# 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 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
- file2 should not exist and file1 should
# cat /etc/file1 ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73 # cat /etc/file2 cat: /etc/file2: No such file or directory
- Docker containers should still run
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL" PASS