]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: throw error when trying to add some unsupported repos
authorAdam King <adking@redhat.com>
Thu, 10 Jun 2021 19:49:05 +0000 (15:49 -0400)
committerSebastian Wagner <sewagner@redhat.com>
Thu, 17 Jun 2021 08:47:02 +0000 (10:47 +0200)
we son't have any repos available for fedora os always error there.

unlike octopus, el7 yum/dnf distros are not supported in pacific
so error there as well.

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 32f4d8e0cfb3b013a8bfa5d51fb8da3fe9aff3a5)

src/cephadm/cephadm

index bd69ba73c3e1d44fc8c711cf4c6a68766e02ab0e..b2a87b8f48e94ea77b88c7a196e7ec1de9771c01 100755 (executable)
@@ -6000,6 +6000,13 @@ class YumDnf(Packager):
                                      self.distro_code)
 
     def add_repo(self):
+        if self.distro_code.startswith('fc'):
+            raise Error('Ceph team does not build Fedora specific packages and therefore cannot add repos for this distro')
+        if self.distro_code == 'el7':
+            if self.stable and self.stable >= 'pacific':
+                raise Error('Ceph does not support pacific or later for this version of this linux distro and therefore cannot add a repo for it')
+            if self.version and self.version.split('.')[0] >= '16':
+                raise Error('Ceph does not support 16.y.z or later for this version of this linux distro and therefore cannot add a repo for it')
         if self.stable or self.version:
             content = ''
             for n, t in {