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...")
 
(update for f28)
Line 6: Line 6:
|actions=
|actions=
# Check what commit your host is currently at
# Check what commit your host is currently at
  # 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
#
Deployments:
# ostree admin status
● ostree://fedora-atomic:fedora/28/x86_64/atomic-host
* fedora-atomic-host 1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84.0
                  Version: 28_Beta.1.3 (2018-03-28 22:24:38)
    origin refspec: fedora-atomic:fedora-atomic/f21/x86_64/docker-host
                    Commit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
</nowiki>
# Save hash to a file (to refer to in the [[User:Roshi/QA/AtomicTests/Atomic_Rollback]] testcase)
# 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
  <nowiki>
1877f1fa64be8bec8adcd43de6bd4b5c39849ec7842c07a6d4c2c2033651cd84
# cat /ostree/repo/refs/heads/ostree/0/1/0  
#
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
# cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1
# cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1
</nowiki>
# Run the upgrade
# Run the upgrade
  rpm-ostree upgrade
  <nowiki>
# 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
...
</nowiki>
# Reboot the Host
# Reboot the Host
# Verify you are booted into the new commit (output should look similar):
<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>
# Verify original hash in /etc/file1 is still there
<nowiki>
# cat /etc/file1
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
</nowiki>
# After reboot - test docker
# After reboot - test docker
  docker run -it --rm busybox true && echo "PASS" || echo "FAIL"
<nowiki>
# docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL"
PASS
</nowiki>
|results=
|results=
# Upgrade succeeds
# Upgrade succeeds
# docker outputs PASS when ran
# docker outputs PASS when ran
}}
}}

Revision as of 02:40, 11 April 2018

Description

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

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

Setup

  1. Ensure you have a booted working Atomic Host

How to test

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

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

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

  1. Reboot the Host
  2. 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


  1. Verify original hash in /etc/file1 is still there
# cat /etc/file1
ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73

  1. After reboot - test docker
#  docker run -it --rm docker.io/busybox true && echo "PASS" || echo "FAIL"
PASS

Expected Results

  1. Upgrade succeeds
  2. docker outputs PASS when ran