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 <adking@redhat.com>
(cherry picked from commit
d203a97e1bf1e06433365ea38e3ab2b6430cefff)
for fname in glob(f'{ctx.log_dir}/cephadm.log*'):
os.remove(fname)
+ try:
+ Path('/etc/ceph/podman-auth.json').unlink()
+ except FileNotFoundError:
+ pass
+ except Exception as e:
+ logger.debug(f'Could not remove podman-auth.json: {e}')
+
# rm sysctl settings
sysctl_dirs: List[Path] = [Path(ctx.sysctl_dir), Path('/usr/lib/sysctl.d')]