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 host check to match when hostname is listed under 'Other names' #56

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

lefthand
Copy link
Contributor

@lefthand lefthand commented Mar 8, 2016

I ran into issues where the gluster peer probe command was returning the peer's IP address as the hostname and the actual hostname under "Other names".

> sudo gluster peer status
Number of Peers: 1

Hostname: 192.168.1.1
Uuid: d1111111-cb43-1234-5677-6de84e12f73
State: Peer in Cluster (Connected)
Other names:
gluster2.example.com

I modified the command to filter out the 'Other names' line so that the 'Connected' line would always be above it. Then we have grep return two lines after a match and one line before. This was to prevent a situation where the command didn't return nodes that have 'other names' and a connected message for a prior node would appear two lines above the node being probed.

I'd be happy to try out other approaches if there might be a cleaner method.

@@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs and configures Gluster servers and clients'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '5.0.0'
version '5.0.1'
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 revert the version bump :)

@shortdudey123
Copy link
Owner

Can you rebase on top of master and squash your commits? Then tests should pass. Thanks!!

@lefthand
Copy link
Contributor Author

lefthand commented Mar 8, 2016

Thanks for the quick reply! I've squashed the commits.

@shortdudey123 shortdudey123 added this to the v5.0.1 milestone Mar 8, 2016
shortdudey123 added a commit that referenced this pull request Mar 8, 2016
Allow host check to match when hostname is listed under 'Other names'
@shortdudey123 shortdudey123 merged commit 19f5a41 into shortdudey123:master Mar 8, 2016
@shortdudey123
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants