From 32f4d8e0cfb3b013a8bfa5d51fb8da3fe9aff3a5 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 10 Jun 2021 15:49:05 -0400 Subject: [PATCH] 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 --- src/cephadm/cephadm | 7 +++++++ 1 file changed, 7 insertions(+) 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 { -- 2.47.3