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

allow hostname for older versions of chef-server #17

Merged
merged 3 commits into from
Aug 10, 2015

Conversation

philbrookes
Copy link

Hey,

Excellent cookbook!

just a few minor tweaks:
On older versions of chef-server node['fqdn'] does not seem to be set:

chef > node['fqdn']
 => nil

This change will allow those older ones to use this cookbook and check against hostname instead, if fqdn fails for some reason.

I also slightly modified one of the error messages, when I was trying to debug an issue I was having :)

if brick_count < volume_values['replica_count']
Chef::Log.warn("Correct number of bricks not available for volume #{volume_name}. Skipping...")
requiredBricks = (volume_values['replica_count'] * volume_values['peers'].count)
if brick_count != requiredBricks
Copy link
Owner

Choose a reason for hiding this comment

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

Can you elaborate on this?

If i am reading it right this would not work. With an RF of 3 with 3 nodes so 1 brick per node, requiredBricks would be 9 but you only have 3 bricks.

@philbrookes
Copy link
Author

Whoops, my mistake, I had changed the wrong if statement.

I've moved it to the correct one now.

@philbrookes philbrookes force-pushed the fqdn-or-hostname branch 3 times, most recently from d3abc8e to 9b088f3 Compare August 6, 2015 07:53
@philbrookes
Copy link
Author

cool, good idea. I've added that too.

shortdudey123 added a commit that referenced this pull request Aug 10, 2015
allow hostname for older versions of chef-server
@shortdudey123 shortdudey123 merged commit b2147f3 into shortdudey123:master Aug 10, 2015
@kareiva
Copy link
Contributor

kareiva commented Aug 11, 2015

👍

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.

3 participants