From Fedora Project Wiki

(adjust associated_release_criterion template invocation)
(fix links)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:


{{QA/Test_Case
{{QA/Test_Case
|description=This test will verify that anaconda can download and apply a {{filename|updates.img}} that is inside the remote installation source without extra input from the user. For help preparing {{filename|updates.img}}, see [[Anaconda/Updates]]
|description=This test will verify that anaconda can download and apply a {{filename|updates.img}} that is inside the remote installation source without extra input from the user.
|setup=
|setup=
# Prepare a local installation source by mirroring an existing online source. You can either mirror a whole repository for Fedora Branched, or you can mirror just a single test compose.
# Prepare a local installation source by mirroring {{filename|Server/<arch>/os/}} directory from the test compose in question.
#* When mirroring the whole Fedora Branched repository, mirror {{filename|/pub/fedora/linux/development/{{FedoraVersionNumber|next}}/<arch>/os/}} directory from one of the [http://mirrors.fedoraproject.org/ official mirrors]. This amounts to dozens of GBs of space, but you will be able to use a standard {{filename|netinst.iso}}/{{filename|DVD.iso}}/{{filename|Live.iso}} with it.
#* You can choose to exclude {{filename|Packages/}} and {{filename|repo*/}} subdirectories. In that case it won't work as a proper repository and you'll need to instruct anaconda to use this location just for fetching its stage2 image. The command would be something like this: {{#tag:pre|$ rsync -avzP --exclude '/Packages/' --exclude '/repo*/' --exclude '/isolinux/' --exclude '**/boot.iso' rsync://dl.phx2.fedoraproject.org/fedora-alt/stage/{{FedoraVersionNumber|next}}_TC1/Server/x86_64/os/ mysource}}
#* When mirroring a single test compose, mirror {{filename|/Fedora/<arch>/os/}} directory from the compose. This is just hundreds of MBs, but you will need to use direct kernel boot (PXE or a kernel boot in a virtual machine) to test it.
#* Alternatively, you can extract Server DVD image and receive all needed files including a proper package repository (sufficient for a default installation). When extracting it, be careful that some tools might truncate long file names (the safest way is to mount it). When copying files to a different location, be sure to copy also all hidden files as well (there is {{filename|.treeinfo}} and {{filename|.discinfo}} in the root directory).
# Make the installation source accessible over one of the supported network protocols (HTTP, FTP, NFS).
# Make the installation source accessible over one of the supported network protocols (HTTP, FTP, NFS).
# Prepare a valid {{filename|updates.img}} file. See [[Anaconda/Updates#create-images|this page]] for image creation instructions. A good thing to change in the {{filename|updates.img}} is the "What language would you like to use during the installation process?" text in {{filename|pyanaconda/ui/gui/spokes/welcome.glade}}, as this text is displayed on one of the first screens.
# Prepare a valid {{filename|updates.img}} file. There is an {{filename|updates.img}} prepared for you in [[QA:Testcase Anaconda updates.img via URL|this test case]]. You can use it and follow the same steps to verify that it is applied. If it doesn't work or you want to use a different one, see [[Anaconda/Updates#create-images|this page]] for image creation instructions, and prepare your own file. A good thing to change in the image is the ''What language would you like to use during the installation process?'' text in {{filename|pyanaconda/ui/gui/spokes/welcome.glade}}, as this text is displayed on one of the first screens.
# Copy the {{filename|updates.img}} into the {{filename|images/}} directory of your local installation source
# Copy the {{filename|updates.img}} into the {{filename|images/}} directory of your local installation source. The file needs to be named {{filename|updates.img}}, nothing else is recognized.
# Set up a PXE server or configure your VM to boot the kernel pair directly, see [[QA:Testcase_Boot_Methods_Pxeboot]]. You have mirrored {{filename|vmlinuz}} and {{filename|initrd.img}} earlier, they are in {{filename|images/pxeboot/}}.
|actions=
|actions=
# Boot the installer using the <code>inst.stage2=</code> option at boot directing to the modified installation source where the {{filename|updates.img}} was published. See [[Anaconda/Options]] for information on supported boot options.
# Boot the installer using PXE boot with the <code>inst.repo=</code> option at boot directed to the modified installation source where the {{filename|updates.img}} was published. Example: <pre>inst.repo=http://myserver/mysource/</pre> If you have excluded packages while mirroring the test compose, you need to use <code>inst.stage2=</code> instead. You also need to add <code>inst.repo=</code> option to point to a proper repository (i.e. the official published compose tree).  Example: {{#tag:pre|inst.stage2=http://myserver/mysource/ inst.repo=http://dl.fedoraproject.org/pub/alt/stage/{{FedoraVersionNumber|next}}_TC1/Server/x86_64/os/}} See [[Anaconda/Options]] for information on supported boot options.
#* If you have a full repository mirrored, you can use any boot medium.
# If it's possible, visually identify that the update was applied. If you have used the prepared {{filename|updates.img}} from [[QA:Testcase Anaconda updates.img via URL|this test case]], follow its relevant steps to verify it applied correctly.
#* If you have just a test compose files mirrored, you need to use direct kernel boot (PXE or a kernel boot in a virtual machine). It will use the provided <code>inst.repo</code> as a source of Anaconda's stage2 image and it should also apply {{filename|updates.img}}, if available. The online repositories will then be used as the package source.
# If it's not visually possible to confirm the update was applied (there were just code changes), verify the existence of {{filename|/tmp/updates}} directory, which should contain all updated source code files.
# Proceed with installation
# Proceed with installation
|results=
|results=
# Anaconda prepares the {{filename|updates.img}} and copies its content to {{filename|/tmp/updates/}}. Any changes you included in the updates.img file are applied
# Anaconda downloads the {{filename|updates.img}} and copies its content to {{filename|/tmp/updates/}}. Any changes you included in the updates.img file are applied (image changes, text adjustments, source code changes, etc).
# Anaconda proceeds without related errors
# Anaconda proceeds without related errors
}}
}}


