From: Alfredo Deza Date: Thu, 17 Oct 2013 18:47:50 +0000 (-0400) Subject: use the new args.username to get the connection X-Git-Tag: v1.3~14^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0720d1a5db44c30d7acfc24115d65f0daecdc21c;p=ceph-deploy.git use the new args.username to get the connection Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/admin.py b/ceph_deploy/admin.py index 36d2a4d..bc9a6fc 100644 --- a/ceph_deploy/admin.py +++ b/ceph_deploy/admin.py @@ -26,7 +26,7 @@ def admin(args): for hostname in args.client: LOG.debug('Pushing admin keys and conf to %s', hostname) try: - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) hostname = distro.conn.remote_module.shortname() distro.conn.remote_module.write_conf( diff --git a/ceph_deploy/config.py b/ceph_deploy/config.py index 697891c..d34db67 100644 --- a/ceph_deploy/config.py +++ b/ceph_deploy/config.py @@ -19,7 +19,7 @@ def config_push(args): for hostname in args.client: LOG.debug('Pushing config to %s', hostname) try: - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) distro.conn.remote_module.write_conf( args.cluster, @@ -46,7 +46,7 @@ def config_pull(args): for hostname in args.client: try: LOG.debug('Checking %s for %s', hostname, frompath) - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) conf_file_contents = distro.conn.remote_module.get_file(frompath) if conf_file_contents is not None: diff --git a/ceph_deploy/gatherkeys.py b/ceph_deploy/gatherkeys.py index 9710f3a..eccbf7f 100644 --- a/ceph_deploy/gatherkeys.py +++ b/ceph_deploy/gatherkeys.py @@ -15,7 +15,7 @@ def fetch_file(args, frompath, topath, _hosts): else: for hostname in _hosts: LOG.debug('Checking %s for %s', hostname, frompath) - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) key = distro.conn.remote_module.get_file( frompath.format(hostname=hostname) ) diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index 14d095d..4818188 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -58,7 +58,7 @@ def uninstall(args): LOG.debug('Detecting platform for host %s ...', hostname) # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename) rlogger = logging.getLogger(hostname) rlogger.info('uninstalling ceph on %s' % hostname) @@ -77,7 +77,7 @@ def purge(args): LOG.debug('Detecting platform for host %s ...', hostname) # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename) rlogger = logging.getLogger(hostname) rlogger.info('purging host ... %s' % hostname) @@ -94,7 +94,7 @@ def purge_data(args): installed_hosts = [] for hostname in args.host: - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) if ceph_is_installed(distro.conn): installed_hosts.append(hostname) distro.conn.exit() @@ -107,7 +107,7 @@ def purge_data(args): for hostname in args.host: # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename) rlogger = logging.getLogger(hostname) rlogger.info('purging data on %s' % hostname) diff --git a/ceph_deploy/mds.py b/ceph_deploy/mds.py index e428720..9d2e228 100644 --- a/ceph_deploy/mds.py +++ b/ceph_deploy/mds.py @@ -126,7 +126,7 @@ def mds_create(args): for hostname, name in args.mds: try: # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) rlogger = distro.conn.logger LOG.info( 'Distro info: %s %s %s', diff --git a/ceph_deploy/osd.py b/ceph_deploy/osd.py index 9b939ce..88b794b 100644 --- a/ceph_deploy/osd.py +++ b/ceph_deploy/osd.py @@ -123,7 +123,7 @@ def prepare(args, cfg, activate_prepared_disk): raise exc.NeedDiskError(hostname) # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info( 'Distro info: %s %s %s', distro.name, @@ -183,7 +183,7 @@ def activate(args, cfg): for hostname, disk, journal in args.disk: # TODO username - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info( 'Distro info: %s %s %s', distro.name, @@ -215,7 +215,7 @@ def disk_zap(args): if not disk or not hostname: raise RuntimeError('zap command needs both HOSTNAME and DISK but got "%s %s"' % (hostname, disk)) LOG.debug('zapping %s on %s', disk, hostname) - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info( 'Distro info: %s %s %s', distro.name, @@ -243,7 +243,7 @@ def disk_zap(args): def disk_list(args, cfg): for hostname, disk, journal in args.disk: - distro = hosts.get(hostname) + distro = hosts.get(hostname, username=args.username) LOG.info( 'Distro info: %s %s %s', distro.name,