You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by jo...@apache.org on 2014/01/25 09:53:42 UTC
git commit: Fix maintenance command documentation and host/filename
logic.
Updated Branches:
refs/heads/master add79f62d -> 383ccfb76
Fix maintenance command documentation and host/filename logic.
Reviewed at https://reviews.apache.org/r/16983/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/383ccfb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/383ccfb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/383ccfb7
Branch: refs/heads/master
Commit: 383ccfb76fd180cd9a5e47e0af01c0b323884823
Parents: add79f6
Author: Joe Smith <ya...@gmail.com>
Authored: Sat Jan 25 00:53:19 2014 -0800
Committer: Jonathan Boulle <jo...@twitter.com>
Committed: Sat Jan 25 00:53:19 2014 -0800
----------------------------------------------------------------------
.../apache/aurora/client/commands/admin.py | 24 ++++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/383ccfb7/src/main/python/apache/aurora/client/commands/admin.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/admin.py b/src/main/python/apache/aurora/client/commands/admin.py
index 063c002..6d191f4 100644
--- a/src/main/python/apache/aurora/client/commands/admin.py
+++ b/src/main/python/apache/aurora/client/commands/admin.py
@@ -51,7 +51,7 @@ GROUPING_OPTION = optparse.Option(
def parse_hosts(options):
- if not (options.filename or options.hosts):
+ if bool(options.filename) == bool(options.hosts):
die('Please specify either --filename or --hosts')
if options.filename:
with open(options.filename, 'r') as hosts:
@@ -186,8 +186,8 @@ def set_quota(cluster, role, cpu_str, ram_mb_str, disk_mb_str):
help='Comma separated list of hosts')
@requires.exactly('cluster')
def start_maintenance_hosts(cluster):
- """usage: start_maintenance_hosts cluster [--filename=filename]
- [--hosts=hosts]
+ """usage: start_maintenance_hosts {--filename=filename | --hosts=hosts}
+ cluster
"""
options = app.get_options()
MesosMaintenance(CLUSTERS[cluster], options.verbosity).start_maintenance(parse_hosts(options))
@@ -200,8 +200,8 @@ def start_maintenance_hosts(cluster):
help='Comma separated list of hosts')
@requires.exactly('cluster')
def end_maintenance_hosts(cluster):
- """usage: end_maintenance_hosts cluster [--filename=filename]
- [--hosts=hosts]
+ """usage: end_maintenance_hosts {--filename=filename | --hosts=hosts}
+ cluster
"""
options = app.get_options()
MesosMaintenance(CLUSTERS[cluster], options.verbosity).end_maintenance(parse_hosts(options))
@@ -219,11 +219,11 @@ def end_maintenance_hosts(cluster):
@app.command_option(GROUPING_OPTION)
@requires.exactly('cluster')
def perform_maintenance_hosts(cluster):
- """usage: perform_maintenance cluster [--filename=filename]
- [--hosts=hosts]
- [--batch_size=num]
- [--post_drain_script=path]
- [--grouping=function]
+ """usage: perform_maintenance_hosts {--filename=filename | --hosts=hosts}
+ [--batch_size=num]
+ [--post_drain_script=path]
+ [--grouping=function]
+ cluster
Asks the scheduler to remove any running tasks from the machine and remove it
from service temporarily, perform some action on them, then return the machines
@@ -254,8 +254,8 @@ def perform_maintenance_hosts(cluster):
help='Comma separated list of hosts')
@requires.exactly('cluster')
def host_maintenance_status(cluster):
- """usage: host_maintenance_status cluster [--filename=filename]
- [--hosts=hosts]
+ """usage: host_maintenance_status {--filename=filename | --hosts=hosts}
+ cluster
Check on the schedulers maintenance status for a list of hosts in the cluster.
"""