Merge lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/ceph-support into lp://qastaging/~openstack-charmers/charms/precise/rabbitmq-server/ha-support

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 41
Proposed branch: lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/ceph-support
Merge into: lp://qastaging/~openstack-charmers/charms/precise/rabbitmq-server/ha-support
Diff against target: 935 lines (+729/-31)
7 files modified
config.yaml (+13/-1)
hooks/lib/ceph.py (+240/-0)
hooks/rabbit_utils.py (+27/-0)
hooks/rabbitmq-server-relations.py (+133/-26)
hooks/utils.py (+312/-2)
metadata.yaml (+3/-1)
revision (+1/-1)
To merge this branch: bzr merge lp://qastaging/~gandelman-a/charms/precise/rabbitmq-server/ceph-support
Reviewer Review Type Date Requested Status
Adam Gandelman (community) Needs Resubmitting
James Page Needs Fixing
Review via email: mp+151343@code.qastaging.launchpad.net

Description of the change

Adds ceph-backed HA clustering, similar to our current mysql configuration. HA configuration is deferred until ceph relation exists. ceph relations use newly refactored ceph.py (from mysql) to setup rbd device and move data to it.

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Note: deployment to precise currently requires the hacluster changes proposed here:

https://code.launchpad.net/~gandelman-a/charms/precise/hacluster/ocf/+merge/151345

55. By Adam Gandelman

Drop utils.py backup.

Revision history for this message
James Page (james-page) wrote :

I'll give this a more better test later this week after UDS - one comment for the time being

1) utils.py/do_hooks()

Hook itself should not be called in the try/except block as KeyErrors will not propagate back up into hook failures with the hook functions themselves - hence the original call to hook_func() in the else block.

Revision history for this message
James Page (james-page) wrote :

Adam

I gave this a good test on precise; generally worked OK but the cluster hooks retain the build rabbitmq style cluster calls which cause hook execution failures on the cluster hook

Do these need to be dropped? The cookie syncs to /var/lib/rabbitmq which is on the rbd device. Maybe only doing the rabbitmq style clustered should be mutex with relating to ceph/being clustered.

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

James- I'd like to preserve the native rabbitmq clustering support that existed before adding the ceph/pacemaker requirements. I thought I had checked to ensure that it the lower-level clustering did not interfere but I'll check agian. Do you remember the order of operations wrt bringing up the cluster? add-relation ceph, add-relation hacluster, add-unit rabbitmq-server? I thought I had tested them all but I'll try again to trigger the errors you're seeing.

56. By Adam Gandelman

Only run peer-hooks for rabbit native clustering if no hacluster relation exists.

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

James-

Seems the issue was when building the cluster in the following order:

deploy rabbitmq-server
add-relation rabbitmq-server ceph
add-relation rabbitmq-server hacluster
add-unit rabbitmq-server

Part of the hacluster configuration requires setting a common rabbitmq node-name by which the server will be addressed. Native rabbitmq clustering (as configured in the peer relations) requires being able to address each server in the cluster as a unique name+host. Simplest solution is to only configure native peer clustering in the absence of an 'ha' relation.

review: Needs Resubmitting
57. By Adam Gandelman

Use or create /etc/rabbitmq/rabbitmq-env.conf for setting node name.

The .d directory is not available on newer package versions, update or
create rabbitmq-env.conf instead when setting node name.

58. By Adam Gandelman

Add missing import.

59. By Adam Gandelman

Add hostname to node name.

60. By Adam Gandelman

do_hooks(): Update exception handling.

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

Updated do_hooks() to match correct exception handling that we use in other charms.

Moved setting of RABBITMQ_NODENAME to /etc/rabbitmq/rabbitmq-env.conf instead of dropping in the .d directory, which newer rabbit packages are not setup to use.

Tested on raring, too.

review: Needs Resubmitting

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