Merge pull request #7536 from BlaineEXE/purge-osd-auth

ceph: remove auth in osd-purge job
This commit is contained in:
Sébastien Han authored and GitHub committed 2021-04-07 18:39:07 +02:00
commit fc8accb3ae
1 file changed
+7
+7
View File
@@ -140,6 +140,13 @@ func removeOSD(clusterdContext *clusterd.Context, clusterInfo *client.ClusterInf
// call archiveCrash to silence crash warning in ceph health if any
archiveCrash(clusterdContext, clusterInfo, osdID)
// remove the auth for the osd. should be done by 'osd purge', but doesn't always seem to happen
err = client.AuthDelete(clusterdContext, clusterInfo, fmt.Sprintf("osd.%d", osdID))
if err != nil {
// 'ceph auth del' returns error code 0 (success) if auth doesn't exist
logger.Errorf("failed to delete auth for osd.%d. user may need to use 'ceph auth del' or 'ceph auth rm' manually. %v", osdID, err)
}
logger.Infof("completed removal of OSD %d", osdID)
}