[Avocado-devel] installation to a virtualenv

Sergey Bronnikov estetus at gmail.com
Fri Jul 27 16:23:30 UTC 2018


Hello, Lukas, Cleber,

Thanks for the answers. As far as I understand correctly Cleber uses CentOS
and I'm agree that everything works fine there, I checked it too.
But I uses Ubuntu (18.04) and latest Avocado-VT plugin (63.0) is broken
there.
The problem is in latest changes for temporary directory hardcoded in
virttest/data_dir.py - "/var/lib/libvirt/images". This directory is absent
on my computer and on attempt to load avocado-vt plugin it failed on
cleanup temp dir. It was a reason why option vt-bootstrap option was missed
in output of command 'avocado plugins'. Don't know how to fix it properly
but changing value "/tmp" resolves the problem.

Bug was introduced by commit:

commit 6a78795ddb63a7c39262188893a5b2223edf46dd
Author: Balamuruhan S <bala24 at linux.vnet.ibm.com>
Date:   Fri Mar 9 16:23:41 2018 +0530

    data_dir: handle get_tmp_dir for Ubuntu to avoid apparmor denial

    In ubuntu, apparmor deny libvirt operations from /tmp/* and /var/tmp/*
    and causes the tests to error/fail, suggested path is to use
    /var/lib/libvirt/images which is open by default.

    Signed-off-by: Satheesh Rajendran <sathnaga at linux.vnet.ibm.com>
    Signed-off-by: Balamuruhan S <bala24 at linux.vnet.ibm.com>

P.S. also I have submitted a bug on GH -
https://github.com/avocado-framework/avocado-vt/issues/1681

Sergey


чт, 26 июл. 2018 г. в 17:48, Lukáš Doktor <ldoktor at redhat.com>:

> Dne 24.7.2018 v 20:04 Sergey Bronnikov napsal(a):
> > Hello!
> >
> > Avocado documentation describes installation from source code
> > to the whole system. I don't want to pollute system and use
> > separate virtual environment. In that case everything works fine
> > except tests discovering - command 'avocado list' reports nothing.
> >
> > My actions step by step:
> > (note: I am using vanilla avocado and customized avocado-vt, so
> avocado-vt
> > is
> > installed from source code not via pip)
> >
> > - virtualenv venv
> > - source
> > venv/bin/activate
> > - pip install -r requirements.txt
> > - git clone https://github.com/avocado-framework/avocado-vt
> > - reset to 59.0 release: git reset --hard
> > fc84a49f20698126a4f283e89cff227a84abeb71
> > - sed -i -e 's/DESTDIR=/DESTDIR?=/g' avocado-vt/Makefile
> > - DESTDIR=venv make -C avocado-vt install link
> > - avocado vt-bootstrap
> > - avocado list
> >
> > where requirements.txt is:
> > $ cat requirements.txt
> > aexpect==1.5.1
> > autotest==0.16.4
> > avocado-framework==63.0
> > avocado-framework-plugin-varianter-yaml-to-mux==63.0
> > enum34==1.1.6
> > netaddr==0.7.19
> > netifaces==0.10.7
> > pbr==4.2.0
> > pkg-resources==0.0.0
> > PyYAML==3.13
> > six==1.11.0
> > stevedore==1.29.0
> > subprocess32==3.5.2
> >
> >
> > As I understand correctly installation to a separate virtualenv is not
> > popular
> > usecase but perhaps someone can help me.
> >
>
> Dear Sergey,
>
> it is popular and widely used, but unfortunately still a bit hackish in
> terms of configuration files. You don't need to change the DESTDIR as
> setuptools detect you're in virtualenv and put the files into the right
> location. The only missing piece here is hardcoded `/etc` configuration
> which I'm working on now (and neglecting for a while already).
>
> So as Cleber wrote, just install avocado, then `pip install .` and if you
> need to adjust `vt.conf` please copy `avocado-vt/etc/avocado/conf.d` files
> it into `/etc/avocado/conf.d/` until we resolve the
> https://trello.com/c/NxqPTjh2/1118-avocadovt-add-avocado-and-other-requirements
>
> Lukáš
>
> PS: When
> https://trello.com/c/NxqPTjh2/1118-avocadovt-add-avocado-and-other-requirements
> is resolved the only step should be `pip install git+
> http://github.com/avocado-framework/avocado-vt@master`
> <http://github.com/avocado-framework/avocado-vt@master> which will take
> care of all the deps. But there is still the `etc` config to take care of...
>
> > Sergey
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20180727/57bfa932/attachment.htm>


More information about the Avocado-devel mailing list