Re: How to upload files via oVirt SDK
by Nir Soffer
Moved discussion from private chat to the proper place. Please use the mailing
list instead of private email or chat.
> about this issue https://github.com/ansible/ansible/issues/68403
> should I rewrite the upload so it would work as
> https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload...
Yes
> If I remember correctly it works only with 4.4 SDK?
upload_disk.py is assuming oVirt 4.4, as part of ovirt-4.4 release.
However imageio client library used by upload_disk.py tries to support
any version
of imageio, both proxy and daemon so the upload should work with any version.
If it does not work please file ovirt-imageio bug.
upload_disk.py assumes that the sdk supports the "format" attribute of
ImageTransfer.
This should be available since 4.3 and should work.
Common issues with old upload code are:
- using proxy_url instead of transfer_url
- using signed_ticket and Authorization header
ImageTransfer.proxy_url should be used only when you cannot access
ImageTransfer.transfer_url.
It also provides worse performance and partial functionality. The
proxy was added to support upload
and download from the UI, but programs should avoid it if possible.
ImageTransfer.signed_ticket and Authorization header were used only up
to 4.2 (or maybe 4.1).
There is no need to send this header to the proxy since it does not
use it. The daemon never
support this header.
Note that imageio client library import is going to change in 4.4.
release. In 4.3 it was
via:
from ovirt_imageio_common import client
While in 4.4 it will be:
from ovirt_imageio import client
Due to restructure of the ovirt-imageio deployment in ovirt-imageio 2.0.
This affects only python 3 version, and only oVirt 4.4 alpha.
To support both 4.4. alpha and 4.4 final release you can do:
try:
from ovirt_imageio_common import client
except ImportError:
from ovirt_imageio import client
If you don't care about supporting early alpha versions you can have:
python2:
from ovirt_imageio_common import client
python 3:
from ovirt_imageio import client
Nir
4 years, 8 months
Failed run 'make rpm' on VDSM dev host
by Eyal Shenitzky
Hi,
I am faling to run 'make rpm' for vdsm latest master branch.
Failed with -
make[7]: Leaving directory '/root/git/vdsm/lib/vdsm/common'
(cd tool && make top_distdir=../../../vdsm-4.40.7
distdir=../../../vdsm-4.40.7/lib/vdsm/tool \
am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=:
distdir)
make[7]: Entering directory '/root/git/vdsm/lib/vdsm/tool'
make distdir-am
make[8]: Entering directory '/root/git/vdsm/lib/vdsm/tool'
make[8]: *** No rule to make target 'vdsm_config.py', needed by
'distdir-am'. Stop.
make[8]: Leaving directory '/root/git/vdsm/lib/vdsm/tool'
make[7]: *** [Makefile:672: distdir] Error 2
Does someone encounter issues lately?
The full command for building the VDSM on the host is -
git clean -dxf && ./autogen.sh --system --enable-timestamp && make && rm
-rf ~/rpmbuild && make rpm && (cd ~/rpmbuild/RPMS && sudo dnf install
*/*.rpm --allowerasing)
Thanks
--
Regards,
Eyal Shenitzky
4 years, 8 months
meanwhile, installing engine on Fedora 30...
by Fedor Gavrilov
Hi,
Since master on CentOS 7 is impossible atm and CentOS 8 is the last thing I would touch, I followed an advice and tried installing engine on Fedora 30 machine.
I've been following https://github.com/oVirt/ovirt-engine/blob/master/README.adoc
I was able to compile the engine and imageio, but engine-setup then fails:
***L:ERROR Internal error: No module named 'ovirt_setup_lib'
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/otopi/main.py", line 141, in execute
self.context.loadPlugins()
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 803, in loadPlugins
self._loadPluginGroups(plugindir, needgroups, loadedgroups)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 112, in _loadPluginGroups
self._loadPlugins(path, path, groupname)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 69, in _loadPlugins
self._loadPlugins(base, d, groupname)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 100, in _loadPlugins
os.path.basename(path),
File "/usr/lib/python3.7/site-packages/otopi/util.py", line 109, in loadModule
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/apple/ovirt-engine/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/vmconsole_proxy_helper/__init__.py", line 15, in <module>
from . import config
File "/home/apple/ovirt-engine/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/vmconsole_proxy_helper/config.py", line 24, in <module>
from ovirt_setup_lib import dialog
ModuleNotFoundError: No module named 'ovirt_setup_lib'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/otopi/__main__.py", line 88, in main
installer.execute()
File "/usr/lib/python3.7/site-packages/otopi/main.py", line 147, in execute
sys.exc_info()[2],
File "/usr/lib/python3.7/site-packages/otopi/util.py", line 84, in raiseExceptionInformation
raise info[1].with_traceback(info[2])
File "/usr/lib/python3.7/site-packages/otopi/main.py", line 141, in execute
self.context.loadPlugins()
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 803, in loadPlugins
self._loadPluginGroups(plugindir, needgroups, loadedgroups)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 112, in _loadPluginGroups
self._loadPlugins(path, path, groupname)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 69, in _loadPlugins
self._loadPlugins(base, d, groupname)
File "/usr/lib/python3.7/site-packages/otopi/context.py", line 100, in _loadPlugins
os.path.basename(path),
File "/usr/lib/python3.7/site-packages/otopi/util.py", line 109, in loadModule
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/apple/ovirt-engine/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/vmconsole_proxy_helper/__init__.py", line 15, in <module>
from . import config
File "/home/apple/ovirt-engine/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/vmconsole_proxy_helper/config.py", line 24, in <module>
from ovirt_setup_lib import dialog
otopi.main.PluginLoadException: No module named 'ovirt_setup_lib'
In case you are wondering, I have ovirt-setup-lib installed:
sudo yum install ovirt-setup-lib
Last metadata expiration check: 1:05:07 ago on Thu Mar 12 16:04:28 2020.
Package python2-ovirt-setup-lib-1.3.1-0.0.master.20191121145802.git8eff989.fc30.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Do you what what that issue might be? Or maybe someone has setup notes to share?
Thanks as always,
Fedor
4 years, 8 months
Ovirt engine thread-per-core(-T1C) maven execution
by Artur Socha
Hi,
I have been using thread-per-core (-T1C) maven flag for couple months
when building engine on my machine. I have not seen any issues related
to such parallel maven goals execution so I submitted a patch that
enables it by default:
https://gerrit.ovirt.org/#/c/107567/
The main benefit is significantly reduced build time ( ~30% in my case
but it greatly depends on the hardware/vm you run the build on)
Please let me know if you can think about any corner cases when this
setting would cause some instability. Posting review comments would be
the preferred option :)
thanks!
--
Artur Socha
Senior Software Engineer, RHV
Red Hat
4 years, 8 months