From Fedora Project Wiki
(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 upgrade an Atomic Host.
|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>
  TIMESTAMP (UTC)        ID            OSNAME                REFSPEC                                               
# rpm-ostree status
* 2014-11-13 10:52:06    18e02c4166    fedora-atomic-host    fedora-atomic:fedora-atomic/f21/x86_64/docker-host    
State: idle; auto updates disabled
  2014-11-12 22:28:04    1877f1fa64    fedora-atomic-host    fedora-atomic:fedora-atomic/f21/x86_64/docker-host   
Deployments:
#
● ostree://fedora-atomic:fedora/28/x86_64/atomic-host
# ostree admin status
                  Version: 28.20180409.n.0 (2018-04-09 12:54:10)
* fedora-atomic-host 18e02c41666ef5f426bc43d01c4ce1b7ffc0611e993876cf332600e2ad8aa7c0.0
                    Commit: fe48516d3dc74dead8319521b4f3cddce21d940b42211c6c72ba8f66b0dca8f5
    origin refspec: fedora-atomic:fedora-atomic/f21/x86_64/docker-host
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
  fedora-atomic-host 1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84.0
 
    origin refspec: fedora-atomic:fedora-atomic/f21/x86_64/docker-host
  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>
18e02c41666ef5f426bc43d01c4ce1b7ffc0611e993876cf332600e2ad8aa7c0
# cat /ostree/repo/refs/heads/ostree/1/1/0
#
fe48516d3dc74dead8319521b4f3cddce21d940b42211c6c72ba8f66b0dca8f5
# cat /ostree/repo/refs/heads/ostree/1/1/0 > /etc/file2
# 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=
# Status should be reverted
# Verify you are booted into the Beta deployment and upgraded deployment is staged
  # rpm-ostree status
  <nowiki>
  TIMESTAMP (UTC)        ID            OSNAME                REFSPEC                                               
# rpm-ostree status
* 2014-11-12 22:28:04    1877f1fa64    fedora-atomic-host    fedora-atomic:fedora-atomic/f21/x86_64/docker-host    
State: idle; auto updates disabled
  2014-11-13 10:52:06    18e02c4166    fedora-atomic-host    fedora-atomic:fedora-atomic/f21/x86_64/docker-host
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>
1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84
# cat /etc/file1
# cat /etc/file2
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
cat: /etc/file2: No such file or directory
# 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 busybox true && echo "PASS" || echo "FAIL"
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL"
# PASS
PASS
</nowiki>
}}
}}

Revision as of 02:46, 11 April 2018

Description

This testcase ensures it's possible to rollback an Atomic Host.

Note.png
Prerequisite
This testcase assumes you have already ran the upgrade testcase.

Setup

  1. Ensure you have a booted working Atomic Host you've upgraded at least once.

How to test

  1. 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

  1. 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

  1. 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
...

  1. Reboot the system

Expected Results

  1. 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

  1. file2 should not exist and file1 should
# cat /etc/file1
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
# cat /etc/file2
cat: /etc/file2: No such file or directory

  1. Docker containers should still run
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL"
PASS