]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: warn when no valid version arguments are supplied to add-repo 34529/head
authorMaran Hidskes <maran@protonmail.com>
Mon, 13 Apr 2020 08:20:57 +0000 (10:20 +0200)
committerMaran Hidskes <maran@protonmail.com>
Mon, 13 Apr 2020 08:20:57 +0000 (10:20 +0200)
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>
src/cephadm/cephadm

index 2c34d6e5f2c6823ed79444ca69cef0ccce86bba7..33d09cb9f1ba757932ff2dc1d6a318031b5dd921 100755 (executable)
@@ -3975,6 +3975,8 @@ def create_packager(stable=None, version=None, branch=None, commit=None):
 def command_add_repo():
     if args.version and args.release:
         raise Error('you can specify either --release or --version but not both')
+    if not args.version and not args.release and not args.dev and not args.dev_commit:
+        raise Error('please supply a --release, --version, --dev or --dev-commit argument')
     if args.version:
         try:
             (x, y, z) = args.version.split('.')