From f979dd1ebf95562539c8d4de1fc151b557450159 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 15 Mar 2020 08:51:51 -0500 Subject: [PATCH] cephadm: implement 'install' command This was present, but a no-op. By default, install cephadm. Optionally take a list of packages to install instead (e.g., ceph-common). Signed-off-by: Sage Weil --- qa/workunits/cephadm/test_repos.sh | 3 +++ src/cephadm/cephadm | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/qa/workunits/cephadm/test_repos.sh b/qa/workunits/cephadm/test_repos.sh index 0088aa0beeb..b4097bc6b6a 100755 --- a/qa/workunits/cephadm/test_repos.sh +++ b/qa/workunits/cephadm/test_repos.sh @@ -10,10 +10,13 @@ CEPHADM=${CEPHADM_SRC_DIR}/cephadm function test_install_uninstall() { ( sudo apt update && \ sudo apt -y install cephadm && \ + sudo $CEPHADM install && \ sudo apt -y remove cephadm ) || \ ( sudo yum -y install cephadm && \ + sudo $CEPHADM install && \ sudo yum -y remove cephadm ) || \ ( sudo dnf -y install cephadm && \ + sudo $CEPHADM install && \ sudo dnf -y remove cephadm ) } diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index fa74cc81bfa..79b761720b6 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -3621,7 +3621,8 @@ def command_rm_repo(): pkg.rm_repo() def command_install(): - pass + pkg = create_packager() + pkg.install(args.packages) ################################## @@ -4019,6 +4020,10 @@ def _get_parser(): parser_install = subparsers.add_parser( 'install', help='install ceph package(s)') parser_install.set_defaults(func=command_install) + parser_install.add_argument( + 'packages', nargs='*', + default=['cephadm'], + help='packages') return parser -- 2.39.5