From dfd1df70e246905fd08c35b3d59365bf7466216e Mon Sep 17 00:00:00 2001 From: Ali Maredia Date: Thu, 29 Sep 2022 17:07:54 -0400 Subject: [PATCH] cephadm: force rgw .asok file removal after rgw stoppage Co-authored-by: Redouane Kachach Signed-off-by: Ali Maredia --- src/cephadm/cephadm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index d8a353fc0eac..2875e94e80fd 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -7109,6 +7109,13 @@ def command_rm_daemon(ctx): verbosity=CallVerbosity.DEBUG) call(ctx, ['systemctl', 'disable', unit_name], verbosity=CallVerbosity.DEBUG) + + # force remove rgw admin socket file if leftover + if daemon_type in ['rgw']: + rgw_asok_path = f'/var/run/ceph/{ctx.fsid}/ceph-client.{ctx.name}.*.asok' + call(ctx, ['rm', '-rf', rgw_asok_path], + verbosity=CallVerbosity.DEBUG) + data_dir = get_data_dir(ctx.fsid, ctx.data_dir, daemon_type, daemon_id) if daemon_type in ['mon', 'osd', 'prometheus'] and \ not ctx.force_delete_data: -- 2.47.3