Skip to content
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

Fix and improve suite find info in run/restart stdout. #1784

Merged
merged 2 commits into from
Apr 11, 2016

Conversation

hjoliver
Copy link
Member

The pgrep command suggested for detecting running suites was broken. This fixes it, and makes it print full info for just the parent process (instead of just PID for parent and all sub-processes), and also suggests scan and ping commands that work from other hosts.

Example output:

ERROR: port file exists: /home/oliverh/.cylc/ports/foo

If foo is not running, delete the port file and try again.  If it is
running but not responsive, kill any left over suite processes too.

To see if foo is running on 'niwa-34403.niwa.local:7766':
 * cylc scan -n '\bfoo\b' niwa-34403.niwa.local
 * cylc ping -v --host=niwa-34403.niwa.local foo
 * ssh niwa-34403.niwa.local "pgrep -a -P 1 -fu $USER 'cylc-r.* \bfoo\b'"

'ERROR, port file exists: /home/oliverh/.cylc/ports/foo'

And for the suggested commands:

[oliverh@wrh-1 ~]$ cylc scan -n '\bfoo\b' niwa-34403.niwa.local
foo oliverh@niwa-34403.niwa.local:7766

[oliverh@wrh-1 ~]$ cylc ping -v --host=niwa-34403.niwa.local foo
Generated suite passphrase: /home/oliverh/.cylc/passphrases/oliverh@niwa-34403.niwa.local/foo/passphrase
Running on niwa-34403.niwa.local:7766

[oliverh@wrh-1 ~]$ ssh niwa-34403.niwa.local "pgrep -a -P 1 -fu $USER 'cylc-r.* \bfoo\b'"
25383 python /home/oliverh/cylc/cylc.git/bin/cylc-run foo
[oliverh@wrh-1 ~]$ 

@matthewrmshin - please review (one review is probably enough).

@hjoliver hjoliver added the bug Something is wrong :( label Apr 10, 2016
@hjoliver hjoliver added this to the next-release milestone Apr 10, 2016
* cylc ping -v %(suite)s, or
* ssh %(host)s pgrep -fu $USER 'cylc-r .* \<%(suite)s\>'
r"""ERROR: port file exists: %(port_file)s

Copy link
Contributor

Choose a reason for hiding this comment

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

Extra white space here breaks the pep8 test.

@matthewrmshin matthewrmshin merged commit 6e0c537 into cylc:master Apr 11, 2016
@hjoliver hjoliver deleted the cylc-run.help-typo-fix branch April 11, 2016 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants