On Fri, Sep 21, 2018 at 3:45 AM, Germano Veit Michel <germano(a)redhat.com>
wrote:
On Thu, Sep 20, 2018 at 5:08 PM Piotr Kliczewski <pkliczew(a)redhat.com>
wrote:
>
>
> On Thu, Sep 20, 2018 at 12:55 AM, Germano Veit Michel <germano(a)redhat.com
> > wrote:
>
>>
>>
>> On Thu, Sep 20, 2018 at 7:14 AM Nir Soffer <nsoffer(a)redhat.com> wrote:
>>
>>>
>>>
>>> On Mon, 17 Sep 2018, 8:06 Germano Veit Michel, <germano(a)redhat.com>
>>> 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!).
>>>>
>>>
>>> Storage jobs are managed using (client generated) job id. The task id
>>> is internal
>>> implementation detail which will likely disappear in future version.
>>> You don'need
>>> to monitor or clean the internal tasks, they are managed by the storage
>>> jobs
>>> framework for you.
>>>
>>
>> Thanks for the clarification Nir!
>>
>>
>>> You can check engine code to understand how storage jobs are managed.
>>>
>>>
>>>> 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.
>>>>
>>>
>>> This is not possible now, but sounds like a good idea. Please file RFE
>>> to add this,
>>> or if you have the time you can try to add. Looks like the place you
>>> can add it is
>>> in lib/yajsonrpc/stompclient.py - ClientRpcTransportAdapter.send().
>>>
>>
>> Nice, I'll take a look.
>>
>>
>>>
>>> Piotr, what do you think?
>>>
>>
> I agree. In situations like this it would be great to be able to provide
> flow_id. It is possible to provide it in java based client [1].
> Please open an RFE and we will implement it for you.
>
Thanks! I can help testing it as soon as you submit a patch, will cherry
pick it once you send.
RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=1631587
> [1]
https://github.com/oVirt/vdsm-jsonrpc-java/blob/
> d964c7ea4aa841972c66c737a7787db6e4a40fad/client/src/main/
> java/org/ovirt/vdsm/jsonrpc/client/reactors/stomp/impl/Message.java#L73
>
>
>>
>>> Nir
>>>
>>
>