Merge lp:~gandelman-a/charms/precise/hacluster/avoid-osras into lp:~openstack-charmers/charms/quantal/hacluster/trunk

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 7
Proposed branch: lp:~gandelman-a/charms/precise/hacluster/avoid-osras
Merge into: lp:~openstack-charmers/charms/quantal/hacluster/trunk
Diff against target: 25 lines (+6/-2)
1 file modified
hooks/hooks.py (+6/-2)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/hacluster/avoid-osras
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+143626@code.launchpad.net

Description of the change

Moves installation of the openstack-resource-agents package out of the install hook, and only installs when a principle service requests creation of a resource that uses an ocf script of the "ocf:openstack:*" variety.

This lets us use the hacluster charm on precise (where openstack-resource-agents package is currently unavailable) Currently the only charm that makes use of these OS resource agents is the quantum charm being worked @ lp:~openstack-charmers/charms/precise/quantum-gateway/ha-support

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2013-01-11 20:38:29 +0000
3+++ hooks/hooks.py 2013-01-17 00:56:20 +0000
4@@ -18,8 +18,7 @@
5 def install():
6 utils.juju_log('INFO', 'Begin install hook.')
7 utils.configure_source()
8- utils.install('corosync', 'pacemaker',
9- 'openstack-resource-agents', 'python-netaddr')
10+ utils.install('corosync', 'pacemaker', 'python-netaddr')
11 utils.juju_log('INFO', 'End install hook.')
12
13
14@@ -211,6 +210,11 @@
15
16 utils.juju_log('INFO', 'Configuring Resources')
17 utils.juju_log('INFO', str(resources))
18+
19+ if True in [ra.startswith('ocf:openstack')
20+ for ra in resources.itervalues()]:
21+ utils.install('openstack-resource-agents')
22+
23 for res_name, res_type in resources.iteritems():
24 # disable the service we are going to put in HA
25 if res_type.split(':')[0] == "lsb":

Subscribers

People subscribed via source and target branches