From: Alfredo Deza Date: Mon, 18 Nov 2013 18:34:04 +0000 (-0500) Subject: deal with gpg url fallback in install X-Git-Tag: v1.3.3~14^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=571e601a570455de037456e609ca992fe7cea402;p=ceph-deploy.git deal with gpg url fallback in install Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index 1768431..ac45182 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -41,9 +41,17 @@ def install(args): LOG.info('Distro info: %s %s %s', distro.name, distro.release, distro.codename) rlogger = logging.getLogger(hostname) rlogger.info('installing ceph on %s' % hostname) + + # custom repo arguments repo_url = os.environ.get('CEPH_DEPLOY_REPO_URL') or args.repo_url gpg_url = os.environ.get('CEPH_DEPLOY_GPG_URL') or args.gpg_url - if repo_url: + gpg_fallback = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' + if gpg_url is None: + LOG.warning('--gpg-url was not used, will fallback') + LOG.warning('using GPG fallback: %s', gpg_fallback) + gpg_url = gpg_fallback + + if repo_url: # triggers using a custom repository rlogger.info('using custom repository location: %s', repo_url) distro.firewall_install( distro, @@ -51,7 +59,8 @@ def install(args): gpg_url, args.adjust_repos ) - else: + + else: # otherwise a normal installation distro.install( distro, args.version_kind, @@ -242,14 +251,14 @@ def make(parser): help='hosts to install on', ) - version.add_argument( + parser.add_argument( '--repo-url', nargs='?', dest='repo_url', help='specify a repo URL that mirrors/contains ceph packages', ) - version.add_argument( + parser.add_argument( '--gpg-url', nargs='?', dest='gpg_url',