]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[BZ-1231203] throws if multiple mon are passed to "mon add"
authorKefu Chai <kchai@redhat.com>
Tue, 16 Jun 2015 07:41:20 +0000 (15:41 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 16 Jun 2015 15:37:35 +0000 (23:37 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph_deploy/mon.py
docs/source/mon.rst

index 9b20944db2c335c77715b721d6aecc51f499d8ab..bb6549aa33c7c81a71bbe831adcbb3679f8f76aa 100644 (file)
@@ -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
index 075a4994afcc3fc7b01f726d6753a6d7e95d5fc6..5caca6edbd631326bf42f01559306eee56719347 100644 (file)
@@ -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