Where to place useful Ansible recipe?
by Vojtech Juranek
Hi,
the result of working on BZ #1310330 [1] is Ansible recipe, which removes
multipath devices for unzoned LUN from the hosts. The recipe is attached to
the BZ, but it would be good to put it somewhere in into the code base.
IIUC Ansible recipes contained in engine project are used internally by the
engine, but this is not the right place (can be in the future if we implement
some UI in the engine which will trigger this recipe).
Is ovirt-engine/contrib [2] the right place or is there a better place?
Thanks
Vojta
[1] http://bugzilla.redhat.com/1310330
[2] https://github.com/oVirt/ovirt-engine/tree/master/contrib
3 years, 8 months
corrupted jar ; jackson-mapper dependency 4.4.5?
by Prajith Kesava Prasad
Hi everyone,
So while calling createBrickCommand playbook from ovirt-engine
(createBrickCommand.java) a parameter called disks are constructed to parse
a list of disks.
Its implementation contains a class variable ArrayNode which uses
JsonNodeFactory,
from jackson-mapper dependency .
Usually parsing of disks to playbook would contain a list of disks, but now
it's parsing the absurd values of JsonNodeFactory, and parsing a weird
dictionary:-
Snip of the parameters parsed from ovirt-engine to ansible-runner
*<snip>elements': [{'textValue': '/dev/sdc', 'binaryValue': '/dev/sdc',
'textual': True, 'valueNode': True, 'numberType': None, 'elements': [],
'array': False, 'fields': [], 'null': False, 'binary': False,
'booleanValue': False, 'numberValue': None, 'decimalValue': 0,
'bigIntegerValue': 0, 'valueAsText': '/dev/sdc', 'valueAsInt': 0,
'valueAsLong': 0, 'valueAsDouble': 0.0, 'valueAsBoolean': False,
'containerNode': False, 'missingNode': False, 'pojo': False, 'number':
False, 'integralNumber': False, 'floatingPointNumber': False, 'int': False,
'long': False, 'double': False, 'bigDecimal': False, 'bigInteger': False,
'boolean': False, 'object': False, 'fieldNames': [], 'longValue': 0,
'doubleValue': 0.0, 'intValue': 0}], 'array': True, 'valueAsText': None,
'containerNode': True, 'numberType': None, 'fields': [], 'null': False,
'binary': False, 'textValue': None, 'binaryValue': None, 'booleanValue':
False, 'numberValue': None, 'decimalValue': 0, 'bigIntegerValue': 0,
'valueAsInt': 0, 'valueAsLong': 0, 'valueAsDouble': 0.0, 'valueAsBoolean':
False, 'valueNode': False, 'missingNode': False, 'pojo': False, 'number':
False, 'integralNumber': False, 'floatingPointNumber': False, 'int': False,
'long': False, 'double': False, 'bigDecimal': False, 'bigInteger': False,
'textual': False, 'boolean': False, 'object': False, 'fieldNames': [],
'longValue': 0, 'doubleValue': 0.0, 'intValue': 0}</snip>*
these values represent the Class variables of JsonNodeFactory class in the
Jackson-mapper dependency instantiated from ArrayNode in
CreateBrickCommand.java class.
Is my understanding flawed, or did we upgrade to a maybe corrupted
dependency? or does this have any other problem which I missed out on?
( tested with RHV 4.4.5 latest build - 4.4.5.7-0.1.el8ev )
Regards,
Prajith Kesava Prasad.
3 years, 8 months
basic-suite fails with: "... is not signed Error: GPG check FAILED"
by Yedidyah Bar David
Hi all,
Now happened in [1]:
STDERR
b'warning: /var/cache/dnf/ovirt-master-copr:copr.fedorainfracloud.org:sbonazzo:EL8_collection-7f7c2d939ff8f7bc/packages/python3-pyyaml-5.1.2-3.el8.x86_64.rpm:
Header V3 RSA/SHA1 Signature, key ID 119783d1: NOKEY\nImporting GPG
key 0x119783D1:\n Userid : "sbonazzo_EL8_collection (None)
<sbonazzo#EL8_collection(a)copr.fedorahosted.org>"\n Fingerprint: 42A2
7AF4 DCA1 3DC7 02B2 E8BE 35CB 6F97 1197 83D1\n From :
https://copr-be.cloud.fedoraproject.org/results/sbonazzo/EL8_collection/p...
ovirt-engine-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-backend-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-dbscripts-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-restapi-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-base-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-cinderlib-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-imageio-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-ovirt-engine-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-ovirt-engine-common-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-setup-plugin-websocket-proxy-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-tools-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-tools-backup-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-vmconsole-proxy-helper-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-webadmin-portal-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
ovirt-engine-websocket-proxy-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nPackage
python3-ovirt-engine-lib-4.4.6-0.0.master.20210310114158.git5d97629b1af.el8.noarch.rpm
is not signed\nError: GPG check FAILED\n'
Known issue? I have vague memories about this being reported, not sure.
Perhaps we publish to tested repo before signing? And if a job runs in
the middle, it will get unsigned packages?
Thanks and best regards,
[1] https://jenkins.ovirt.org/job/ovirt-system-tests_standard-check-patch/15924/
--
Didi
3 years, 8 months
test_ha_recovery failed (was: [oVirt Jenkins] ovirt-system-tests_he-basic-suite-master - Build # 1943 - Still Failing!)
by Yedidyah Bar David
On Sun, Mar 7, 2021 at 5:12 AM <jenkins(a)jenkins.phx.ovirt.org> wrote:
>
> Project: https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-master/
> Build: https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-master/1943/
Failed during -basic-suite-master.test-scenarios.test_004_basic_sanity.test_ha_recovery
due to timeout. Can't tell exactly why. Now rebuilt, to see if it
happens again. Basic suite did pass this point with (mostly) the same
code, and there shouldn't be anything HE-specific in this test. FYI.
Some more details:
The function is:
@order_by(_TEST_LIST)
def test_ha_recovery(engine_api, get_ansible_host_for_vm):
engine = engine_api.system_service()
with engine_utils.wait_for_event(engine, [119, 9602, 506]):
# VM_DOWN_ERROR event(119)
# HA_VM_FAILED event event(9602)
# VDS_INITIATED_RUN_VM event(506)
ansible_host = get_ansible_host_for_vm(VM2_NAME)
pid = ansible_host.shell('pgrep -f qemu.*guest=vm2')['stdout'].strip()
ansible_host.shell('kill -KILL {}'.format(pid))
vm_service = test_utils.get_vm_service(engine, VM2_NAME)
assertions.assert_true_within_long(
lambda:
vm_service.get().status == types.VmStatus.UP
)
with engine_utils.wait_for_event(engine, 33): # USER_STOP_VM event
vm_service.stop()
It failed inside the 'with' statement. Can't find any of the expected
events in engine.log. In last successful I see all three of them.
We do not actively log anything about running the pgrep command, but
it's logged by ansible on the host, to /var/log/messages. I see it in
last successful, but not in above failed run, in any of the two hosts.
So most likely it didn't even get to run pgrep.
IMO we probably want some more information logged in such a case, to
allow further investigation.
Best regards,
> Build Number: 1943
> Build Status: Still Failing
> Triggered By: Started by timer
>
> -------------------------------------
> Changes Since Last Success:
> -------------------------------------
> Changes for Build #1939
> [hbraha] ost: Check if user custom repos are used on VM
>
>
> Changes for Build #1940
> [hbraha] network: add check_repos fixture
>
>
> Changes for Build #1941
> [Andrej Cernek] network, pylint: Simplify pylintrc file
>
>
> Changes for Build #1942
> [Andrej Cernek] network, pylint: Simplify pylintrc file
>
>
> Changes for Build #1943
> [Andrej Cernek] network, pylint: Simplify pylintrc file
>
>
>
>
> -----------------
> Failed Tests:
> -----------------
> 1 tests failed.
> FAILED: he-basic-suite-master.test-scenarios.test_004_basic_sanity.test_ha_recovery
>
> Error Message:
> AssertionError: False != True after 600 seconds
>
> Stack Trace:
> engine_api = <ovirtsdk4.Connection object at 0x7f408114c1d0>
> get_ansible_host_for_vm = <function get_ansible_host_for_vm.<locals>.ansible_host_for at 0x7f4081171950>
>
> @order_by(_TEST_LIST)
> def test_ha_recovery(engine_api, get_ansible_host_for_vm):
> engine = engine_api.system_service()
> with engine_utils.wait_for_event(engine, [119, 9602, 506]):
> # VM_DOWN_ERROR event(119)
> # HA_VM_FAILED event event(9602)
> # VDS_INITIATED_RUN_VM event(506)
> ansible_host = get_ansible_host_for_vm(VM2_NAME)
> pid = ansible_host.shell('pgrep -f qemu.*guest=vm2')['stdout'].strip()
> > ansible_host.shell('kill -KILL {}'.format(pid))
>
> ../he-basic-suite-master/test-scenarios/test_004_basic_sanity.py:1070:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> /usr/lib64/python3.6/contextlib.py:88: in __exit__
> next(self.gen)
> ../ost_utils/ost_utils/engine_utils.py:42: in wait_for_event
> lambda:
> ../ost_utils/ost_utils/assertions.py:96: in assert_true_within_long
> assert_equals_within_long(func, True, allowed_exceptions)
> ../ost_utils/ost_utils/assertions.py:81: in assert_equals_within_long
> func, value, LONG_TIMEOUT, allowed_exceptions=allowed_exceptions
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> func = <function wait_for_event.<locals>.<lambda> at 0x7f40810d5bf8>
> value = True, timeout = 600, allowed_exceptions = [], initial_wait = 0
> error_message = 'False != True after 600 seconds'
>
> def assert_equals_within(
> func, value, timeout, allowed_exceptions=None, initial_wait=10,
> error_message=None
> ):
> allowed_exceptions = allowed_exceptions or []
> res = '<no-result-obtained>'
> with _EggTimer(timeout) as timer:
> while not timer.elapsed():
> try:
> res = func()
> if res == value:
> return
> except Exception as exc:
> if _instance_of_any(exc, allowed_exceptions):
> time.sleep(3)
> continue
>
> LOGGER.exception("Unhandled exception in %s", func)
> raise
>
> if initial_wait == 0:
> time.sleep(3)
> else:
> time.sleep(initial_wait)
> initial_wait = 0
> try:
> if error_message is None:
> error_message = '%s != %s after %s seconds' % (res, value, timeout)
> > raise AssertionError(error_message)
> E AssertionError: False != True after 600 seconds
>
> ../ost_utils/ost_utils/assertions.py:59: AssertionError
--
Didi
3 years, 8 months
Re: Starting a defined VM on a different host
by Benny Zlotnik
Not too familiar with this, but maybe this example will help[1]
[1]
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/pin_vm.py
On Mon, Mar 8, 2021 at 3:41 PM Lavi Buchnik via Devel <devel(a)ovirt.org>
wrote:
> Hi Shani,
>
>
>
> Thanks for your reply. I’m aware for how to set it in the UI.
>
> Note that because the VM is defined with Affinity label, I must first
> remove the affinity label from the VM and only than to choose a different
> host as you specified below (via the UI).
>
> But my question is for how to set a different host using Python SDK API.
>
>
>
> I tried/plan this via Python SDK API:
>
>
>
> - Stop the VM.
>
> - Remove its Affinity label.
>
> - Update its host to the target host.
>
> - Start the VM.
>
>
>
> But the result is that the VM is always keep starting on its current host.
>
> For updating the VM host, I used few ways as:
>
> vm_service.update( types.Vm( host=types.Host( id=host_id ), ) )
>
>
>
> Or:
>
>
>
> vm_service.update( types.Vm( host=types.Host( name=host_name ), ) )
>
>
>
> Then started the VM using:
>
> vm_service.start()
>
>
>
> or using:
>
> vm_service.start( vm=types.Vm( host=types.Host( name=host_name ), ) )
>
> vm_service.start( vm=types.Vm( host=types.Host( id=host_id ), ) )
>
>
>
> I get no errors, but VM keeps starting on the current host and not on the
> new target host.
>
> BTW - in case it would start on the target host, the plan is to add
> affinity label back just after.
>
>
>
> Thanks,
>
> Lavi Buchnik
>
>
>
> *From:* Shani Leviim <sleviim(a)redhat.com>
> *Sent:* Monday, March 08, 2021 2:36 PM
> *To:* Lavi Buchnik <Lavi.Buchnik(a)exlibrisgroup.com>
> *Cc:* devel <devel(a)ovirt.org>
> *Subject:* Re: [ovirt-devel] Re: Starting a defined VM on a different host
>
>
>
> *CAUTION: *EXTERNAL Email.
>
> Hi,
>
> You can set this one from the UI:
>
> VM > Edit > Show advanced options (bottom left button) > host > Start
> running on > specific host
>
>
>
> *Regards,*
>
> *Shani Leviim*
>
>
>
>
>
> On Mon, Mar 8, 2021 at 10:33 AM Lavi.Buchnik--- via Devel <devel(a)ovirt.org>
> wrote:
>
> Hi,
>
> Can anyone help here?
>
> Thanks,
> Lavi
> _______________________________________________
> Devel mailing list -- devel(a)ovirt.org
> To unsubscribe send an email to devel-leave(a)ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> <https://urldefense.com/v3/__https:/www.ovirt.org/privacy-policy.html__;!!...>
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> <https://urldefense.com/v3/__https:/www.ovirt.org/community/about/communit...>
> List Archives:
> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/ZPB676EUPWZ...
> <https://urldefense.com/v3/__https:/lists.ovirt.org/archives/list/devel@ov...>
>
> _______________________________________________
> Devel mailing list -- devel(a)ovirt.org
> To unsubscribe send an email to devel-leave(a)ovirt.org
> Privacy Statement: https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/S4DZTJCLKIL...
>
3 years, 8 months
Vdsm: ovirt-4.4.5 branch created
by Milan Zamazal
Hi,
ovirt-4.4.5 branch has been created in Vdsm, you can use it for
contingent 4.4.5 backports.
Regards,
Milan
3 years, 8 months