From: Kefu Chai Date: Tue, 16 Jun 2015 07:41:20 +0000 (+0800) Subject: [BZ-1231203] throws if multiple mon are passed to "mon add" X-Git-Tag: v1.5.26~16^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c1f5eb8cea83ef3a05db1d01b206d12e77b1fe26;p=ceph-deploy.git [BZ-1231203] throws if multiple mon are passed to "mon add" Signed-off-by: Kefu Chai --- diff --git a/ceph_deploy/mon.py b/ceph_deploy/mon.py index 9b20944..bb6549a 100644 --- a/ceph_deploy/mon.py +++ b/ceph_deploy/mon.py @@ -175,6 +175,8 @@ def mon_add(args): if not args.mon: raise exc.NeedHostError() + elif len(args.mon) > 1: + raise exc.GenericError('Only one node can be added at a time') mon_host = args.mon[0] try: @@ -482,7 +484,8 @@ def make(parser): If the section for the monitor exists and defines a `mon addr` that will be used, otherwise it will fallback by resolving the hostname to an - IP. If `--address` is used it will override all other options. + IP. If `--address` is used it will override all other options. Please + note that only one node can be added at a time. destroy Completely remove monitors on a remote host. Requires hostname(s) as diff --git a/docs/source/mon.rst b/docs/source/mon.rst index 075a499..5caca6e 100644 --- a/docs/source/mon.rst +++ b/docs/source/mon.rst @@ -62,7 +62,8 @@ nor overridden in the command-line it will fall-back to resolving the address of the provided host. .. warning:: If the monitor host has multiple addresses you should specify - the address directly to ensure the right IP is used. + the address directly to ensure the right IP is used. Please + note, only one node can be added at a time. .. versionadded:: 1.4.0