[ovirt-devel] Re: [OST][hc-basic-suite-master] Fails on HE deployment

2018-09-18 Thread Sandro Bonazzola
Il giorno mer 19 set 2018 alle ore 06:54 Sahina Bose  ha
scritto:

>
>
> On Tue, Sep 11, 2018 at 5:24 PM Sahina Bose  wrote:
>
>>
>>
>> On Mon, Sep 3, 2018 at 7:00 PM, Sahina Bose  wrote:
>>
>>> xargs -I{} sudo -u vdsm dd if={} | tar -tvf -
>>> 772a3dfe-aee8-45d9-9df5-beddcbf92010.ovf\", u'removes': None, u'creates':
>>> None, u'chdir': None, u'stdin': None}}, u'stdout_lines': [], u'stderr':
>>> u\"vdsm-client: Command Image.prepare with args {'storagepoolID':
>>> 'e90984b6-af79-11e8-a2dd-00163e24d363', 'storagedomainID':
>>> 'b4c84ead-fb7f-4478-acd2-0309d569b9aa', 'volumeID':
>>> 'b18f30b1-5625-4581-b815-94291b226c79', 'imageID':
>>> '[u7894c850-665f-47dd-8376-e4da5ae7807f]'} failed:\\n(code=201,
>>> message=Volume does not exist:
>>> (u'b18f30b1-5625-4581-b815-94291b226c79',))\\ntar: This does not look like
>>> a tar archive
>>>
>>> Is this a known issue?
>>>
>>
>> vdsm log contains
>>
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 882, in 
>> _run
>> return fn(*args, **kargs)
>>   File "", line 2, in prepareImage
>>   File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 49, in 
>> method
>> ret = func(*args, **kwargs)
>>   File "/usr/lib/python2.7/site-packages/vdsm/storage/hsm.py", line 3176, in 
>> prepareImage
>> raise se.VolumeDoesNotExist(leafUUID)
>> VolumeDoesNotExist: Volume does not exist: 
>> (u'10730bab-8b24-4001-afde-a83659063c00',)
>>
>>
>> See
>> https://jenkins.ovirt.org/job/ovirt-system-tests_hc-basic-suite-master/684/artifact/exported-artifacts/test_logs/hc-basic-suite-master/post-002_bootstrap.py/lago-hc-basic-suite-master-host-0/_var_log/vdsm/vdsm.log
>>
>> Any clues as to what's going wrong? (Failing for the last 13 days)
>>
>>
> Turned out to be issue with ansible version - the play that filters out
> the disks returning wrong results with older ansible?
> CI passes with https://gerrit.ovirt.org/#/c/94415/. Can someone please
> merge?
>

Merged, thanks!


>
> thanks!
>
>
>>
>>> thanks!
>>> sahina
>>>
>>
>>

-- 

SANDRO BONAZZOLA

MANAGER, SOFTWARE ENGINEERING, EMEA R&D RHV

Red Hat EMEA 

sbona...@redhat.com


___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/DRIEABPEHY4YL4RKAGD6I3P3TYHMJLYA/


[ovirt-devel] Re: [OST][hc-basic-suite-master] Fails on HE deployment

2018-09-18 Thread Sahina Bose
On Tue, Sep 11, 2018 at 5:24 PM Sahina Bose  wrote:

