From: Adam King Date: Thu, 10 Jun 2021 19:49:05 +0000 (-0400) Subject: cephadm: throw error when trying to add some unsupported repos X-Git-Tag: v17.1.0~1636^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32f4d8e0cfb3b013a8bfa5d51fb8da3fe9aff3a5;p=ceph.git cephadm: throw error when trying to add some unsupported repos 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 --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 0b63caecda5a..10a8c25657ae 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -6016,6 +6016,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 {