From: Travis Rhoden Date: Mon, 18 May 2015 16:24:57 +0000 (-0400) Subject: [BZ-1222505] Disallow 'new' cmd with sysvinit and custom name X-Git-Tag: v1.5.24~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=82deeeba1ff043a6cec97b0a0bd4897b46316e8c;p=ceph-deploy.git [BZ-1222505] Disallow 'new' cmd with sysvinit and custom name Signed-off-by: Travis Rhoden --- diff --git a/ceph_deploy/new.py b/ceph_deploy/new.py index ab1dfc0..197f992 100644 --- a/ceph_deploy/new.py +++ b/ceph_deploy/new.py @@ -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