Merge lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/cluster_fix into lp://qastaging/charms/rabbitmq-server

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 41
Proposed branch: lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/cluster_fix
Merge into: lp://qastaging/charms/rabbitmq-server
Diff against target: 190 lines (+64/-53)
3 files modified
hooks/rabbitmq-common (+9/-7)
hooks/rabbitmq-relations (+54/-45)
revision (+1/-1)
To merge this branch: bzr merge lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/cluster_fix
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Review via email: mp+138614@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote :

Hi Adam

I gave this a try; the changes generally look OK BUT I do hit issues when `relation-get private-address` returns an IP address instead of a hostname; this will happen when using the openstack and local providers so I think the charm needs to deal with this as well.

Cheers

James

review: Needs Fixing
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Excerpts from James Page's message of 2012-12-07 10:03:27 UTC:
> Review: Needs Fixing
>
> Hi Adam
>
> I gave this a try; the changes generally look OK BUT I do hit issues when `relation-get private-address` returns an IP address instead of a hostname; this will happen when using the openstack and local providers so I think the charm needs to deal with this as well.
>

Smells like something for charm helper to do.

the sh/net.sh helper already has a 'ch_is_ip' that uses awk to test if the input is an ipv4 address.

Even better would be something like

ch_relation_get_private_ip

and

ch_unit_get_private_ip

Which would hide all the details of turning that into an IP.

43. By Adam Gandelman

Revert use of 'relation-get private-address'

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

I've reverted the charm's peer relations back to their previous behavior. Turns out, when clustering peers, rabbitmq needs to address its peers by the peers' node name, which is the local hostname of that system. Using anything else (IP, FQDN, CNAME) wont work. This is why the original hook passed output of `hostname` across the relation as the hostname and did not use anything from the provider. I've tested on both the EC2 and OSAPI provider and clustering works as expected.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches