[Avocado-devel] Avocado 0.31.0 multi user problems

Lukáš Doktor ldoktor at redhat.com
Tue Jan 19 15:19:25 UTC 2016


Hello Olav,

please find some answers (or thought) inside...

Dne 8.1.2016 v 17:38 Cleber Rosa napsal(a):
>
>
> ----- Original Message -----
>> From: "Olav Philipp Henschel" <olavph at linux.vnet.ibm.com>
>> To: avocado-devel at redhat.com
>> Sent: Friday, January 8, 2016 2:09:02 PM
>> Subject: Re: [Avocado-devel] Avocado 0.31.0 multi user problems
>>
>> Thanks Cleber,
>>
>> I've been able to locate and delete all the files you mentioned.

It's hard to spot them all. What I'd recommend is to do `python setup.py 
uninstall`. Actually to be sure, I'd get the other user, then run 
`install`, `install --user` and then `uninstall` and `uninstall --user`.

>>
>> Then I proceeded to "make rpm", but it exits with an error:
>> Error: No Package found for aexpect
>> Even though it is already install by pip.
>>
>> I proceeded anyway with "python setup.py develop --user". I don't need
>> to use a path that all users can access yet.
>> I did the same for avocado-vt.
>>
>
> The solution to this is documented on the Makefile (repos just updated):
Yes, but some packages from EPEL are required. The problem is, that EPEL 
is not supported for ppc64le and aarch64. We discussed this recently and 
we'll try to create "unsafe" repo for these architectures for users, who 
don't want to build their packages. The problem is we don't have 
resources to keep it up-to-date, so some security updates might not be 
there.

Anyway it's hard call, you can download the srpms and build it yourself, 
or you can wait for us to build (maybe outdated) versions, or you can 
use `rpm -ivh --nodeps` to force install it as you already have it 
installed from pip.

