From d37502b464f3cfe147d25d40879785b0076e3f3d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 20 Feb 2020 14:18:54 -0600 Subject: [PATCH] cephadm: fix reconfig for monitoring daemons We shouldn't check for port usage here. Signed-off-by: Sage Weil --- src/cephadm/cephadm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 36a35a7f40a8d..47628f2b83eda 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2035,11 +2035,12 @@ def command_deploy(): monitoring_args = [] # type: List[str] # Default Checks - daemon_ports = Monitoring.port_map[daemon_type] # type: List[int] - if any([port_in_use(port) for port in daemon_ports]): - raise Error("TCP Port(s) '{}' required for {} is already in use".format(",".join(map(str, daemon_ports)), daemon_type)) - elif args.image == DEFAULT_IMAGE: - raise Error("--image parameter must be supplied for {}".format(daemon_type)) + if not args.reconfig: + daemon_ports = Monitoring.port_map[daemon_type] # type: List[int] + if any([port_in_use(port) for port in daemon_ports]): + raise Error("TCP Port(s) '{}' required for {} is already in use".format(",".join(map(str, daemon_ports)), daemon_type)) + elif args.image == DEFAULT_IMAGE: + raise Error("--image parameter must be supplied for {}".format(daemon_type)) # make sure provided config-json is sufficient config = get_parm(args.config_json) # type: ignore -- 2.39.5