microceph icon indicating copy to clipboard operation
microceph copied to clipboard

Use microcluster API to remove cluster members

Open masnax opened this issue 1 year ago • 1 comments

Closes #255

As discussed in Riga, this refactors the node removal process to rely on the microcluster API instead of directly implementing removal in the MicroCeph CLI.

The main changes are that the removeNode function and all its helpers have been moved to the ceph package. The removeNode function itself has been wrapped in a PreRemove to match the corresponding hook in microcluster. Now in the CLI, we can simply call DeleteClusterMember and the PreRemove hook will automatically execute on that node as it is passed to microcluster when we call app.Start.

This will allow MicroCloud to utilize MicroCeph's API to tear down the cluster in case of an error during initialization. Additionally, it cleans up MicroCeph so there isn't so much internal implementation in the CLI package.

masnax avatar Apr 16 '24 19:04 masnax

Setting as draft until I can sort out the last test.

masnax avatar Apr 16 '24 21:04 masnax

@UtkarshBhatthere @sabaini This one is now ready for review, thank you :)

masnax avatar Jun 13 '24 15:06 masnax

This should now be rebased and ready for review, thanks :)

masnax avatar Jun 25 '24 16:06 masnax

@sabaini Thanks for merging the other one, I've now rebased this one.

masnax avatar Jul 05 '24 17:07 masnax