[[Category:Recovery Test Cases]]
[[Category:Recovery Test Cases]]

Latest revision as of 09:02, 22 May 2015

Note.png
Associated release criterion
This test case is associated with the Fedora_40_Final_Release_Criteria#update-image release criterion. If you are doing release validation testing, a failure of this test case may be a breach of that release criterion. If so, please file a bug and nominate it as blocking the appropriate milestone, using the blocker bug nomination page.


Description

This test will verify that anaconda can download and apply a updates.img that is inside the remote installation source without extra input from the user.

Setup

  1. Prepare a local installation source by mirroring Server/<arch>/os/ directory from the test compose in question.
    • You can choose to exclude Packages/ and repo*/ subdirectories. In that case it won't work as a proper repository and you'll need to instruct anaconda to use this location just for fetching its stage2 image. The command would be something like this:
      $ rsync -avzP --exclude '/Packages/' --exclude '/repo*/' --exclude '/isolinux/' --exclude '**/boot.iso' rsync://dl.phx2.fedoraproject.org/fedora-alt/stage/40_TC1/Server/x86_64/os/ mysource
    • Alternatively, you can extract Server DVD image and receive all needed files including a proper package repository (sufficient for a default installation). When extracting it, be careful that some tools might truncate long file names (the safest way is to mount it). When copying files to a different location, be sure to copy also all hidden files as well (there is .treeinfo and .discinfo in the root directory).
  2. Make the installation source accessible over one of the supported network protocols (HTTP, FTP, NFS).
  3. Prepare a valid updates.img file. There is an updates.img prepared for you in this test case. You can use it and follow the same steps to verify that it is applied. If it doesn't work or you want to use a different one, see this page for image creation instructions, and prepare your own file. A good thing to change in the image is the What language would you like to use during the installation process? text in pyanaconda/ui/gui/spokes/welcome.glade, as this text is displayed on one of the first screens.
  4. Copy the updates.img into the images/ directory of your local installation source. The file needs to be named updates.img, nothing else is recognized.
  5. Set up a PXE server or configure your VM to boot the kernel pair directly, see QA:Testcase_Boot_Methods_Pxeboot. You have mirrored vmlinuz and initrd.img earlier, they are in images/pxeboot/.

How to test

  1. Boot the installer using PXE boot with the inst.repo= option at boot directed to the modified installation source where the updates.img was published. Example:
    inst.repo=http://myserver/mysource/
    If you have excluded packages while mirroring the test compose, you need to use inst.stage2= instead. You also need to add inst.repo= option to point to a proper repository (i.e. the official published compose tree). Example:
    inst.stage2=http://myserver/mysource/ inst.repo=http://dl.fedoraproject.org/pub/alt/stage/40_TC1/Server/x86_64/os/
    See Anaconda/Options for information on supported boot options.
  2. If it's possible, visually identify that the update was applied. If you have used the prepared updates.img from this test case, follow its relevant steps to verify it applied correctly.
  3. If it's not visually possible to confirm the update was applied (there were just code changes), verify the existence of /tmp/updates directory, which should contain all updated source code files.
  4. Proceed with installation

Expected Results

  1. Anaconda downloads the updates.img and copies its content to /tmp/updates/. Any changes you included in the updates.img file are applied (image changes, text adjustments, source code changes, etc).
  2. Anaconda proceeds without related errors