Ticket #107 (new task)

Opened 7 years ago

Last modified 6 years ago

Auto install python test (modeled similarly to install.py)

Reported by: liam Owned by:
Priority: major Milestone: Automate installation test plan
Component: tests Keywords:
Cc: jlaska,rhe, mgracik Blocked By:


write a python test (modeled similarly to install.py) that takes as input:

  • a URL to a kickstart file (URL can be local (e.g. file://) or remote (e.g. http://, ftp://, nfs:// ...) ... but start with easy case first.
  • a URL for the install media (again, keep this simple for now and

assume file:///var/lib/libvirt/images/Fedora-12-x86_64-DVD.iso)

  • a URL to a configuration file that describes the environment -

again, perhaps optional for now. But eventually we'll need something that tells the test to create a guest with 4 NICs vs 1 NIC, 3 SCSI drives etc... Don't worry about being fancy at first ... just take the defaults. This is just where I might see it headed in 6+ months. Copy from the kvm autotest project if you like.

At beginning, we focus on the basics and something that gets things far enough along so we can review, adjust and repeat.

Change History

comment:1 Changed 7 years ago by jlaska

  • Milestone set to Automate installation test plan

comment:3 Changed 7 years ago by liam

jlaska mentioned that:

If we can automate the DVD install using a mechanism similar to that used by the existing install.py test, it might make our lives easier in the long run. What makes this scalable is if we have a small number of custom install scripts, but a large number of kickstart files to describe the tests. If we break down the needs of each install test ... do they all have similar needs? From what I can tell, each install test needs to ...

  • Prepare the host environment
  • Define a guest environment (# and type of disks, #nics etc...)
  • Validate the install images
  • Specify a kickstart file to direct the install
  • Detect install progress (and timeout if needed)
  • Validate installed system meets kickstart criteria
  • Cleanup the guest environment
  • What other needs do install tests have?

comment:4 Changed 7 years ago by liam

I added these functions to this script:

  1. support DVD boot, with virt-install --cdrom to create VM
  2. support local kickstart and remote kickstart file(http,ftp,etc...)
  3. user environment checking to run this script
  4. some requisite software package check before running
  5. use dogtail to pass args to kernel
  6. create an additional hard disk to upload and store kickstart file

more details please see source code:


comment:5 Changed 7 years ago by kparal

  • Owner set to liam
  • Summary changed from writing a python test (modeled similarly to install.py) to DVD install python test (modeled similarly to install.py)

comment:6 Changed 7 years ago by liam

Jlaska had these changes to test:

  • Uses existing tests where possible (as defined in rats_install/install.py)
  • Uses+improves on existing helper methods (as defined in install.py)
  • Uses the virtguest object and helper methods
  • Uses existing install monitoring technique (minimon)
  • Easier to understand test output, this includes logfiles produced by the test (test results, log files default to /tmp/autoqa)
  • No globals

comment:7 Changed 7 years ago by liam

Jlaska said that things that still need improving from a test perspective ...

  • Improved definition of what tests must occur for a successful DVD or CD test (for example ... need to add a test confirming that the install source and package repository from the media were used)
  • Improved support for graphical installs, it works when commenting out some code, but it needs to be integrated
  • Support for additional kickstart delivery methods (ks=http and ks=nfs)
  • A more standard method for test output (this isn't specific to your test, but something where jskladan's work with beakerlib might help)
  • We don't yet test whether the installed system boots.

comment:8 Changed 7 years ago by liam

jlaska said that improvements from a test development perspective ...

  • Some hard-coded elements need improving
  • Minimon.py moved into a libary, and minimon the script moved elsewhere
  • Requires networking to allow for monitoring using minimon - I can live with this for now
  • Shared/duplicate methods between dvd_install.py and install.py will need to be moved into a library (wwoods can help here)
  • There is still a lot of work before this becomes something anyone can take and build an install test from ... my goal
  • Address pylint output

comment:9 Changed 7 years ago by liam

  • Summary changed from DVD install python test (modeled similarly to install.py) to Auto install python test (modeled similarly to install.py)

comment:10 Changed 7 years ago by liam

This is the final discussion for auto install tests:


the concrete install python tests,like dvd_install.py, cd_install.py, mediakit_sanity.py, please see other tickets.

comment:11 Changed 6 years ago by jlaska

  • Owner liam deleted
Note: See TracTickets for help on using tickets.