dguest / pandamonium

Command line scripts to parse panda web api
BSD 3-Clause "New" or "Revised" License
28 stars 17 forks source link

Taskid/Pandaid confusion? #49

Closed mswiatlo closed 3 years ago

mswiatlo commented 3 years ago

HI,

I recently found that restarting jobs via the TaskID returned by pbook (with -t) has started to fail; this number apparently instead is corresponding to the PandaID. PBook used to be smart and accept either the TaskID or PandaID for the restart of the job, but now it really is demanding the TaskID. Can we change what is returned? Asoka said:

retry(taskid), not retry(pandaid). the task for the above is 23611708

(or you can use the reqID when you do a show() from pbook).

Does this request make sense or am I doing something wrong?

Cheers, Max

mswiatlo commented 3 years ago

For what it's worth I've adjusted my restart script to just do:

pandamon -d 31 -i failed  -a | awk '{print $2}' | panda-resub-taskid -n 1

And this works fine. So the -a option is already retrieving the right information.

dguest commented 3 years ago

This probably makes sense. I blame @lawrenceleejr because the thing returned by -t is apparently 'reqid', which sounds like another thing entirely. Larry was this your idea or mine? Why did we do it? Can we change it to 'jeditaskid'?

Anyway, sounds like the Danny Antrim option saves the day again. I mean, why would you ever not use the @dantrim option?

matthewfeickert commented 3 years ago

This probably makes sense. I blame @lawrenceleejr because the thing returned by -t is apparently 'reqid', which sounds like another thing entirely. Larry was this your idea or mine? Why did we do it? Can we change it to 'jeditaskid'?

Regardless we should make sure this is better documented as

$ pandamonium --version
pandamonium, version 0.2.1
$ pandamon --help | grep taskid
  -t, --taskid          output only taskid. useful for piping.

doesn't make this distinction clear.

lawrenceleejr commented 3 years ago

Totally agree. Looks like my fault. Indeed the reqid used to work in practice but probably should have always been the actual task ID. Almost definitely me not understanding the difference (still).

matthewfeickert commented 3 years ago

Almost definitely me not understanding the difference (still).

You aren't alone @lawrenceleejr. Is there public documentation on the difference between the two?

dguest commented 3 years ago

How about I just change it to give the Jedi taskid?

mswiatlo commented 3 years ago

Yeah, I don’t think the other one is useful for anything anymore.

mswiatlo commented 3 years ago

(And this isn’t anyone here’s fault per se— both used to work, and the change was unannounced as usual. Normal panda development fun!)

matthewfeickert commented 3 years ago

Is there public documentation on the difference between the two?

From the PanDA JEDI docs

JEDITASKID is the unique task identifier in JEDI. It comes from ATLAS_DEFT.PRODSYS2_TASK_ID_SEQ independently of T_TASK_REQUEST.REQID. Until DEFT is ready task requests come from AKTR T_TASK_REQUEST.REQID is stored in JEDI_TASKS.REQID which is mapped to job.TASKID.

So not super clear, but at least draws a distinciton.