oVirt / ovirt-engine

The oVirt Engine virtualization manager
Other
493 stars 259 forks source link

error on installing a self-hosted engine #867

Open akamuraaa opened 1 year ago

akamuraaa commented 1 year ago

Affected version

Error Report

'#'hosted-engine --deploy --4 ***L:ERROR Internal error: No module named 'importlib_resources' Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/netaddr/compat.py", line 91, in from importlib import resources as _importlib_resources ImportError: cannot import name 'resources'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/otopi/main.py", line 141, in execute self.context.loadPlugins() File "/usr/lib/python3.6/site-packages/otopi/context.py", line 803, in loadPlugins self._loadPluginGroups(plugindir, needgroups, loadedgroups) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 112, in _loadPluginGroups self._loadPlugins(path, path, groupname) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 69, in _loadPlugins self._loadPlugins(base, d, groupname) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 100, in _loadPlugins os.path.basename(path), File "/usr/lib/python3.6/site-packages/otopi/util.py", line 110, in loadModule spec.loader.exec_module(module) File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-ansiblesetup/core/init.py", line 26, in from . import storage_domain File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-ansiblesetup/core/storage_domain.py", line 25, in import netaddr File "/usr/lib/python3.6/site-packages/netaddr/init.py", line 18, in from netaddr.core import (AddrConversionError, AddrFormatError, File "/usr/lib/python3.6/site-packages/netaddr/core.py", line 11, in from netaddr.compat import _callable, _iter_dict_keys File "/usr/lib/python3.6/site-packages/netaddr/compat.py", line 93, in import importlib_resources as _importlib_resources ModuleNotFoundError: No module named 'importlib_resources'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/otopi/main.py", line 88, in main installer.execute() File "/usr/lib/python3.6/site-packages/otopi/main.py", line 147, in execute sys.exc_info()[2], File "/usr/lib/python3.6/site-packages/otopi/util.py", line 85, in raiseExceptionInformation raise info[1].with_traceback(info[2]) File "/usr/lib/python3.6/site-packages/otopi/main.py", line 141, in execute self.context.loadPlugins() File "/usr/lib/python3.6/site-packages/otopi/context.py", line 803, in loadPlugins self._loadPluginGroups(plugindir, needgroups, loadedgroups) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 112, in _loadPluginGroups self._loadPlugins(path, path, groupname) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 69, in _loadPlugins self._loadPlugins(base, d, groupname) File "/usr/lib/python3.6/site-packages/otopi/context.py", line 100, in _loadPlugins os.path.basename(path), File "/usr/lib/python3.6/site-packages/otopi/util.py", line 110, in loadModule spec.loader.exec_module(module) File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-ansiblesetup/core/init.py", line 26, in from . import storage_domain File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-ansiblesetup/core/storage_domain.py", line 25, in import netaddr File "/usr/lib/python3.6/site-packages/netaddr/init.py", line 18, in from netaddr.core import (AddrConversionError, AddrFormatError, File "/usr/lib/python3.6/site-packages/netaddr/core.py", line 11, in from netaddr.compat import _callable, _iter_dict_keys File "/usr/lib/python3.6/site-packages/netaddr/compat.py", line 93, in import importlib_resources as _importlib_resources otopi.main.PluginLoadException: No module named 'importlib_resources'

To reproduce

I followed the documentation on how to deploy a self-hosted engine. i'm a the 5.3. Deploying the self-hosted engine using the command line

Ecsi1337 commented 1 year ago

Currently, the only working solution is to have both the hosts and the hosted-engine version 4.4.10, and then update the hosted-engine to 4.5.4 first, and then the hosts. It is important that you cannot add a 4.4.10 host to the 4.5.4 hosted-engine, everything must be started from 4.4.10.

o0-o commented 1 year ago

Why are there different versions of Ansible between node and engine?

On the oVirt node 4.5.4 (Stream 8), Ansible core is version 2.13.5 which uses Python 3.9.

On the oVirt engine, Ansible Core is version 2.15.0 which uses Python 3.11.

python39-netaddr.noarch is installed on both. python311-netaddr.noarch isn't in the repos.

michalskrivanek commented 1 year ago

netaddr was dropped in #826 Also, make sure you use https://www.ovirt.org/develop/dev-process/install-nightly-snapshot.html

o0-o commented 1 year ago

Also, make sure you use https://www.ovirt.org/develop/dev-process/install-nightly-snapshot.html

I attempted this on a vanilla CentOS Stream host and I couldn't figure out what other steps were involved to get a functional oVirt installation. I ran into a lot of repository issues and timeouts. Am I intended to do this on the Node appliance? It's unclear what else is involved other than enabling the copr repository...

michalskrivanek commented 1 year ago

nothing other than enabling the copr repos. It shouldn't be needed on Node, but it is needed on CentOS hosts and engine host(both appliance and CentOS host)

michalskrivanek commented 1 year ago

I mean, nothing else is different from the installation procedure. Just enable the repos so it sees the newer packages.

o0-o commented 1 year ago

It shouldn't be needed on Node, but it is needed on CentOS hosts and engine host(both appliance and CentOS host)

Ah, that is a revelation. I think it would be helpful to note that on the nightly snapshot page, especially about it being needed on the engine (I would assume a master branch would deploy a master engine).

What is the recommended procedure for enabling the copr repository on the engine since its deployment is automated and will fail without it?

I am deploying from the Stream 8 Node image.

I mean, nothing else is different from the installation procedure. Just enable the repos so it sees the newer packages.

That is fine, I probably made a mistake configuring the thick host. I am happy to use the node image since it's simpler and I found a way to use a custom kickstart with it.

akamuraaa commented 1 year ago

why should i use the beta version? It should work on an red hat 8 derivate as mentioned on their page. Also i tried it on centos stream 8 and got the same problem. ovirt node cant be used, because it reguires more than 25 GB, which i dont have on the machine.

michalskrivanek commented 1 year ago

It shouldn't be needed on Node, but it is needed on CentOS hosts and engine host(both appliance and CentOS host)

Ah, that is a revelation. I think it would be helpful to note that on the nightly snapshot page, especially about it being needed on the engine (I would assume a master branch would deploy a master engine).

That page is linked from the deployment instructions, it's meant to amend the original procedure, not to be used alone. Feel free to rearrange/clarify at https://github.com/oVirt/ovirt-site/blob/main/source/download/index.md?plain=1#L31 or around

What is the recommended procedure for enabling the copr repository on the engine since its deployment is automated and will fail without it?

Easiest would be to manually pause the deployment and dnf update manually. To automate you can use HE deploy hooks, see example in our CI https://github.com/oVirt/ovirt-system-tests/blob/master/common/deploy-scripts/setup_first_he_host.sh#L28, you drop in ansible code that performs the update at the right time.

I am deploying from the Stream 8 Node image.

I mean, nothing else is different from the installation procedure. Just enable the repos so it sees the newer packages.

That is fine, I probably made a mistake configuring the thick host. I am happy to use the node image since it's simpler and I found a way to use a custom kickstart with it.