]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[BZ-1222505] Disallow 'new' cmd with sysvinit and custom name 291/head
authorTravis Rhoden <trhoden@redhat.com>
Mon, 18 May 2015 16:24:57 +0000 (12:24 -0400)
committerTravis Rhoden <trhoden@redhat.com>
Mon, 18 May 2015 19:16:35 +0000 (15:16 -0400)
Signed-off-by: Travis Rhoden <trhoden@redhat.com>
ceph_deploy/new.py

index ab1dfc03be0680efece5ad5ec653919499b759e1..197f992a82ebe0d6f3725d3d72d23da549b9b311 100644 (file)
@@ -143,6 +143,14 @@ def new(args):
         # Now get the non-local IPs from the remote node
         distro = hosts.get(host, username=args.username)
         remote_ips = net.ip_addresses(distro.conn)
+
+        # custom cluster names on sysvinit hosts won't work
+        if distro.init == 'sysvinit' and args.cluster != 'ceph':
+            LOG.error('custom cluster names are not supported on sysvinit hosts')
+            raise exc.ClusterNameError(
+                'host %s does not support custom cluster names' % host
+            )
+
         distro.conn.exit()
 
         # Validate subnets if we received any