[Avocado-devel] Forced values at /etc/avocado/conf.d/vt.conf

Lukáš Doktor ldoktor at redhat.com
Wed Nov 2 11:33:21 UTC 2016


Dne 2.11.2016 v 11:30 Andrei Stepanov napsal(a):
> Hi! Lukas Doktor, thank you.
>
> I believe we can extend:
>
> ./virttest/standalone_test.py:32:SUPPORTED_NET_TYPES = ["bridge",
> "user", "none"]
>
> with: network, macvtap
>
> to pass:
>
> ./options.py:165:            if self.options.vt_nettype not in
> SUPPORTED_NET_TYPES:
>
I thought about it when doing the bugfix, but I don't use those options, 
therefor I don't need to extend the capabilities. It's accessible via 
`--vt-config`. Anyway if you need those and you believe they should be 
there, feel free to add them ;-)

Btw I personally don't use the config much, I prefer using 
`--vt-extra-params` which allows me to override anything I need 
including details like cpu type... (per execution).

Regards,
Lukáš

>
> But, I do not need it, just a mention.
>
> On Wed, Nov 2, 2016 at 7:07 AM, Lukáš Doktor <ldoktor at redhat.com
> <mailto:ldoktor at redhat.com>> wrote:
>
>     Hello Andrei,
>
>     It is actually a bug. Supported options are bridge, user and none,
>     where the none should not override the config, but it does. Please
>     let me know whether this fix works for you
>     https://github.com/avocado-framework/avocado-vt/pull/742
>     <https://github.com/avocado-framework/avocado-vt/pull/742>
>
>     (you need to set the config option net_type to "none". It won't work
>     if you leave the option without value)
>
>     Regards,
>     Lukáš
>
>     Dne 1.11.2016 v 12:21 Andrei Stepanov napsal(a):
>
>         Hello.
>
>         I noticed that values defined at /etc/avocado/conf.d/vt.conf
>         have the
>         highest priority.
>
>         This approach is quite awkward, and inflexible.
>
>         See:
>         https://github.com/avocado-framework/avocado-vt/blob/master/shared/cfg/guest-hw.cfg#L368
>         <https://github.com/avocado-framework/avocado-vt/blob/master/shared/cfg/guest-hw.cfg#L368>
>
>         variants:
>         - @bridge:
>         nettype = bridge
>         - macvtap:
>         nettype = macvtap
>         - user:
>         nettype = user
>         - network:
>         nettype = network
>
>         For example we have different tests, they use different types of
>         QEMU
>         network.
>         Current approach doesn't allow me to select desired nettype in
>         Cartesian
>         config.
>         You force ALL tests of specified type to use the same kind of
>         network.
>         We have different tests that use different network type. And with
>         current approach we cannot run them.
>         Network type is always taken from /etc/avocado/conf.d/vt.conf
>         We cannot vary with nettype in Cartesian config.
>
>         nettype is only stays as an example, there are another values
>         that can
>         be different for different tests.
>
>         I cannot undefine nettype, as it always be defined by next type
>         of code:
>
>
>         avocado-vt/avocado_vt/options.py
>
>
>                     if self.options.vt_type == 'qemu':
>
>                         self.options.vt_nettype =
>         (self.options.vt_nettype if
>
>
>          self.options.vt_nettype else
>         'user')
>                     else:
>
>                         self.options.vt_nettype =
>         (self.options.vt_nettype if
>
>
>          self.options.vt_nettype else
>         'bridge')
>
>
>         Can we fix this bug somehow? Any ideas?
>         Thanks!
>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 502 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20161102/1b7b0647/attachment.sig>


More information about the Avocado-devel mailing list