-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cat-log: remote cylc sub-command #2503
Conversation
I have this working for all combos of mode (print, list, cat, tail) and file (job.out etc.), local and remote, and custom batch system But ... I noticed we also have global config for custom batch system |
Looks like the 2 options are used by the GUI only. |
(The SSH tail problem does not appear to be handled correctly here. The custom tailer will eventually die when the batch job completes, so it has not been too problematic so far.) |
Ah, my quick grep was a little simplistic! |
In the GUI? In what way is it not handled correctly? It would be better to do it properly than wait for the remote job to end before the tail process dies. |
We have a custom command supplied by another team, so not absolutely straightforward at the time. With your wrapper, I suppose we can handle this the same way as you handle |
We can easily set up the wrapper (while in |
Yep, that works well. |
80bf0e0
to
13827ac
Compare
(this was close to done when left off in Dec.; I expect to finish it off quickly on returning from Melbourne in 1.5 weeks). |
e35fa9c
to
1951509
Compare
93d8a3e
to
f5ad644
Compare
70b2434
to
ac060f0
Compare
Allow --debug. Use argument list instead of argument string for SSH command.
eb2355d
to
c19eab8
Compare
(Branch rebased - was a trivial conflict) |
Hold off a bit: I found a problem viewing logs of local tasks while they are still running. I'll fix then add a another test... |
Start all tests from global-tests.rc. test_header functions to set host and owner vars. Get rid of old CYLC_TEST_TASK_(OWNER|HOST) vars.
@matthewrmshin @sadielbartholomew - you might want to review just the three new commits.
|
Two more new commits, after observing the output of a suite run to update the "Remote Job Host Interaction" transcript in the user guide: 1) |
Still 2 breakages.
Applying this diff should do the trick, but sort of reverse the spirit of f6e00bd. diff --git a/bin/cylc-cat-log b/bin/cylc-cat-log
index 375d8cdea..d72f0f77e 100755
--- a/bin/cylc-cat-log
+++ b/bin/cylc-cat-log
@@ -375,7 +375,7 @@ def main():
conf = glbl_cfg().get_host_item("batch systems", host, user)
batchview_cmd_tmpl = None
try:
- batchview_cmd_tmpl = conf[batch_sys_name][key]
+ batchview_cmd_tmpl = conf[batch_sys_name][conf_key]
except KeyError:
pass
if batchview_cmd_tmpl is not None:
@@ -397,8 +397,10 @@ def main():
if cylc.flags.debug:
cmd.append('--debug')
for item in [logpath, mode, tail_tmpl, batchview_cmd]:
- if item is not None:
+ if item:
cmd.append('--remote-arg=%s' % quote(item))
+ else:
+ cmd.append('--remote-arg=')
cmd.append(suite_name)
capture = (mode == 'edit')
try: |
My apologies for mistakenly adding the 'bug' label - I keep thinking I am typing in my terminal when I am actually active in the browser instead, and it is too easy to add some label by typing a few keys! |
Ah yes, sorry, I rushed that one (school holiday chaos here today). |
a406da5
to
f1c6399
Compare
@matthewrmshin - I've rebased again to remove my |
Should probably add |
Done. |
Two final issues:
diff --git a/bin/cylc-cat-log b/bin/cylc-cat-log
index 121fd7642..287f59362 100755
--- a/bin/cylc-cat-log
+++ b/bin/cylc-cat-log
@@ -368,7 +368,7 @@ def main():
conf = glbl_cfg().get_host_item("batch systems", host, user)
batchview_cmd_tmpl = None
try:
- batchview_cmd_tmpl = conf[batch_sys_name][key]
+ batchview_cmd_tmpl = conf[batch_sys_name][conf_key]
except KeyError:
pass
if batchview_cmd_tmpl is not None: |
Done. Thanks again (I can't run shared-fs tests today, working at home). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests all good in my environment.
Re-approving after review of commits from @hjoliver I will leave you to merge in case you want to conduct tests on your own work environment (or would like to wait for Oliver to also review), though I think we should merge or else create a follow-on PR before we make many more comments as comments numbering the hundreds can render a PR page inaccessible, as I discovered with Rose docs reviewing! |
Address first [update: and second] check-box of #2302
Not for review yet.[UPDATED description]: Refactored and improved the cat-log command in order to put remote host functionality behind a
cylc
command (for ssh whitelisting):cylc cat-log
(the command re-invokes itself on remote hosts after doing what's needed on the local host - i.e. option and global config processing)