Closed scarvalhojr closed 9 years ago
I don't test it. But code is really nice, it's a pleasure to see PR like this! :)
As it doesn't change anything existing (only add), I'm quite confident about adding this soon. @hufman ?
Do you want to add the osd_secret business to allow this LWRP to run on any node on the cluster, instead of just the MONs? I could see the benefit of this only being available on MON nodes, though. Otherwise it's very cool!
I thought about adding osd_secret but decided against it because it isn't safe (secret potentially exposed on Chef logs). I was tinkering with the idea of adding attributes for user-id/name and key/keyring files to the LWRP but this isn't my priority right now. I left the code in a way that it can easily be extended in that way though.
@scarvalhojr can you add an options
string attribute to add any other option to command ceph osd pool create
.
Can be useful for erasure for example.
I've added a create_options
attribute for ceph osd pool create
For me all is OK. @hufman ? Nice work
Looks good to me!
This change introduces a pool LWRP that allows Ceph user pools to be created and/or deleted by simply specifying their name and number of placement groups.
It also allows users to define their own pools in Chef attributes or environments that are then created automatically when nodes are provisioned.