On Thu, Sep 20, 2018 at 5:08 PM Piotr Kliczewski <pkliczew@redhat.com> wrote:On Thu, Sep 20, 2018 at 12:55 AM, Germano Veit Michel <germano@redhat.com> wrote:On Thu, Sep 20, 2018 at 7:14 AM Nir Soffer <nsoffer@redhat.com> wrote:On Mon, 17 Sep 2018, 8:06 Germano Veit Michel, <germano@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 internalimplementation detail which will likely disappear in future version. You don'needto monitor or clean the internal tasks, they are managed by the storage jobsframework 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 isin 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.