-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LWRP for Pools and RBD #41
Conversation
You don't follow FC017 rule :) You must use
or better "why-run" mode: |
I'm not sure we want/need to do that in the cookbooks. The Management API coming with Dumpling will do that nicely. From http://www.inktank.com/about-inktank/roadmap/, |
Is Management API going to land in time? I thought Dumpling just went feature freeze Anyway, just thought I would present an implementation if we wanted to go this approach. We have a definite need for it since we need Chef to act on created Pools/Blocks but we'll keep it in our repo. @guilhem thanks for the suggestion. This is my first time creating an LWRP so good to get an idea of best practice. |
@hunter you are welcome. I can help you if you have some problem with it. IMPOV, I think LWRP is really a good things to this cookbook. |
+1 for this - what's holding up the merge? |
|
||
action :delete do | ||
|
||
converge_by("Deleting pool '#{new_resource.name}'") do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
converge_by is useless here because your are only using only chef resources :)
It's the same for action :create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok forget it, It can be better to keep it :)
Hmm, I see now that my work in #61 is starting to repeat some of the work you've done. I have some more LWRP work that I plan to do in the next week (maybe in the next few days). I'm sure that we can merge it at some point, but I'll do what I can to not conflict with your implementation. |
converge_by("Creating pool '#{new_resource.name}'") do | ||
execute "create pool" do | ||
not_if "rados lspools | grep #{new_resource.name}" | ||
command("rados mkpool #{new_resource.name}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd rather use ceph osd pool create pool pg_num and ceph osd lspools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update. Is there a difference in how the pools are created by the two different commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to my knowledge, it's just that the rados command is starting to get deprecated in favor of the ceph one.
Sorry I lacked of time lately to look at pull request. Made some comments. |
@hunter Is this PR always good for you (regard of current master)? |
I'd love to see this merged. It seems that this hasn't gone anywhere in almost 2 years though. If there's any interest I'd be up for addressing the comments above and submit a new pull request. Just let me know. I'm mostly interested in the pool LWRP |
+1 |
@rtrauntvein, I've added a pool LWRP with this PR: #198 |
I thought I'd get a discussion going about LWRPs. I've created a few basic ones to assist with our work, is this something we want to include in the official cookbook?