Skip to content

New attempt at #411 (adding extra argument to condor_submit) - #514

Merged
guillaumeeb merged 20 commits into
dask:mainfrom
riedel:pr/411-extra-commands
Oct 5, 2021
Merged

guillaumeeb merged 20 commits into
dask:mainfrom
riedel:pr/411-extra-commands

Conversation

@riedel

@riedel riedel commented Sep 4, 2021 •

Copy link
Copy Markdown
Member

I think I might have found the problems in #434

matyasselmeci and others added 14 commits May 26, 2020 12:34
`submit_command_extra` and `cancel_command_extra` (config options
`jobqueue.X.submit-command-extra` and `jobqueue.X.cancel-command-extra`)
are lists of strings that are arguments passed on as-is to `condor_submit`
and `condor_rm` when submitting or removing HTCondor jobs.
Some htcondor parameters (e.g. "-name" to specify a schedd name) expect
to be given an FQDN (or something that looks like one) and will fail if
not given a parameter with a `.` in it.
- htcondor with a broken submit command
- htcondor with working submit/cancel commands with extra arguments
- htcondor with a broken cancel command
(assuming no other workers are running -- it would be even better if
I had the job IDs of the workers from the cluster.

Also don't wait so long.  A remove is quicker than a submit.
* master:
  Tweak name in cluster.job_script(). (dask#439)
  Switch from Travis to GitHub Actions (dask#435)
  Fix name parameters being ignored in Cluster class (dask#398)
@riedel
riedel force-pushed the pr/411-extra-commands branch 2 times, most recently from 18019a5 to 9abbc17 Compare September 4, 2021 21:12
@riedel
riedel force-pushed the pr/411-extra-commands branch from 9abbc17 to 6ed20ed Compare September 4, 2021 21:22
@riedel
riedel force-pushed the pr/411-extra-commands branch from 9bb68d3 to dafc2ec Compare September 4, 2021 22:19
@riedel
riedel force-pushed the pr/411-extra-commands branch 2 times, most recently from f630508 to 564b85f Compare September 4, 2021 23:41
@riedel
riedel force-pushed the pr/411-extra-commands branch from 564b85f to 9a3c8b0 Compare September 5, 2021 00:00
@riedel riedel changed the title [WIP] New attempt at #411 extra commands [WIP] New attempt at #434 extra commands Sep 5, 2021
@riedel riedel added the HTCondor label Sep 5, 2021
@riedel riedel changed the title [WIP] New attempt at #434 extra commands New attempt at #411 (adding extra argument to condor_submit) Sep 5, 2021
@riedel

riedel commented Sep 5, 2021

Copy link
Copy Markdown
Member Author

@matyasselmeci : do you want to incorporate the changes into #434 ? Seems to work now. However as mentioned in #434 I did not manage to keep all your tests. However, IMHO they are still better than before. Maybe one could do something less invasive than letting condor_submit actually fail.

@riedel
riedel requested a review from matyasselmeci September 5, 2021 00:27
@riedel
riedel requested a review from guillaumeeb September 12, 2021 10:47
@matyasselmeci

Copy link
Copy Markdown
Contributor

I'm OK with dropping test_extra_args_broken_submit.

I just thought of another way to test submit_command_extra: condor_submit lets you pass arguments like key=value that will end up as values in the submit file. If you do MY.key="value", then key will end up as a classad attribute in the resulting job.

So the test would be to call HTCondorCluster with submit_command_extra=['MY.attr1="hello"', 'MY.attr2="world"'] and later run ["condor_q", "-af", "attr1", "attr2"] and look for hello world in the output.

@guillaumeeb guillaumeeb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a strong opinion from me on this one.

I'd say it doesn't modify the core package a lot, so if it's useful for Condor users we can probably merge.

If @lesteve or @andersy005 have an opinion, I'd be glad to hear it.

@andersy005 andersy005 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with HTCondor details well enough to give this a very thorough review, but I concur with Guillaume's statement:

I'd say it doesn't modify the core package a lot, so if it's useful for Condor users we can probably merge.

@riedel

riedel commented Sep 24, 2021

Copy link
Copy Markdown
Member Author

Thanks for reviewing. IMHO (biased), the "critical" part is not the HTCondor but the small change in passing the cancel_command to the class method. But I think it makes sense beyond HTCondor, because this would be the expected behaviour, when modifying it (i.e. that the modification acts symetric to the submit_command which is is passed to an instance method). I first thought of making this more extensible, but I kept this minimal (which was acknowledged :) )

I would opt for postponing adding a better additional test case, so I would be greatful if someone could merge this one to get #411 off the table for HTCondor before cleaning up the rest a bit more.

@riedel
riedel removed the request for review from lesteve September 24, 2021 16:49
@riedel

riedel commented Sep 24, 2021

Copy link
Copy Markdown
Member Author

I closed #434 now, but want to mention again that the majority of work was done there by @matyasselmeci . I only fixed the last bit that was blocking the merge.

@matyasselmeci matyasselmeci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. Thanks for figuring out the issue!

@guillaumeeb
guillaumeeb merged commit 26fd3ae into dask:main Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants