From 82deeeba1ff043a6cec97b0a0bd4897b46316e8c Mon Sep 17 00:00:00 2001 From: Travis Rhoden Date: Mon, 18 May 2015 12:24:57 -0400 Subject: [PATCH] [BZ-1222505] Disallow 'new' cmd with sysvinit and custom name Signed-off-by: Travis Rhoden --- ceph_deploy/new.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.47.3