Bug #45029
cephadm: add-repo fails (silently) when no arguments are given
0%
Description
I've been looking around to see if there are any low-level things that were broken for me during the installation of a new Ceph cluster using cephadm and see if I can fix it myself.
One of the things I noticed is that if you don't supply any arguments to add-repo it fails because no sane defaults are given so "None" is used as version.
INFO:root:Installing repo GPG key from https://download.ceph.com/keys/autobuild.asc... INFO:root:Fetching repo metadata from shaman and chacra... ERROR:root:repository not found in shaman (might not be available yet) ERROR: HTTP Error 504: Gateway Timeout, failed to fetch https://shaman.ceph.com/api/repos/ceph/None/latest/ubuntu/bionic/repo/?arch=x86_64
Would you be open for a PR that either prints out an error when no arguments are given or that assumes some default values when nothing is supplied?
Associated revisions
cephadm: warn when no valid version arguments are supplied to add-repo
Currently add-repo will add a broken repository by default, this commit gives a pretty error to instruct the user to use one of the version arguments.
Fixes #45029
Signed-off-by: Maran Hidskes <maran@protonmail.com>
cephadm: warn when no valid version arguments are supplied to add-repo
Currently add-repo will add a broken repository by default, this commit gives a pretty error to instruct the user to use one of the version arguments.
Fixes #45029
Signed-off-by: Maran Hidskes <maran@protonmail.com>
(cherry picked from commit 115b3d7b7f3b4cf4149240fc14e374697a7cd6b1)
History
#1 Updated by Sebastian Wagner almost 3 years ago
- Tracker changed from Feature to Bug
- Category set to cephadm (binary)
- Status changed from New to In Progress
- Tags set to low-hanging-fruit
- Regression set to No
- Severity set to 3 - minor
Would you be open for a PR that either prints out an error when no arguments are given or that assumes some default values when nothing is supplied?
Yes please, by all means!
If you don't find a good default value, I'd recommend to just fail, if no proper argument was given.
#2 Updated by Sebastian Wagner almost 3 years ago
- Status changed from In Progress to Pending Backport
- Pull request ID set to 34529
#3 Updated by Sebastian Wagner almost 3 years ago
- Status changed from Pending Backport to Resolved