Re: [ovirt-devel] Making event types backwards compatible?
by Michal Skrivanek
> On 29 May 2017, at 11:44, Juan Hernández <jhernand(a)redhat.com> wrote:
>
>> On 05/29/2017 11:27 AM, Michal Skrivanek wrote:
>>
>>> On 29 May 2017, at 10:39, Juan Hernández <jhernand(a)redhat.com> wrote:
>>>
>>> Hello,
>>>
>>> It has been recently requested that the API provides event types:
>>>
>>> [RFE] Expose event types to API
>>> https://bugzilla.redhat.com/1453170
>>>
>>> Currently the API provides the event code and description, for example:
>>>
>>> <event href="/ovirt-engine/api/events/8021" id="8021">
>>> <code>19</code>
>>> <description>Host myhost failed to recover.</description
>>> ...
>>> </event>
>>>
>>> There is no documentation of what is the meaning of codes, except the
>>> source code of the engine itself. This forces some applications to add
>>> their own code to name mapping. For example, the 'ovirt' Ruby gem used
>>> by older versions of ManageIQ to interact with oVirt contains the following:
>>>
>>> https://github.com/ManageIQ/ovirt/blob/v0.17.0/lib/ovirt/event.rb#L25-L485
>>>
>>> We could avoid this by adding to the API a new event attribute that
>>> indicates the type:
>>>
>>> <event href="/ovirt-engine/api/events/8021" id="8021">
>>> <code>19</code>
>>> <type>host_recover_failure</type>
>>> <description>Host myhost failed to recover.</description>
>>> ...
>>> </event>
>>>
>>> Ideally this should be defined as an enum, so that it will be
>>> represented as an enum in the SDKs. Alternatively it could just be an
>>> string, and we could reuse the 'name' attribute:
>>>
>>> <event href="/ovirt-engine/api/events/8021" id="8021">
>>> <code>19</code>
>>> <name>host_recover_failure</name>
>>> <description>Host myhost failed to recover.</description>
>>> ...
>>> </event>
>>>
>>> However, the key point to making this useful would be to keep the types
>>> (or names) backwards compatible, so that users of the API can rely on
>>> their values and meanings.
>>>
>>> So this is my question to you: can we commit to keep the names and
>>> meanings of the backend event types backwards compatible?
>>
>> Do we even have to make it bw compatible?
>> I guess it depends on the actual usage of those names…
>> The ovirt ruby gem itself doesn’t do much with it
>
> We need to make keep it backwards compatible or else tell users "don't
> rely on these values, as they may change without notice".
>
> The 'ovirt' gem doesn't do anything special, it just creates its own
> code to name mapping. But the users of the 'ovirt' gem (the ManageIQ
> oVirt provider) do rely on the name. For example:
>
>
> https://github.com/ManageIQ/manageiq-providers-ovirt/blob/master/app/mode...
>
> That means that if we ever change the meaning of a code the ManageIQ
> provider, for example, will break.
Right,then it indeed needs to stay stable.
But how is maintaining the enum string different from the code? It is
the same information, so if MIQ doesn't use the name directly then it
doesn't really matter if it's a code or string.
Perhaps deprecate the code and keep the name fixed?
Thanks,
michal
>
>>>
>>> Regards,
>>> Juan Hernandez
>>>
>>>
>>> _______________________________________________
>>> Devel mailing list
>>> Devel(a)ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/devel
>
7 years, 5 months
[ovirt-system-tests] ssh to an oVirt VM in Lago
by Valentina Makarova
Hello!
Please, help me to find way to execute some command in oVirt VM.
Is it possible to get ssh connection to non-host VM in LAGO?
And how can I get ssh connection through the console in my computer?
I installed ovirt-system-tests and run tests from basic-suite-master.
So there is 2 hosts and 3 vms in my configuration.
And I want to execute command inside the vm0 using LAGO (as part of my own
test).
It is easy for host vm and engine, there is method ''ssh"
in ovirt-engine-api-model.
And this task for host vm can be performed as there
prefix.virt_env.get_vm(VM_NAME).ssh(['bash_command_what_i_want'])
Please give me advice, can Iget connection to vm0 in a similar way?
And a second question is about ssh to this vm connection from my laptop's
console.
According run_vm test from 004_basic_sanity.py (
https://github.com/oVirt/ovirt-system-tests/blob/master/basic-suite-maste...
) vm0 should contain interface with ip 192.168.200.200, but ping this from
engine (192.168.200.4) Destination Host Unreachable. And 'ping vm0' defined
vm0 as 192.168.201.213 and also couldn't reach vm0.
And in webadmin (https://engine/ovirt-engine/webadmin/#vms) IP Address
field is empty.
What is a right way to get connection to vm0 console and execute some
command there?
Sincerely,
Valentina Makarova
7 years, 5 months
planned Jenkins restart
by Evgheni Dereveanchin
Hi everyone,
I'll be performing a planned Jenkins restart within the next hour.
No new jobs will be scheduled during this maintenance period.
I will inform you once it is over.
Regards,
Evgheni Dereveanchin
7 years, 5 months
Fwd: Lago v0.39 is out!
by Nadav Goldin
---------- Forwarded message ----------
From: Nadav Goldin <ngoldin(a)redhat.com>
Date: Sun, Jun 4, 2017 at 2:24 PM
Subject: Lago v0.39 is out!
To: lago-devel(a)ovirt.org
On behalf of the Lago team, I'm pleased to announce the new release of
Lago and Lago-ost-plugin:
Lago - v0.39
Lago-ost-plugin v0.41
This is the first release where we've separated Lago and
lago-ost-plugin(aka ovirtlago) to different repositories, installation
procedures should be the same. However, from now on the
lago-ost-plugin will follow a different release cycle. It's repository
can be found at [1], and docs at [2]. Note that 'lago-ost-plugin'
requires Lago >= 0.39.
What's new
=========
Lago
-------
1. Improved Ansible inventory support. For more details see [3].
2. Lago SDK - Allows to run most CLI operations directly from Python.
See [4] for the docs, and [5] for an example. This is mostly
standardization of the already provided SDK.
3. Debian network support in bootstrap stage.
Lago Images
-----------------
3 New images were added, please help in verifying them:
1. fc25-base
2. debian8-base
3. ubuntu16.04-base
There is a known issue with host name resolution after boot in debian,
but it does not affect connectivity.
Tests/CI
------------
1. Moved to tox to setup the virtualenv during the tests:
* `tox -e docs` - builds the docs.
* `tox -e py27` - run unittests and linters.
* `tox -c tox-sdk.ini -- --stage check_patch/check_merged` - to run
the functional SDK tests
for each stage(after you have installed lago - either in a
nested virtualenv or from RPMs).
2. Added SDK functional tests:
* Easy to run sanity check while developing, under tests/functional-sdk run:
`pytest -s -vvv --setup-show --stage check_patch test_sdk_sanity.py`
3. Added multi-distro tests, which means prior to merging every Lago
patch, we'll ensure the core images in templates.ovirt.org are
functional with the new patch.
4. Added ansible functional tests on check-merged.
For the full changelog see [6].
Upgrading
========
To upgrade using yum or dnf, simply run:
```
yum/dnf update lago
```
Resources
========
Lago Docs: http://lago.readthedocs.io/en/latest/
GitHub: https://github.com/lago-project/lago/
YUM Repository: http://resources.ovirt.org/repos/lago/stable/0.0/rpm/
OST Docs: http://ovirt-system-tests.readthedocs.io/en/latest/
As always, if you find any problems, please open an issue in the GitHub page.
Enjoy!
Nadav.
[1] https://github.com/lago-project/lago-ost-plugin
[2] http://lago-ost-plugin.readthedocs.io/en/latest/
[3] https://github.com/lago-project/lago/pull/544
[4] http://lago.readthedocs.io/en/stable/SDK.html
[5] https://github.com/lago-project/lago/blob/master/docs/examples/lago_sdk_o...
[6] https://github.com/lago-project/lago/compare/0.38...0.39
7 years, 5 months
[VDSM] flake8 3.0.4 failing vdsm builds
by Nir Soffer
Hi all,
flake8 started to fail today with import error, failing vdsm builds with
this error:
Traceback (most recent call last):
File "/home/nsoffer/src/vdsm/.tox/flake8/bin/flake8", line 7, in <module>
from flake8.main.cli import main
File
"/home/nsoffer/src/vdsm/.tox/flake8/lib/python2.7/site-packages/flake8/main/cli.py",
line 2, in <module>
from flake8.main import application
File
"/home/nsoffer/src/vdsm/.tox/flake8/lib/python2.7/site-packages/flake8/main/application.py",
line 14, in <module>
from flake8.main import options
File
"/home/nsoffer/src/vdsm/.tox/flake8/lib/python2.7/site-packages/flake8/main/options.py",
line 3, in <module>
from flake8.main import vcs
File
"/home/nsoffer/src/vdsm/.tox/flake8/lib/python2.7/site-packages/flake8/main/vcs.py",
line 4, in <module>
from flake8.main import mercurial
File
"/home/nsoffer/src/vdsm/.tox/flake8/lib/python2.7/site-packages/flake8/main/mercurial.py",
line 7, in <module>
import configparser
File "/usr/lib/python2.7/site-packages/configparser.py", line 12, in
<module>
from backports.configparser import (
ImportError: No module named configparser
I posted this patch updating tox to use flake8 3.1.0:
https://gerrit.ovirt.org/77727
Please rebase on this patch if your build fail.
Thanks,
Nir
7 years, 5 months
Using more specific types in code visible to GWT frontend
by Vojtech Szocs
Hello,
in GWT world, being more specific (e.g. using ArrayList instead of just
List) is preferred since the GWT compiler doesn't need to introspect all
possible subtypes and include them in the generated JavaScript. Using too
"generic" types is one of the main reasons of significant GWT-generated
JavaScript size.
I'd like to improve this and I'm wondering what others think.
For example, in BusinessEntity interface, is there any reason why <T
extends Serializable> and not e.g. <T extends Guid> ? If the GWT compiler
sees a reference to Serializable type and it isn't obvious what's the
instance type behind it, it includes *all* Serializable subtypes into the
generated JavaScript. You can probably imagine how many of those are
visible to GWT compiler via Java classpath.
Another example is query & action result allowing arbitrary List/Map/Set
impl. to be passed through GWT RPC. What about limiting us to ArrayList,
HashSet and HashMap for GWT RPC transfer? Please be aware that usual Java
performance tips do not apply to GWT world due to Java-to-JS compilation.
(And therefore, using LinkedList instead of ArrayList has no practical
effect aside from bigger JS footprint.)
I'd like both frontend and backend maintainers to share their thoughts.
Alexander's UI redesign efforts [1] are well on their way into the master
branch and it's a good opportunity to improve existing GWT frontend, making
it smaller & faster for our users.
[1] https://gerrit.ovirt.org/#/c/75669/
Thanks!
Vojtech
7 years, 5 months
Engine query & action result classes are now final
by Vojtech Szocs
Hi everyone,
yesterday, we merged https://gerrit.ovirt.org/#/c/75705/ which seals Engine
query & action result classes.
We will follow this up with renaming "VdcReturnValueBase" to
"ActionReturnValue" and doing similar renames to existing "VdcSomething"
classes.
The reason for finalizing those result classes is to avoid us implementing
a GWT custom field serializer for each such subclass, therefore limiting
our exposure to GWT RPC specifics when transferring objects between client
and server.
On a side note, we also upgraded GWT 2.8.0 to 2.8.1 which fixes a GWT
compiler bug we had to work around: https://gerrit.ovirt.org/#/c/77264/
Regards,
Vojtech
7 years, 5 months