From Fedora Project Wiki
mNo edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=This testcase ensures it's possible to use package layering features of rpm-ostree
|description=This testcase ensures it's possible to use package layering features of rpm-ostree
{{Admon/note|Prerequisite|This testcase assumes you have already ran the [https://fedoraproject.org/wiki/User:Roshi/QA/AtomicTests/Atomic_Image_Boots boot testcase].}}
|setup=
|setup=
# Ensure you have a booted working Atomic Host
# Ensure you have a booted Fedora IoT image
|actions=
|actions=
# Install the 'wget' package
# Install the 'wget' package
Line 53: Line 52:
  <nowiki>
  <nowiki>
# rpm-ostree install httpd
# rpm-ostree install httpd
Checking out tree ba63713... done
Checking out tree 7130f87... done
Enabled rpm-md repositories: updates-testing updates fedora
...
rpm-md repo 'updates-testing' (cached); generated: 2018-04-10 22:36:28
Downloading from 'fedora'... done
rpm-md repo 'updates' (cached); generated: 2018-02-20 19:18:14
Downloading from 'updates-testing'... done
rpm-md repo 'fedora' (cached); generated: 2018-04-09 12:06:38
Importing packages... done
 
Checking out packages... done
Importing metadata [=============] 100%
Running pre scripts... done
Resolving dependencies... done
Running post scripts... done
Will download: 9 packages (2.3 MB)
Running posttrans scripts... done
 
  Downloading from fedora: [=============] 100%
 
  Downloading from updates-testing: [=============] 100%
 
Importing (9/9) [=============] 100%
Applying 10 overlays
 
Building filesystem (10/10) [=============] 100%
Running pre scripts... 1 done
Running post scripts... 10 done
Writing rpmdb... done
Writing rpmdb... done
Writing OSTree commit... done
Writing OSTree commit... done
Copying /etc changes: 21 modified, 0 removed, 71 added
Staging deployment... done
Transaction complete; bootconfig swap: no deployment count change: 0
Added:
Added:
   apr-1.6.3-5.fc28.x86_64
   apr-1.7.0-3.fc32.x86_64
   apr-util-1.6.1-5.fc28.x86_64
  apr-util-1.6.1-12.fc32.x86_64
   brotli-1.0.1-3.fc28.x86_64
   apr-util-bdb-1.6.1-12.fc32.x86_64
   fedora-logos-httpd-28.0.2-3.fc28.noarch
   apr-util-openssl-1.6.1-12.fc32.x86_64
   httpd-2.4.33-2.fc28.x86_64
   fedora-logos-httpd-30.0.2-4.fc32.noarch
   httpd-filesystem-2.4.33-2.fc28.noarch
   httpd-2.4.43-1.fc32.x86_64
   httpd-tools-2.4.33-2.fc28.x86_64
   httpd-filesystem-2.4.43-1.fc32.noarch
   mailcap-2.1.48-3.fc28.noarch
   httpd-tools-2.4.43-1.fc32.x86_64
   mod_http2-1.10.16-1.fc28.x86_64
   mailcap-2.1.48-7.fc32.noarch
   mod_http2-1.15.5-1.fc32.x86_64
Run "systemctl reboot" to start a reboot
Run "systemctl reboot" to start a reboot
</nowiki>
</nowiki>
Line 93: Line 81:
  <nowiki>
  <nowiki>
# rpm-ostree status
# rpm-ostree status
State: idle; auto updates disabled
State: idle
AutomaticUpdates: disabled
Deployments:
Deployments:
ostree://fedora-atomic:fedora/28/x86_64/atomic-host
* ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 28_Beta.1.3 (2018-03-28 22:24:38)
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                 BaseCommit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
                 BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
               GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
               GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: httpd wget
           LayeredPackages: httpd wget


   ostree://fedora-atomic:fedora/28/x86_64/atomic-host
   ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 28_Beta.1.3 (2018-03-28 22:24:38)
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                 BaseCommit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
                 BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
               GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
               GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: wget
           LayeredPackages: wget
# rpm -q wget
# rpm -q wget
wget-1.19.4-2.fc28.x86_64
wget-1.20.3-4.fc32.x86_64
# rpm -q httpd
# rpm -q httpd
httpd-2.4.33-2.fc28.x86_64
httpd-2.4.43-1.fc32.x86_64
# rpm -q apr
# rpm -q apr
apr-1.6.3-5.fc28.x86_64
apr-1.7.0-3.fc32.x86_64
</nowiki>
</nowiki>
# Verify that you can start the 'httpd' service and connect to the server
# Verify that you can start the 'httpd' service and connect to the server
Line 118: Line 107:
# systemctl status httpd
# systemctl status httpd
● httpd.service - The Apache HTTP Server
● httpd.service - The Apache HTTP Server
  Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Active: active (running) since Wed 2018-04-11 02:59:48 UTC; 3s ago
    Active: active (running) since Wed 2020-04-08 15:36:17 CDT; 4s ago
    Docs: man:httpd.service(8)
      Docs: man:httpd.service(8)
Main PID: 1778 (httpd)
  Main PID: 2333 (httpd)
  Status: "Processing requests..."
    Status: "Processing requests..."
    Tasks: 213 (limit: 2324)
      Tasks: 213 (limit: 9245)
  Memory: 21.6M
    Memory: 20.1M
  CGroup: /system.slice/httpd.service
        CPU: 172ms
          ├─1778 /usr/sbin/httpd -DFOREGROUND
    CGroup: /system.slice/httpd.service
          ├─1779 /usr/sbin/httpd -DFOREGROUND
            ├─2333 /usr/sbin/httpd -DFOREGROUND
          ├─1780 /usr/sbin/httpd -DFOREGROUND
            ├─2334 /usr/sbin/httpd -DFOREGROUND
          ├─1781 /usr/sbin/httpd -DFOREGROUND
            ├─2335 /usr/sbin/httpd -DFOREGROUND
          └─1782 /usr/sbin/httpd -DFOREGROUND
            ├─2336 /usr/sbin/httpd -DFOREGROUND
            └─2337 /usr/sbin/httpd -DFOREGROUND
 
Apr 08 15:36:17 fitlet2 systemd[1]: Starting The Apache HTTP Server...
Apr 08 15:36:17 fitlet2 httpd[2333]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 19>
Apr 08 15:36:17 fitlet2 systemd[1]: Started The Apache HTTP Server.
 


Apr 11 02:59:48 atomichost-by-dustymabe systemd[1]: Starting The Apache HTTP Server...
Apr 11 02:59:48 atomichost-by-dustymabe httpd[1778]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.124.20. Set the 'ServerName' directive globally to suppr>
Apr 11 02:59:48 atomichost-by-dustymabe systemd[1]: Started The Apache HTTP Server.
# curl http://localhost                                                   
# curl http://localhost                                                   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">         
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">         
Line 143: Line 135:
...
...
</nowiki>
</nowiki>
Enable the httpd service to start at boot and reboot the system.
systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
systemctl reboot
Log back into the system and make sure the httpd service is running.
systemctl status httpd
● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2020-04-08 15:39:44 CDT; 5s ago
      Docs: man:httpd.service(8)
  Main PID: 1251 (httpd)
    Status: "Processing requests..."
      Tasks: 213 (limit: 9245)
...   
# Uninstall 'wget' and 'httpd'
# Uninstall 'wget' and 'httpd'
  <nowiki>
  <nowiki>
# rpm-ostree uninstall wget httpd
# rpm-ostree uninstall wget httpd
Checking out tree ba63713... done
Staging deployment... done
Copying /etc changes: 21 modified, 0 removed, 73 added
Transaction complete; bootconfig swap: no deployment count change: 0
Removed:
Removed:
   apr-1.6.3-5.fc28.x86_64
   apr-1.7.0-3.fc32.x86_64
   apr-util-1.6.1-5.fc28.x86_64
  apr-util-1.6.1-12.fc32.x86_64
   brotli-1.0.1-3.fc28.x86_64
   apr-util-bdb-1.6.1-12.fc32.x86_64
   fedora-logos-httpd-28.0.2-3.fc28.noarch
   apr-util-openssl-1.6.1-12.fc32.x86_64
   httpd-2.4.33-2.fc28.x86_64
   fedora-logos-httpd-30.0.2-4.fc32.noarch
   httpd-filesystem-2.4.33-2.fc28.noarch
   httpd-2.4.43-1.fc32.x86_64
   httpd-tools-2.4.33-2.fc28.x86_64
   httpd-filesystem-2.4.43-1.fc32.noarch
   mailcap-2.1.48-3.fc28.noarch
   httpd-tools-2.4.43-1.fc32.x86_64
   mod_http2-1.10.16-1.fc28.x86_64
   mailcap-2.1.48-7.fc32.noarch
   wget-1.19.4-2.fc28.x86_64
   mod_http2-1.15.5-1.fc32.x86_64
   wget-1.20.3-4.fc32.x86_64
Run "systemctl reboot" to start a reboot
Run "systemctl reboot" to start a reboot
</nowiki>
</nowiki>
Line 166: Line 174:
  <nowiki>
  <nowiki>
# rpm-ostree status
# rpm-ostree status
State: idle; auto updates disabled
State: idle
AutomaticUpdates: disabled
Deployments:
Deployments:
ostree://fedora-atomic:fedora/28/x86_64/atomic-host
* ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 28_Beta.1.3 (2018-03-28 22:24:38)
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                     Commit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
                     Commit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
               GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
               GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0


   ostree://fedora-atomic:fedora/28/x86_64/atomic-host
   ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 28_Beta.1.3 (2018-03-28 22:24:38)
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                 BaseCommit: ba6371389226223fb8ba055fb02b92febf4d00e1ccd435cc21cba6af19088c73
                 BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
               GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
               GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: httpd wget
           LayeredPackages: httpd wget
# rpm -q wget  
# rpm -q wget  

Latest revision as of 18:38, 14 April 2020

Description

This testcase ensures it's possible to use package layering features of rpm-ostree

Setup

  1. Ensure you have a booted Fedora IoT image

How to test

  1. Install the 'wget' package
# rpm-ostree install wget
Checking out tree 7130f87... done
...
Resolving dependencies... done
Will download: 1 package (815.9?kB)
Downloading from 'updates-testing'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Added:
  wget-1.20.3-4.fc32.x86_64
Run "systemctl reboot" to start a reboot

  1. Reboot the system
  2. Verify that the 'wget' package is layered succesfully and usable
 rpm-ostree status                               
* ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: wget

  ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                    Commit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0

# rpm -q wget                        
wget-1.20.3-4.fc32.x86_64
# wget --version
GNU Wget 1.20.3 built on linux-gnu.

-cares +digest +gpgme +https +ipv6 +iri +large-file +metalink +nls 
+ntlm +opie +psl +ssl/gnutls 
...

  1. Install 'httpd' which pulls in multiple dependencies
# rpm-ostree install httpd
Checking out tree 7130f87... done
...
Downloading from 'fedora'... done
Downloading from 'updates-testing'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Added:
  apr-1.7.0-3.fc32.x86_64
  apr-util-1.6.1-12.fc32.x86_64
  apr-util-bdb-1.6.1-12.fc32.x86_64
  apr-util-openssl-1.6.1-12.fc32.x86_64
  fedora-logos-httpd-30.0.2-4.fc32.noarch
  httpd-2.4.43-1.fc32.x86_64
  httpd-filesystem-2.4.43-1.fc32.noarch
  httpd-tools-2.4.43-1.fc32.x86_64
  mailcap-2.1.48-7.fc32.noarch
  mod_http2-1.15.5-1.fc32.x86_64
Run "systemctl reboot" to start a reboot

  1. Reboot host
  2. Verify that 'wget' is still layered and 'httpd' is also layered with dependencies
# rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
* ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: httpd wget

  ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: wget
# rpm -q wget
wget-1.20.3-4.fc32.x86_64
# rpm -q httpd
httpd-2.4.43-1.fc32.x86_64
# rpm -q apr
apr-1.7.0-3.fc32.x86_64

  1. Verify that you can start the 'httpd' service and connect to the server
# systemctl start httpd
# systemctl status httpd
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
     Active: active (running) since Wed 2020-04-08 15:36:17 CDT; 4s ago
       Docs: man:httpd.service(8)
   Main PID: 2333 (httpd)
     Status: "Processing requests..."
      Tasks: 213 (limit: 9245)
     Memory: 20.1M
        CPU: 172ms
     CGroup: /system.slice/httpd.service
             ├─2333 /usr/sbin/httpd -DFOREGROUND
             ├─2334 /usr/sbin/httpd -DFOREGROUND
             ├─2335 /usr/sbin/httpd -DFOREGROUND
             ├─2336 /usr/sbin/httpd -DFOREGROUND
             └─2337 /usr/sbin/httpd -DFOREGROUND

Apr 08 15:36:17 fitlet2 systemd[1]: Starting The Apache HTTP Server...
Apr 08 15:36:17 fitlet2 httpd[2333]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 19>
Apr 08 15:36:17 fitlet2 systemd[1]: Started The Apache HTTP Server.


# curl http://localhost                                                  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">        
                                                                       
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">                                                                                                                                                
        <head>                                   
                <title>Test Page for the Apache HTTP Server on Fedora</title>                                                                                                                                                      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />              
...

Enable the httpd service to start at boot and reboot the system.

systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
systemctl reboot

Log back into the system and make sure the httpd service is running.

systemctl status httpd

● httpd.service - The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2020-04-08 15:39:44 CDT; 5s ago
      Docs: man:httpd.service(8)
  Main PID: 1251 (httpd)
    Status: "Processing requests..."
     Tasks: 213 (limit: 9245)

...

  1. Uninstall 'wget' and 'httpd'
# rpm-ostree uninstall wget httpd
Staging deployment... done
Removed:
  apr-1.7.0-3.fc32.x86_64
  apr-util-1.6.1-12.fc32.x86_64
  apr-util-bdb-1.6.1-12.fc32.x86_64
  apr-util-openssl-1.6.1-12.fc32.x86_64
  fedora-logos-httpd-30.0.2-4.fc32.noarch
  httpd-2.4.43-1.fc32.x86_64
  httpd-filesystem-2.4.43-1.fc32.noarch
  httpd-tools-2.4.43-1.fc32.x86_64
  mailcap-2.1.48-7.fc32.noarch
  mod_http2-1.15.5-1.fc32.x86_64
  wget-1.20.3-4.fc32.x86_64
Run "systemctl reboot" to start a reboot

  1. Reboot host
  2. Verify that 'wget' and 'httpd' are no longer layered and cannot be used
# rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
* ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                    Commit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0

  ostree://fedora-iot:fedora/devel/x86_64/iot
                   Version: 32.20200408.0 (2020-04-08T11:07:02Z)
                BaseCommit: 7130f8716204842f0959498b2e86ef06d6e2a7dc5be036c9c84a4f28e1bca990
              GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
           LayeredPackages: httpd wget
# rpm -q wget 
package wget is not installed
# rpm -q httpd
package httpd is not installed
# wget --version
bash: wget: command not found
# systemctl status httpd
Unit httpd.service could not be found.

Expected Results

  1. Verify that all layering operations were successful