Add fedora image support to LAVA

Bug #1165999 reported by Fu Wei
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Dispatcher
Fix Released
High
Antonio Terceiro

Bug Description

For testing fedora image in LAVA , we have to do three main modifications:
1. modify the original fedora image
    a.modify the /etc/fstab,delete the "boot" and "swap" partitions:
    b.make Fedora login as root automatically
    c.delete the rootfs partition resize on first booting
    Please my wiki page below for detail!

2. modify the config file of lava dispatcher for the device
    a. add boot_cmds_oe for booting from u-boot
        suggestion : add a "boot_cmds_fedora" for fedora image test
    b. modify the boot_part to "1"
        the modification just for original fedora image made by anaconda.
        we can make a new fedora image use "boot_part =2"

3. modify the lava dispatcher code for "deps:" section in yaml file
    The patch is in the attachment, please note that this patch is just a draft(just tell you what we need to add for fedora image testing), it delete the ubuntu support, then add fedora support. But as a good patch, we need to support both of ubuntu and fedora.

     Q:Why I add "sleep" and "ping" command in the patch?
     A: when test the fedora image in cubieboard, I met a problem: the test happen so fast , that the board can't get network prepared for installation. So maybe we should have some mechanism to wait for the network be prepare or report the network problem.

I have made several fedora image test in arndale board and cubieboard(new board type supported), the test log and the detail of testing Fedora image in LAVA are in my internal wiki page: https://wiki.linaro.org/Internal/People/FuWei

Tags: fedora

Related branches

Revision history for this message
Fu Wei (fu-wei) wrote :
description: updated
Fathi Boudra (fboudra)
Changed in lava-dispatcher:
milestone: none → 2013.04
Changed in lava-lab:
milestone: none → 2013.04
Changed in lava-dispatcher:
status: New → Triaged
Changed in lava-lab:
status: New → Triaged
Changed in lava-dispatcher:
importance: Undecided → High
Changed in lava-lab:
importance: Undecided → High
Revision history for this message
Fu Wei (fu-wei) wrote :

Because of difference between yum and apt, I suggest that we should add a command like "deps_rpmg" and "deps_rpm" to support the rpm package installation .

The new patch is in the attachment.

Revision history for this message
Fu Wei (fu-wei) wrote :

The new patch (V2) support both ubuntu and fedora , and support "groupinstall" of yum.
the demo of yaml file is in the attachment.

Revision history for this message
Fathi Boudra (fboudra) wrote :

As discussed, I prefer to keep deps universal and do the plumbing to use the correct package manager behind the scene.

Changed in lava-dispatcher:
assignee: nobody → Antonio Terceiro (terceiro)
Revision history for this message
Antonio Terceiro (terceiro) wrote : Re: [Bug 1165999] Re: Add fedora image support to LAVA

Hi,

Me and Fathi discussed this has we both had coded some partial solution
for this in parallel:

http://bazaar.launchpad.net/~fboudra/lava-dispatcher/fedora-support/revision/579
http://bazaar.launchpad.net/~terceiro/lava-dispatcher/modularize-distro-support/revision/579

I will be taking this over, and will combine bits from both of them to have
proper multi-distro support. I hope to have the code ready in the next few
days.

 assignee terceiro
 milestone 2013.04

Revision history for this message
Fu Wei (fu-wei) wrote :

Hi

I have uploaded my code to
https://code.launchpad.net/~fu-wei/lava-dispatcher/lava-dispatcher

The code have been tested , It works fine.

please check if that was a good way:
http://bazaar.launchpad.net/~fu-wei/lava-dispatcher/lava-dispatcher/revision/579

Changed in lava-dispatcher:
status: Triaged → In Progress
Revision history for this message
Fu Wei (fu-wei) wrote :

When I test "lp:~fu-wei/lava-dispatcher/modularize-distro-support" (Base on lp:~terceiro/lava-dispatcher/modularize-distro-support revision 584), I have met problem below:

root@master [rc=0]# <LAVA_DISPATCHER>2013-04-12 06:54:20 PM WARNING: [ACTION-E] lava_test_shell is finished with error ('function' object has no attribute 'glob').
Lava failed at action lava_test_shell with error:'function' object has no attribute 'glob'
Traceback (most recent call last):
  File "/srv/lava/.cache<email address hidden>/lava_dispatcher/job.py", line 178, in run
    action.run(**params)
  File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 472, in run
    testdefs_by_uuid = self._configure_target(target, testdef_urls, testdef_repos)
  File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 552, in _configure_target
    self._copy_runner(d, target)
  File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 522, in _copy_runner
    scripts_to_copy = glob.glob(os.path.join(LAVA_TEST_DIR, 'lava-*'))
AttributeError: 'function' object has no attribute 'glob'

Can you help me out ?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Fu Wei <email address hidden> writes:

> File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 522, in _copy_runner
> scripts_to_copy = glob.glob(os.path.join(LAVA_TEST_DIR, 'lava-*'))
> AttributeError: 'function' object has no attribute 'glob'
>
>
> Can you help me out ?

I've run into this before. It's Python being terrible basically; you
need to be sure that actions/__init__.py and any other actions/*.py file
import glob 'in the same way' -- currently __init__.py has "from glob
import glob" and lava_test_shell.py has "import glob" and that's a
problem. Even then, it depends on the order imports get executed in...
(another approach I think would be to have "from __future__ import
absolute_import" everywhere)

Revision history for this message
Antonio Terceiro (terceiro) wrote :

On Sun, Apr 14, 2013 at 09:59:45PM -0000, Michael Hudson-Doyle wrote:
> Fu Wei <email address hidden> writes:
>
> > File "/srv/lava/.cache<email address hidden>/lava_dispatcher/actions/lava_test_shell.py", line 522, in _copy_runner
> > scripts_to_copy = glob.glob(os.path.join(LAVA_TEST_DIR, 'lava-*'))
> > AttributeError: 'function' object has no attribute 'glob'
> >
> >
> > Can you help me out ?
>
> I've run into this before. It's Python being terrible basically; you
> need to be sure that actions/__init__.py and any other actions/*.py file
> import glob 'in the same way' -- currently __init__.py has "from glob
> import glob" and lava_test_shell.py has "import glob" and that's a
> problem. Even then, it depends on the order imports get executed in...
> (another approach I think would be to have "from __future__ import
> absolute_import" everywhere)

Creepy - I hadn't got that error, and I was wondering what could be the
problem. :-/

--
Antonio Terceiro
Software Engineer - Linaro
http://www.linaro.org

Revision history for this message
Fu Wei (fu-wei) wrote :

I have fixed that by using :
 scripts_to_copy = glob(os.path.join(LAVA_TEST_DIR, 'lava-*'))
And I have update my branch last weekend:
https://code.launchpad.net/~fu-wei/lava-dispatcher/modularize-distro-support

that is working fine now

Fathi Boudra (fboudra)
Changed in lava-dispatcher:
status: In Progress → Fix Committed
no longer affects: lava-lab
Fathi Boudra (fboudra)
Changed in lava-dispatcher:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.