avocado-framework / avocado-vt

Avocado VT Plugin
https://avocado-vt.readthedocs.org/
Other
83 stars 241 forks source link

avocado vt-bootstrap report error #3346

Open chunfuwen opened 2 years ago

chunfuwen commented 2 years ago

Environment and setup steps: 1 install from source code in virtualenv 2 avocado(92lts) + avocado-vt(master)+tp-libvirt(master) 3 Install 92lts avocado release in virtualenv: python setup.py install 4 Go to avocado-vt folder, change uri: https://github.com/autotest/tp-libvirt.git

 to uri: file:///root/92ltscode/tp-libvirt in the file:virttest/test-providers.d/io-github-autotest-libvirt.ini

5 "Install avocado-vt :pip install . 6 "Bootstrap avocado-vt" : avocado vt-bootstrap --vt-type libvirt --vt-no-downloads

detailed error log follow as:

(92lts-p3-ve) [root@dell-per430-17 avocado-vt]# !36
avocado vt-bootstrap --vt-type libvirt --vt-no-downloads
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
Failed to load plugin from module "avocado_vt.plugins.vt": ImportError("Bootstrap missing. Execute 'avocado vt-bootstrap' or disable this plugin to get rid of this message") :
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/avocado_framework-92.0-py3.9.egg/avocado/core/extension_manager.py", line 63, in __init__
    plugin = ep.load()
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/avocado_vt/plugins/vt.py", line 38, in <module>
    raise ImportError("Bootstrap missing. "

Failed to load plugin from module "avocado_vt.plugins.vt_list": ImportError("Bootstrap missing. Execute 'avocado vt-bootstrap' or disable this plugin to get rid of this message") :
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/avocado_framework-92.0-py3.9.egg/avocado/core/extension_manager.py", line 63, in __init__
    plugin = ep.load()
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
    return self.resolve()
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/avocado_vt/plugins/vt_list.py", line 26, in <module>
    from .vt import add_basic_vt_options, add_qemu_bin_vt_option
  File "/root/92ltscode/92lts-p3-ve/lib/python3.9/site-packages/avocado_vt/plugins/vt.py", line 38, in <module>
dzhengfy commented 2 years ago

@Yingshun @kylazhang @dzhengfy

Yingshun commented 2 years ago

@chunfuwen Did this command fail? or jut report error? I'm using master, which works after the test provider(local files) is set up correctly.

My steps:

  1. avocado vt-bootstrap --vt-type libvirt --vt-no-downloads -- reports error but bootstrap pass
  2. cd /root/avocado/data/avocado-vt/virttest/test-providers.d/; mkdir downloads, cd downloads
  3. ln -s ~/code/tp-libvirt/ io-github-autotest-libvirt
  4. avocado vt-bootstrap --vt-type libvirt --vt-no-downloads -- error in step1 will be gone
chunfuwen commented 2 years ago

@clebergnu Could you anyone from your team take a look at this issue?

dzhengfy commented 2 years ago

@chunfuwen @clebergnu ,

  1. If we bootstrap for the first time, we got above error in this issue description every time which is also displayed in every avocado-vt pr's cirrus-ci, for example pr 3349 , cirrus-ci job. So I guess this error is as expected. But it will be appreciated if cleber can give more detailed explanation.

  2. @clebergnu , according to yingshun's step in https://github.com/avocado-framework/avocado-vt/issues/3346#issuecomment-1034508923 which is still used in our libvirt-ci currently. Our purpose is to avoid of tp-libvirt codes being copied from development folder to avocado installation folder. This benefits our debugging and development process. We do not like to modified the tp-libvirt codes in avocado installation folder every time. Could you help confirm if this is recommended usage from avocado side by --vt-no-downloads option?

clebergnu commented 2 years ago

@chunfuwen @clebergnu ,

  1. If we bootstrap for the first time, we got above error in this issue description every time which is also displayed in every avocado-vt pr's cirrus-ci, for example pr 3349 , cirrus-ci job. So I guess this error is as expected. But it will be appreciated if cleber can give more detailed explanation.

Yes, that is expected, and it's really a warning. Maybe we can turn the exception name or mechanism, but for now I'd just suggest it to be ignored.

  1. @clebergnu , according to yingshun's step in avocado vt-bootstrap report error #3346 (comment) which is still used in our libvirt-ci currently. Our purpose is to avoid of tp-libvirt codes being copied from development folder to avocado installation folder. This benefits our debugging and development process. We do not like to modified the tp-libvirt codes in avocado installation folder every time. Could you help confirm if this is recommended usage from avocado side by --vt-no-downloads option?

Yes, --vt-no-downloads option is supposed to prevent any download, including any test provider. Then, one would have to set up the test providers (such as tp-libvirt) on their own.

chunfuwen commented 2 years ago

@chunfuwen @clebergnu ,

  1. If we bootstrap for the first time, we got above error in this issue description every time which is also displayed in every avocado-vt pr's cirrus-ci, for example pr 3349 , cirrus-ci job. So I guess this error is as expected. But it will be appreciated if cleber can give more detailed explanation.

Yes, that is expected, and it's really a warning. Maybe we can turn the exception name or mechanism, but for now I'd just suggest it to be ignored.

  1. @clebergnu , according to yingshun's step in avocado vt-bootstrap report error #3346 (comment) which is still used in our libvirt-ci currently. Our purpose is to avoid of tp-libvirt codes being copied from development folder to avocado installation folder. This benefits our debugging and development process. We do not like to modified the tp-libvirt codes in avocado installation folder every time. Could you help confirm if this is recommended usage from avocado side by --vt-no-downloads option?

Yes, --vt-no-downloads option is supposed to prevent any download, including any test provider. Then, one would have to set up the test providers (such as tp-libvirt) on their own.

@clebergnu [chunfu] Hi clebergnu,
Quote, "Then, one would have to set up the test providers (such as tp-libvirt) on their own" , what it exactly means specifically? Since in my local environment, I install all from source, so tp-libvirt is already in my local environment.