From d203a97e1bf1e06433365ea38e3ab2b6430cefff Mon Sep 17 00:00:00 2001 From: Adam King Date: Wed, 14 Feb 2024 12:02:09 -0500 Subject: [PATCH] cephadm: rm podman-auth.json if removing last cluster We have points in rm-cluster where we check that there are no other clusters on the host. If that is the case, we can also clear /etc/ceph/podman-auth.json which gets written out when we log in to a registry while using podman Fixes: https://tracker.ceph.com/issues/64433 Signed-off-by: Adam King --- src/cephadm/cephadm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 5a7ed9e7665..22704537e40 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -4373,6 +4373,8 @@ def _rm_cluster(ctx: CephadmContext, keep_logs: bool, zap_osds: bool) -> None: for fname in glob(f'{ctx.log_dir}/cephadm.log*'): os.remove(fname) + unlink_file(Path('/etc/ceph/podman-auth.json'), missing_ok=True, ignore_errors=True) + # rm sysctl settings sysctl_dirs: List[Path] = [Path(ctx.sysctl_dir), Path('/usr/lib/sysctl.d')] -- 2.39.5