Skip to content
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

Add placement group control to the pool resource. #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add placement group control to the pool resource. #219

wants to merge 1 commit into from

Conversation

ncerny
Copy link

@ncerny ncerny commented Nov 25, 2015

This allows pg_num to be controlled idempotently as part of the pool resource. It will set pg_num and pgp_num if the pg_num property changes on the pool resource.

@guilhem
Copy link
Contributor

guilhem commented Nov 25, 2015

Really nice :)

@@ -13,7 +13,17 @@ def whyrun_supported?

action :create do
if @current_resource.exists
Chef::Log.info "#{@new_resource} already exists - nothing to do."
if @current_resource.pg_num == @new_resource.pg_num
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can be quite dumb... but why not testing @current_resource.pgp_num == @new_resource.pgp_num also? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt it was redundant - pg_num should never differ from pgp_num except while changing values. We could test for it just in case something fails though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really as you wish.

Done is better than perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants