]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
remove 'discover HOST'
authorSage Weil <sage@inktank.com>
Fri, 5 Apr 2013 22:37:25 +0000 (15:37 -0700)
committerSage Weil <sage@inktank.com>
Fri, 5 Apr 2013 22:37:35 +0000 (15:37 -0700)
It is identical to 'config pull HOST'

Signed-off-by: Sage Weil <sage@inktank.com>
README.rst
ceph_deploy/discover.py [deleted file]
setup.py

index 04db3505155af6f5ce2741f6b5b54b139c270c2f..a17808a76eb5f01b1708eb45b16a98ede68e63d5 100644 (file)
@@ -51,7 +51,7 @@ You can use ceph-deploy to provision nodes for an existing cluster.
 To grab a copy of the cluster configuration file (normally
 ``ceph.conf``)::
 
- ceph-deploy discover HOST
+ ceph-deploy config pull HOST
 
 You will usually also want to gather the encryption keys used for that
 cluster:
diff --git a/ceph_deploy/discover.py b/ceph_deploy/discover.py
deleted file mode 100644 (file)
index 5b35ead..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-import logging
-import os.path
-
-from . import misc
-from .cliutil import priority
-
-
-LOG = logging.getLogger(__name__)
-
-
-def fetch_file(args, frompath, topath, hosts):
-    # mon.
-    if os.path.exists(topath):
-        LOG.debug('Have %s', topath)
-        return True
-    else:
-        for hostname in hosts:
-            LOG.debug('Checking %s for %s', hostname, frompath)
-            sudo = args.pushy('ssh+sudo:{hostname}'.format(hostname=hostname))
-            get_file_r = sudo.compile(misc.get_file)
-            key = get_file_r(path=frompath.format(hostname=hostname))
-            if key is not None:
-                LOG.debug('Got %s from %s, writing locally', topath, hostname)
-                if not args.dry_run:
-                    with file(topath, 'w') as f:
-                        f.write(key)
-                return True
-    LOG.warning('Unable to find %s on %s', frompath, hosts)
-    return False
-
-def discover(args):
-    ret = 0
-
-    # ceph.conf
-    r = fetch_file(
-        args=args,
-        frompath='/etc/ceph/{cluster}.conf'.format(cluster=args.cluster),
-        topath='{cluster}.conf'.format(cluster=args.cluster),
-        hosts=args.host,
-        )
-    if not r:
-        ret = 1
-
-    return ret
-
-@priority(10)
-def make(parser):
-    """
-    Gather cluster configuration from another host to CLUSTER.conf.
-    """
-    parser.add_argument(
-        'host',
-        metavar='HOST',
-        nargs='*',
-        help='host to pull cluster information from',
-        )
-    parser.set_defaults(
-        func=discover,
-        )
index 153a76327a45f6c8ecb329b4bbf8ccc9e8ff9e61..19168f5eecac4e6218c8d7b10192eb83b54af7e2 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,6 @@ setup(
 
         'ceph_deploy.cli': [
             'new = ceph_deploy.new:make',
-            'discover = ceph_deploy.discover:make',
             'install = ceph_deploy.install:make',
             'uninstall = ceph_deploy.install:make_uninstall',
             'purge = ceph_deploy.install:make_purge',