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

Projects
None yet
2 participants
@lefthand
Contributor

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.

Show outdated Hide outdated metadata.rb Outdated
@shortdudey123

This comment has been minimized.

Show comment
Hide comment
@shortdudey123

shortdudey123 Mar 8, 2016

Owner

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

Owner

shortdudey123 commented Mar 8, 2016

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

@lefthand

This comment has been minimized.

Show comment
Hide comment
@lefthand

lefthand Mar 8, 2016

Contributor

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

Contributor

lefthand commented Mar 8, 2016

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

@shortdudey123 shortdudey123 added the Bug label Mar 8, 2016

@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

Merge pull request #56 from lefthand/master
Allow host check to match when hostname is listed under 'Other names'

@shortdudey123 shortdudey123 merged commit 19f5a41 into shortdudey123:master Mar 8, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@shortdudey123

This comment has been minimized.

Show comment
Hide comment
@shortdudey123

shortdudey123 Mar 8, 2016

Owner

Thanks!

Owner

shortdudey123 commented Mar 8, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment