]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
deal with gpg url fallback in install
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 18 Nov 2013 18:34:04 +0000 (13:34 -0500)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 18 Nov 2013 19:29:57 +0000 (14:29 -0500)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/install.py

index 1768431655e1ad6dd8a97b4a251cb1d15448d939..ac45182a680f5d5169fa421c0d17ecdd90aed8bc 100644 (file)
@@ -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',