>
> #
> # NOTE: to build Avocado RPM packages extra deps not present out of the box
> # are necessary. These packages are currently hosted at:
> #
> # https://repos-avocadoproject.rhcloud.com/static/avocado-fedora.repo
> # or
> # https://repos-avocadoproject.rhcloud.com/static/avocado-el.repo
> #
> # Since the RPM build steps are based on mock, edit your chroot config
> # file (/etc/mock/<your-config>.cnf) and add the COPR repo configuration there.
> #
>
> It's something hard to automate, but yes, it should probably also
> be documented elsewhere.
>
>>
>> Avocado is still getting .conf files from my other user, however
>> (powerkvm). I've tried with the absolute paths with the same results.
>> The paths that it shows for the subcommand "config" and "vt-bootstrap"
>> differ:
>>
>> $ sudo ~/.local/bin/avocado --config
>> /home/olavph/ibm-kvm-tests/avocado/etc/avocado/conf.d/pkvm.conf config
>> [sudo] password for olavph:
>> Config files read (in order):
>>       /home/powerkvm/ibm-kvm-tests/avocado/etc/avocado/avocado.conf
>>       /home/powerkvm/ibm-kvm-tests/avocado/etc/avocado/conf.d/gdb.conf
>> /home/powerkvm/ibm-kvm-tests/avocado/etc/avocado/conf.d/pkvm.conf
>>       /home/olavph/ibm-kvm-tests/avocado/etc/avocado/conf.d/pkvm.conf
>>
>>       Section.Key                             Value
>>       datadir.paths.base_dir                  /home/olavph/avocado
>>       datadir.paths.test_dir /home/olavph/avocado/tests
>>       datadir.paths.data_dir /home/olavph/avocado/data
>>       datadir.paths.logs_dir /home/olavph/avocado/job-results
>>       ...
>>
>> $ sudo ~/.local/bin/avocado --config
>> /home/olavph/ibm-kvm-tests/avocado/etc/avocado/conf.d/pkvm.conf
>> vt-bootstrap --vt-type libvirt --vt-guest-os PowerKVM --y
>> es-to-all
>> ...
>> 10:44:58 INFO | 4 - Verifying directories
>> 10:44:58 DEBUG| Dir /var/avocado/data/avocado-vt/images exists, not creating
>> 10:44:58 DEBUG| Dir /var/avocado/data/avocado-vt/isos exists, not creating
>> 10:44:58 DEBUG| Dir /var/avocado/data/avocado-vt/steps_data exists, not
>> creating
>> 10:44:58 DEBUG| Dir /var/avocado/data/avocado-vt/gpg exists, not creating
>> ...
>>
>>
>> Any other hints?
>
> I'll try to reproduce your setup and hopefully come with hints and/or fixes.
>
>>
>> Olav
>>
>>
>> On 07-01-2016 19:15, Cleber Rosa wrote:
>>>
>>> ----- Original Message -----
>>>> From: "Olav Philipp Henschel" <olavph at linux.vnet.ibm.com>
>>>> To: avocado-devel at redhat.com
>>>> Sent: Thursday, January 7, 2016 4:43:27 PM
>>>> Subject: [Avocado-devel] Avocado 0.31.0 multi user problems
>>>>
>>>> Hi,
>>>>
>>>> I've updated avocado to version 0.31.0 and got it to work using "python
>>>> setup.py develop". Everything worked fine until I tried to run it from
>>>> another user (with another local git clone).
>>> That may be expected. Setuptools "develop" will create a link file (not a
>>> POSIX symlink or hardlink) that points to the original location. The second
>>> user may not have permission to access those.
>>>
>>>> I've ran "python setup.py develop" from that user too to try to
>>>> overwrite whatever configurations were made. It keeps using the files
>>>> from the first user avocado-vt plugin folder however, getting its tests
>>>> provider and custom .cfgs.
>>>> At some point I've ran "python setup.py install", so I'm not sure which
>>>> command made this mess.
>>>> I've also tried using "python setup.py install" and "python setup.py
>>>> develop --user" from the second user.
>>>>
>>> Given the different commands ran as different users, it's pretty hard
>>> to give any thoughts about your current installation state.
>>>
>>>> Is there any way I can make a clean install? Which folders does the
>>>> setup.py write to?
>>> It depends on how you ran it. What I'd recommend is:
>>>
>>>    1) Look for egg link files (avocado*.egg-link), and then look at their
>>>       contents to check where they point to
>>>    2) At the link targets, (the locations given in the .egg-link files)
>>>       check if they have avocado*.egg-info directories
>>>    3) Look for the "avocado" script in your system.
>>>
>>> Cleaning all of those, and then starting fresh, should give you pretty
>>> good confidence about where you're running Avocado from.
>>>
>>> Now, for some advice on how to install Avocado:
>>>
>>>    1) Even if you're tracking Avocado from master (or your local branch)
>>>       you could depend on RPM packages (if your system supports it). The
>>>       `make rpm` command should give you pretty reliable versions. And,
>>>       because of the packaging system itself, you don't have to go looking
>>>       for scattered files if you want to remove it.
>>>
>>>    2) If you want to run directly from git, I'd recommend using:
>>>
>>>       $ python setup.py develop --prefix=/path/that/all/users/can/access
>>>
>>>       Setuptools itself will tell you that the given prefix must be on the
>>>       Python search path for your users.
>>>
>>> I hope that helps.
>>>
>>>>
>>>> Regards,
>>>> Olav P. Henschel
>>>>
>>>> _______________________________________________
>>>> Avocado-devel mailing list
>>>> Avocado-devel at redhat.com
>>>> https://www.redhat.com/mailman/listinfo/avocado-devel
>>>>
>>> _______________________________________________
>>> Avocado-devel mailing list
>>> Avocado-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/avocado-devel
>>>
>>
>> _______________________________________________
>> Avocado-devel mailing list
>> Avocado-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/avocado-devel
>>
>
> _______________________________________________
> Avocado-devel mailing list
> Avocado-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/avocado-devel
>




More information about the Avocado-devel mailing list