>
>
> On Mon, Sep 3, 2018 at 7:00 PM, Sahina Bose  wrote:
>
>> xargs -I{} sudo -u vdsm dd if={} | tar -tvf -
>> 772a3dfe-aee8-45d9-9df5-beddcbf92010.ovf\", u'removes': None, u'creates':
>> None, u'chdir': None, u'stdin': None}}, u'stdout_lines': [], u'stderr':
>> u\"vdsm-client: Command Image.prepare with args {'storagepoolID':
>> 'e90984b6-af79-11e8-a2dd-00163e24d363', 'storagedomainID':
>> 'b4c84ead-fb7f-4478-acd2-0309d569b9aa', 'volumeID':
>> 'b18f30b1-5625-4581-b815-94291b226c79', 'imageID':
>> '[u7894c850-665f-47dd-8376-e4da5ae7807f]'} failed:\\n(code=201,
>> message=Volume does not exist:
>> (u'b18f30b1-5625-4581-b815-94291b226c79',))\\ntar: This does not look like
>> a tar archive
>>
>> Is this a known issue?
>>
>
> vdsm log contains
>
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/vdsm/storage/task.py", line 882, in 
> _run
> return fn(*args, **kargs)
>   File "", line 2, in prepareImage
>   File "/usr/lib/python2.7/site-packages/vdsm/common/api.py", line 49, in 
> method
> ret = func(*args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/vdsm/storage/hsm.py", line 3176, in 
> prepareImage
> raise se.VolumeDoesNotExist(leafUUID)
> VolumeDoesNotExist: Volume does not exist: 
> (u'10730bab-8b24-4001-afde-a83659063c00',)
>
>
> See
> https://jenkins.ovirt.org/job/ovirt-system-tests_hc-basic-suite-master/684/artifact/exported-artifacts/test_logs/hc-basic-suite-master/post-002_bootstrap.py/lago-hc-basic-suite-master-host-0/_var_log/vdsm/vdsm.log
>
> Any clues as to what's going wrong? (Failing for the last 13 days)
>
>
Turned out to be issue with ansible version - the play that filters out the
disks returning wrong results with older ansible?
CI passes with https://gerrit.ovirt.org/#/c/94415/. Can someone please
merge?

thanks!


>
>> thanks!
>> sahina
>>
>
>
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/BBAHLXX4QUSDCLE5DHNFV6KOYEODRHLY/


[ovirt-devel] Jenkins help

2018-09-18 Thread Germano Veit Michel
Hi,

I'm struggling with a check-patch failing. This is the error (I think):

[7;33m* Module vdsm.tool.update_volume [0m
[1;31mE [0m: 87,16: [1;31mInstance of '_Client' has no 'Host' member [0m (
[1;31mno-member [0m)
[1;31mE [0m:101,23: [1;31mInstance of '_Client' has no 'StoragePool' member
[0m ( [1;31mno-member [0m)

The way I understand it, the error above from [1] means that the check
patch fails because the cli object does not contain Host or StoragePool.
However, from reading the code it seems the Host and StoragePool members
are created at runtime by parsing the API schema. So static checking for
[2] and [3] fails.

I see some other tools doing similar things (i,e. dump_volume_chains), but
I can't find anything specific done to prevent it. Or am I missing
something?

Any idea on how to solve this?

[1]
https://jenkins.ovirt.org/job/vdsm_master_check-patch-el7-x86_64/25017/artifact/exported-artifacts/mock_logs/script/stdout_stderr.log
[2]
https://gerrit.ovirt.org/gitweb?p=vdsm.git;f=lib/vdsm/tool/update_volume.py;hb=refs/changes/05/94105/9#l193
[3]
https://gerrit.ovirt.org/gitweb?p=vdsm.git;f=lib/vdsm/tool/update_volume.py;hb=refs/changes/05/94105/9#l87

Thanks!
Germano
___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/K6BJPDQNUEARTHUCXX3PGDTBRDJJODCD/


[ovirt-devel] Re: Dealing with TaskID in vdsm api

2018-09-18 Thread Germano Veit Michel
Hi Marcin,

Yes, I know that. Let me try to be clearer.

1. My API command passes a JobID as argument.
2. VDSM creates a taskID for it once it starts running the command
3. I want to retrieve or define the taskID somehow.

The current API does show the TaskIDs and JobIDs. The JobID I know, but I
want to know the TaskID for the API command I submitted.

And the API does not have enough info to correlate the JobID with the
TaskID. See:

# vdsm-client Host getJobs
{
"8a4a6452-bb9c-11e8-8871-52540016c103": {
"status": "done",
"job_type": "storage",
"id": "8a4a6452-bb9c-11e8-8871-52540016c103",
"description": "update_volume"
},

# vdsm-client Host getAllTasks
{
"eb3f55af-c004-44af-8b28-87f8924a7623": {
"verb": "sdm_update_volume",
"code": 0,
"state": "finished",
"tag": "sdm",
"result": "",
"message": "1 jobs completed successfully",
"id": "eb3f55af-c004-44af-8b28-87f8924a7623"
},

I want to somehow retrieve or define the taskID
(eb3f55af-c004-44af-8b28-87f8924a7623) after using the following
update_volume command:

~~~
from vdsm import client
cli = client.connect('localhost', 54321, use_tls=True)
cli.SDM.update_volume(job_id=job, vol_info=vol, vol_attr=changes)
~~~


On Wed, Sep 19, 2018 at 4:52 AM Marcin Sobczyk  wrote:

> From what I can see in:
> https://github.com/oVirt/vdsm/blob/0725f32994293514d3275528c44687e8e800d6a6/lib/vdsm/storage/hsm.py#L3586
> you should try and query sdm jobs by using Host.getJobs API call.
>
> On 9/18/18 6:50 AM, Germano Veit Michel wrote:
>
> Hi Marcin,
>
> Thanks for replying. In short, this is what I am doing:
>
> ~~~
> from vdsm import client
> cli = client.connect('localhost', 54321, use_tls=True)
> cli.SDM.update_volume(job_id=job, vol_info=vol, vol_attr=changes)
> ~~~
>
> This last line does an API call. A taskID is generated in vdsm, I can only
> specify the JobID as a parameter of the call. From what I read, the taskID
> should be sent on the HTTP header if I want to set it. But I cannot find
> how to do it.
> The whole point is that I want to know the taskID, so I can monitor the
> task and clear it after it is finished.
>
> So:
> * How do I retrieve the taskID vdsm generated for this?
> or
> * How to I query VDSM to give me the taskID for the JobID I passed as
> argument
> or
> * How can I specify the taskID to be used given I'm using vdsm client
> (from vdsm import client).
> or
> * any other idea you have on how to handle this?
>
> Am I missing something or there is some missing implementation for doing
> this?
>
> Thanks
>
> On Mon, Sep 17, 2018 at 10:19 PM Marcin Sobczyk 
> wrote:
>
>> Hi,
>>
>> I'm currently doing some work around vdsm API so maybe I can. I need some
>> more detailed description of your problem though - a pseudo-code of the
>> calls you're making with explanation what exactly is the problem would be
>> ideal.
>>
>> Marcin
>> On 9/17/18 7:04 AM, Germano Veit Michel wrote:
>>
>> Hello,
>>
>> I've been struggling with TaskID/FlowID when talking to the VDSM API. I
>> am trying to write a tool that uses the vdsm-api to facilitate the
>> troubleshooting of image issues (snapshots). This tool does a series of API
>> calls, but I cannot find a nice way to track the taskID and clear the
>> completed tasks after completion of the tool commands. Currently I'm
>> clearing all Tasks that match the verb and are finished, which is not
>> ideal. I would like to have the exact TaskID to track and dont want to
>> leave Tasks behind. I don't want also to clear tasks from other entities
>> (like engine!).
>>
>> I understand that if I want to specify the task/flow ids when calling the
>> vdsm API, these two need to be passed as headers (http) so they end up in
>> the context of the call. Is this correct? But using vdsm/client.py I cannot
>> figure out how to do this, but I understand it is possible.
>>
>> I've been looking at vdsm/common/api.py and vdsm/client.py and trying
>> several things but nothing seems to do it. Could anyone please put some
>> light on this?
>>
>> Thanks,
>> Germano
>>
>> ___
>> Devel mailing list -- devel@ovirt.org
>> To unsubscribe send an email to devel-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct: 
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives: 
>> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/MSWIR7AEWS7U7N26ODTYWHGGDPELXKY2/
>>
>> ___
>> Devel mailing list -- devel@ovirt.org
>> To unsubscribe send an email to devel-le...@ovirt.org
>> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> oVirt Code of Conduct:
>> https://www.ovirt.org/community/about/community-guidelines/
>> List Archives:
>> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/J3UUC3EBLGUEATMUSSTLV73XJ4KHNIYP/
>>
>
_

[ovirt-devel] Re: Dealing with TaskID in vdsm api

2018-09-18 Thread Marcin Sobczyk
From what I can see in: 
https://github.com/oVirt/vdsm/blob/0725f32994293514d3275528c44687e8e800d6a6/lib/vdsm/storage/hsm.py#L3586

you should try and query sdm jobs by using Host.getJobs API call.

On 9/18/18 6:50 AM, Germano Veit Michel wrote:

Hi Marcin,

Thanks for replying. In short, this is what I am doing:

~~~
from vdsm import client
cli = client.connect('localhost', 54321, use_tls=True)
cli.SDM.update_volume(job_id=job, vol_info=vol, vol_attr=changes)
~~~

This last line does an API call. A taskID is generated in vdsm, I can 
only specify the JobID as a parameter of the call. From what I read, 
the taskID should be sent on the HTTP header if I want to set it. But 
I cannot find how to do it.
The whole point is that I want to know the taskID, so I can monitor 
the task and clear it after it is finished.


So:
* How do I retrieve the taskID vdsm generated for this?
or
* How to I query VDSM to give me the taskID for the JobID I passed as 
argument

or
* How can I specify the taskID to be used given I'm using vdsm client 
(from vdsm import client).

or
* any other idea you have on how to handle this?

Am I missing something or there is some missing implementation for 
doing this?


Thanks

On Mon, Sep 17, 2018 at 10:19 PM Marcin Sobczyk > wrote:


Hi,

I'm currently doing some work around vdsm API so maybe I can. I
need some more detailed description of your problem though - a
pseudo-code of the calls you're making with explanation what
exactly is the problem would be ideal.

Marcin

On 9/17/18 7:04 AM, Germano Veit Michel wrote:

Hello,

I've been struggling with TaskID/FlowID when talking to the VDSM
API. I am trying to write a tool that uses the vdsm-api to
facilitate the troubleshooting of image issues (snapshots). This
tool does a series of API calls, but I cannot find a nice way to
track the taskID and clear the completed tasks after completion
of the tool commands. Currently I'm clearing all Tasks that match
the verb and are finished, which is not ideal. I would like to
have the exact TaskID to track and dont want to leave Tasks
behind. I don't want also to clear tasks from other entities
(like engine!).

I understand that if I want to specify the task/flow ids when
calling the vdsm API, these two need to be passed as headers
(http) so they end up in the context of the call. Is this
correct? But using vdsm/client.py I cannot figure out how to do
this, but I understand it is possible.

I've been looking at vdsm/common/api.py and vdsm/client.py and
trying several things but nothing seems to do it. Could anyone
please put some light on this?

Thanks,
Germano

___
Devel mailing list --devel@ovirt.org  
To unsubscribe send an email todevel-le...@ovirt.org  

Privacy Statement:https://www.ovirt.org/site/privacy-policy/
oVirt Code of 
Conduct:https://www.ovirt.org/community/about/community-guidelines/
List 
Archives:https://lists.ovirt.org/archives/list/devel@ovirt.org/message/MSWIR7AEWS7U7N26ODTYWHGGDPELXKY2/

___
Devel mailing list -- devel@ovirt.org 
To unsubscribe send an email to devel-le...@ovirt.org

Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:

https://lists.ovirt.org/archives/list/devel@ovirt.org/message/J3UUC3EBLGUEATMUSSTLV73XJ4KHNIYP/

___
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/devel@ovirt.org/message/GJLCSADDDN5UYTSYPGXIMBFETYNFIRV6/


[ovirt-devel] Re: Error Java SDK Issue??

2018-09-18 Thread Geschwentner, Patrick
Thank you very much



Patrick Geschwentner MSc, Customer Success Manager 
patrick.geschwent...@mindbreeze.com

Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria 

M   +43 664 606162-161
P   +43 732 606162 161
F   +43 732 606162-609
www.mindbreeze.com
  
Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung

-Ursprüngliche Nachricht-
Von: Ondra Machacek  
Gesendet: Dienstag, 18. September 2018 12:25
An: Geschwentner, Patrick ; Joey Ma 

Cc: devel 
Betreff: Re: AW: [ovirt-devel] Re: Error Java SDK Issue??

I just released new SDK with Joey's fix, it's available in maven:

  https://repo.maven.apache.org/maven2/org/ovirt/engine/api/sdk/4.2.5/

On 9/17/18 11:47 AM, Geschwentner, Patrick wrote:
> Hi!
> Is the patch also already in the maven-repository:
> https://mvnrepository.com/artifact/org.ovirt.engine.api/sdk/4.2.4
> I still get the error in this code:
> 
> vmService = vmsService.vmService(vm.id());
> ListRequest diskListRequest= 
> vmService.diskAttachmentsService().list();
> ListResponse diskListResponse=diskListRequest.send();
> ….
> Disk currDisk = ovirtConnection.followLink(diskAttachment.disk()); ==> 
> ERROR
> 
> Best regards
> 
> Patrick Geschwentner
> 
> [MINDBREEZE-ILLUMINATING-250x44]
> 
> Patrick Geschwentner MSc, Customer Success Manager 
> patrick.geschwent...@mindbreeze.com eeze.com>
> 
> Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria
> 
> M +43 664 606162-161
> P  +43 732 606162 161
> F  +43 732 606162-609
> www.mindbreeze.com
> [cid:image002.png@01CEA31B.85720650] ze>[cid:image003.png@01CEA31B.85720650] > [cid:image004.png@01CEA31B.85720650] 
>   
> [cid:image005.png@01CEA31B.85720650] 
> 
> Handelsgericht Linz, FN 262155y
> Mindbreeze Datenschutzerklärung
> 
> Von: Joey Ma 
> Gesendet: Montag, 10. September 2018 09:54
> An: Geschwentner, Patrick 
> Cc: Ondra Machacek ; devel 
> Betreff: Re: [ovirt-devel] Re: Error Java SDK Issue??
> 
> Hi all,
> 
> The patch to fix this has been committed via [1]. Basically the new code 
> forces the obtain method to be the one with no parameters specified. In 
> addition, if no obtain method found, do throw NoSuchMethodException error.
> 
> @Ondra, could you please help me to review it? Great thanks.
> 
> [1]: https://gerrit.ovirt.org/#/c/94244/
> 
> On Mon, Sep 10, 2018 at 12:04 PM Joey Ma 
> mailto:majunj...@gmail.com>> wrote:
> Hi Patrick, Ondra,
> 
> This issue could be reproduced in my local dev environment. After digging 
> into the Java SDK, the issue probably is caused by getting the wrong method 
> to invoke.
> 
> Although the `DiskService.GetResponse` defined in API model has only a single 
> @Out (getter) method `Disk disk()`, the Java SDK generator adds a additional 
> setter method `void disk(Disk disk)` in `DiskService.GetResponse` class. The 
> code here [1] use `getResponse.getClass().getDeclaredMethods()[0]` to fetch 
> the method for getting the Disk, while it actually get the method `void 
> disk(Disk disk)`, which obviously produces the `wrong number of arguments` 
> error.
> 
> This issue also affect fetching list of objects via `connection.link()`. I 
> could get this fixed and commit a PR in gerrit soon.
> 
> Please correct me if I'm wrong or missing anything. Thanks.
> 
> [1]: 
> https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/sdk/src/mai
> n/java/org/ovirt/engine/sdk4/internal/HttpConnection.java#L198
> 
> 
> On Fri, Sep 7, 2018 at 4:35 PM Geschwentner, Patrick 
> mailto:patrick.geschwent...@mindbreeze.com>>
>  wrote:
> More details:
> java.lang.IllegalArgumentException: wrong number of arguments wrong 
> number of arguments
> org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: 
> Type has not been loaded occurred while retrieving component type of array.
> 
> 
> Patrick Geschwentner MSc, Customer Success Manager 
> patrick.geschwent...@mindbreeze.com eeze.com>
> 
> 
> Handelsgericht Linz, FN 262155y
> Mindbreeze Datenschutzerklärung
> 
> 
> -Ursprüngliche Nachricht-
> Von: Geschwentner, Patrick
> Gesendet: Freitag, 7. September 2018 09:45
> An: 'Ondra Machacek' 
> mailto:omach...@redhat.com>>; 
> devel@ovirt.org
> Betreff: AW: [ovirt-devel] Error Java SDK Issue??
> 
> Dear Mr. Machacek!
> Here you are:
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
> details.
> Cloning .. (My custom log)
> wrong number of arguments --- This is the error which occurs.
> You need something more?
> Best regards
> 
> 
> 
> Patrick Geschwentner MSc, Customer Success Manager 
> patrick

[ovirt-devel] Re: Error Java SDK Issue??

2018-09-18 Thread Ondra Machacek

I just released new SDK with Joey's fix, it's available in maven:

 https://repo.maven.apache.org/maven2/org/ovirt/engine/api/sdk/4.2.5/

On 9/17/18 11:47 AM, Geschwentner, Patrick wrote:

Hi!
Is the patch also already in the maven-repository:
https://mvnrepository.com/artifact/org.ovirt.engine.api/sdk/4.2.4
I still get the error in this code:

vmService = vmsService.vmService(vm.id());
ListRequest diskListRequest= vmService.diskAttachmentsService().list();
ListResponse diskListResponse=diskListRequest.send();
….
Disk currDisk = ovirtConnection.followLink(diskAttachment.disk()); ==> ERROR

Best regards

Patrick Geschwentner

[MINDBREEZE-ILLUMINATING-250x44]

Patrick Geschwentner MSc, Customer Success Manager
patrick.geschwent...@mindbreeze.com

Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria

M +43 664 606162-161
P  +43 732 606162 161
F  +43 732 606162-609
www.mindbreeze.com
[cid:image002.png@01CEA31B.85720650][cid:image003.png@01CEA31B.85720650]
 [cid:image004.png@01CEA31B.85720650]   
[cid:image005.png@01CEA31B.85720650] 
Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung

Von: Joey Ma 
Gesendet: Montag, 10. September 2018 09:54
An: Geschwentner, Patrick 
Cc: Ondra Machacek ; devel 
Betreff: Re: [ovirt-devel] Re: Error Java SDK Issue??

Hi all,

The patch to fix this has been committed via [1]. Basically the new code forces 
the obtain method to be the one with no parameters specified. In addition, if 
no obtain method found, do throw NoSuchMethodException error.

@Ondra, could you please help me to review it? Great thanks.

[1]: https://gerrit.ovirt.org/#/c/94244/

On Mon, Sep 10, 2018 at 12:04 PM Joey Ma 
mailto:majunj...@gmail.com>> wrote:
Hi Patrick, Ondra,

This issue could be reproduced in my local dev environment. After digging into 
the Java SDK, the issue probably is caused by getting the wrong method to 
invoke.

Although the `DiskService.GetResponse` defined in API model has only a single 
@Out (getter) method `Disk disk()`, the Java SDK generator adds a additional 
setter method `void disk(Disk disk)` in `DiskService.GetResponse` class. The 
code here [1] use `getResponse.getClass().getDeclaredMethods()[0]` to fetch the 
method for getting the Disk, while it actually get the method `void disk(Disk 
disk)`, which obviously produces the `wrong number of arguments` error.

This issue also affect fetching list of objects via `connection.link()`. I 
could get this fixed and commit a PR in gerrit soon.

Please correct me if I'm wrong or missing anything. Thanks.

[1]: 
https://github.com/oVirt/ovirt-engine-sdk-java/blob/master/sdk/src/main/java/org/ovirt/engine/sdk4/internal/HttpConnection.java#L198


On Fri, Sep 7, 2018 at 4:35 PM Geschwentner, Patrick 
mailto:patrick.geschwent...@mindbreeze.com>>
 wrote:
More details:
java.lang.IllegalArgumentException: wrong number of arguments
wrong number of arguments
org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: 
Type has not been loaded occurred while retrieving component type of array.


Patrick Geschwentner MSc, Customer Success Manager
patrick.geschwent...@mindbreeze.com


Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung


-Ursprüngliche Nachricht-
Von: Geschwentner, Patrick
Gesendet: Freitag, 7. September 2018 09:45
An: 'Ondra Machacek' mailto:omach...@redhat.com>>; 
devel@ovirt.org
Betreff: AW: [ovirt-devel] Error Java SDK Issue??

Dear Mr. Machacek!
Here you are:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further 
details.
Cloning .. (My custom log)
wrong number of arguments --- This is the error which occurs.
You need something more?
Best regards



Patrick Geschwentner MSc, Customer Success Manager 
patrick.geschwent...@mindbreeze.com

Mindbreeze GmbH | Honauerstraße 2 | 4020 Linz | Austria


Handelsgericht Linz, FN 262155y
Mindbreeze Datenschutzerklärung

-Ursprüngliche Nachricht-
Von: Ondra Machacek mailto:omach...@redhat.com>>
Gesendet: Freitag, 7. September 2018 09:29
An: Geschwentner, Patrick 
mailto:patrick.geschwent...@mindbreeze.com>>; 
devel@ovirt.org
Betreff: Re: [ovirt-devel] Error Java SDK Issue??

Can you please share Java SDK debug log?

On 09/05/2018 04:44 PM, Geschwentner, Patrick wrote:

Dear Ladies and Gentlemen!
I am currently working with the java-sdk and I encountered a problem.
If I would like to retrieve the disk details, I get the following error:
 Disk currDisk =
ovirtConnection.followLi