-
Notifications
You must be signed in to change notification settings - Fork 93
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 tidy fix. #2674
Cat log remote tidy fix. #2674
Conversation
I haven't seen any clean-up failures with this implementation, after much testing - with bash-4 (remote exec) and tcsh (no remote exec) as login shell. |
(If this doesn't do it, much knashing of teeth will ensue 😬 ) |
Note edit mode doesn't really work from a third host (same on master, however). It results in (e.g.): |
9ab9b17
to
396f228
Compare
396f228
to
7e7a29f
Compare
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.
Looks good. Tested as working in my environment for a combination of scenarios.
@oliver-sanders please sanity check. |
Phew! Release tomorrow... |
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.
Sorry! Logic seems sane, one issue with the -m
change.
bin/cylc-cat-log
Outdated
mode = MODES[options.mode] | ||
except KeyError: | ||
# User chose log form. | ||
mode = options.mode |
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.
There are later usages of options.mode
which means cylc cat-log <suite> -m tail
results in traceback.
@oliver-sanders - good spotting, thanks. Will make the long-time-coming release on approval. |
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.
Looks OK, tested locally, lets hope we've got it this time!
- Travis-CI failure was spurious, test passes locally.
- Codacy would prefer
/bin/ps
tops
, this is something we can address at a later date if of importance.
Follow-up aborted #2672 and earlier attempts at avoiding orphaned tail processes on job hosts.
No need for watch-and kill threads or killing process groups. Just kill invoked subprocesses (either ssh command reinvocation or tail-follow command) if main process's PPID or PPPID (etc) changes.
Example: on host A:
cylc cat-log --host=B <suite> <task-on-C>
ssh B "cylc cat-log <suite> <task-on-C>"
ssh C "cylc cat-log --remote <suite> <task-on-C>"
tail -f <task-on-C>.out
Ctrl-C (or exit GUI viewer) on host-A: