Merge lp:~gnuoy/charms/trusty/percona-cluster/use-dc into lp:~openstack-charmers-archive/charms/trusty/percona-cluster/next
- Trusty Tahr (14.04)
- use-dc
- Merge into next
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Billy Olsen | ||||
Approved revision: | 65 | ||||
Merged at revision: | 61 | ||||
Proposed branch: | lp:~gnuoy/charms/trusty/percona-cluster/use-dc | ||||
Merge into: | lp:~openstack-charmers-archive/charms/trusty/percona-cluster/next | ||||
Diff against target: |
326 lines (+122/-19) 7 files modified
hooks/charmhelpers/contrib/hahelpers/cluster.py (+25/-0) hooks/charmhelpers/contrib/peerstorage/__init__.py (+2/-0) hooks/charmhelpers/core/hookenv.py (+86/-10) hooks/charmhelpers/core/host.py (+1/-1) hooks/charmhelpers/core/services/base.py (+2/-2) hooks/charmhelpers/fetch/__init__.py (+1/-1) hooks/percona_hooks.py (+5/-5) |
||||
To merge this branch: | bzr merge lp:~gnuoy/charms/trusty/percona-cluster/use-dc | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Billy Olsen | Approve | ||
Review via email:
|
Commit message
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4269 percona-
UNIT OK: passed
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4123 percona-
AMULET FAIL: amulet-test missing
AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.
Full amulet test output: http://
Build: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4362 percona-
UNIT OK: passed
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4637 percona-
LINT FAIL: lint-test failed
LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.
Full lint test output: http://
Build: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4264 percona-
AMULET FAIL: amulet-test missing
AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.
Full amulet test output: http://
Build: http://
- 65. By Liam Young
-
Fix lint
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #4418 percona-
UNIT OK: passed
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #4738 percona-
LINT OK: passed
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #4274 percona-
AMULET FAIL: amulet-test missing
AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.
Full amulet test output: http://
Build: http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Billy Olsen (billy-olsen) wrote : | # |
Ah thanks Liam - I think this is what it should have been doing all along.
Preview Diff
1 | === modified file 'hooks/charmhelpers/contrib/hahelpers/cluster.py' | |||
2 | --- hooks/charmhelpers/contrib/hahelpers/cluster.py 2015-03-03 02:26:12 +0000 | |||
3 | +++ hooks/charmhelpers/contrib/hahelpers/cluster.py 2015-05-22 18:56:07 +0000 | |||
4 | @@ -52,6 +52,8 @@ | |||
5 | 52 | bool_from_string, | 52 | bool_from_string, |
6 | 53 | ) | 53 | ) |
7 | 54 | 54 | ||
8 | 55 | DC_RESOURCE_NAME = 'DC' | ||
9 | 56 | |||
10 | 55 | 57 | ||
11 | 56 | class HAIncompleteConfig(Exception): | 58 | class HAIncompleteConfig(Exception): |
12 | 57 | pass | 59 | pass |
13 | @@ -95,6 +97,27 @@ | |||
14 | 95 | return False | 97 | return False |
15 | 96 | 98 | ||
16 | 97 | 99 | ||
17 | 100 | def is_crm_dc(): | ||
18 | 101 | """ | ||
19 | 102 | Determine leadership by querying the pacemaker Designated Controller | ||
20 | 103 | """ | ||
21 | 104 | cmd = ['crm', 'status'] | ||
22 | 105 | try: | ||
23 | 106 | status = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | ||
24 | 107 | if not isinstance(status, six.text_type): | ||
25 | 108 | status = six.text_type(status, "utf-8") | ||
26 | 109 | except subprocess.CalledProcessError: | ||
27 | 110 | return False | ||
28 | 111 | current_dc = '' | ||
29 | 112 | for line in status.split('\n'): | ||
30 | 113 | if line.startswith('Current DC'): | ||
31 | 114 | # Current DC: juju-lytrusty-machine-2 (168108163) - partition with quorum | ||
32 | 115 | current_dc = line.split(':')[1].split()[0] | ||
33 | 116 | if current_dc == get_unit_hostname(): | ||
34 | 117 | return True | ||
35 | 118 | return False | ||
36 | 119 | |||
37 | 120 | |||
38 | 98 | @retry_on_exception(5, base_delay=2, exc_type=CRMResourceNotFound) | 121 | @retry_on_exception(5, base_delay=2, exc_type=CRMResourceNotFound) |
39 | 99 | def is_crm_leader(resource, retry=False): | 122 | def is_crm_leader(resource, retry=False): |
40 | 100 | """ | 123 | """ |
41 | @@ -104,6 +127,8 @@ | |||
42 | 104 | We allow this operation to be retried to avoid the possibility of getting a | 127 | We allow this operation to be retried to avoid the possibility of getting a |
43 | 105 | false negative. See LP #1396246 for more info. | 128 | false negative. See LP #1396246 for more info. |
44 | 106 | """ | 129 | """ |
45 | 130 | if resource == DC_RESOURCE_NAME: | ||
46 | 131 | return is_crm_dc() | ||
47 | 107 | cmd = ['crm', 'resource', 'show', resource] | 132 | cmd = ['crm', 'resource', 'show', resource] |
48 | 108 | try: | 133 | try: |
49 | 109 | status = subprocess.check_output(cmd, stderr=subprocess.STDOUT) | 134 | status = subprocess.check_output(cmd, stderr=subprocess.STDOUT) |
50 | 110 | 135 | ||
51 | === modified file 'hooks/charmhelpers/contrib/peerstorage/__init__.py' | |||
52 | --- hooks/charmhelpers/contrib/peerstorage/__init__.py 2015-05-13 10:21:30 +0000 | |||
53 | +++ hooks/charmhelpers/contrib/peerstorage/__init__.py 2015-05-22 18:56:07 +0000 | |||
54 | @@ -73,6 +73,8 @@ | |||
55 | 73 | exc_list = exc_list if exc_list else [] | 73 | exc_list = exc_list if exc_list else [] |
56 | 74 | peerdb_settings = peer_retrieve('-', relation_name=relation_name) | 74 | peerdb_settings = peer_retrieve('-', relation_name=relation_name) |
57 | 75 | matched = {} | 75 | matched = {} |
58 | 76 | if peerdb_settings is None: | ||
59 | 77 | return matched | ||
60 | 76 | for k, v in peerdb_settings.items(): | 78 | for k, v in peerdb_settings.items(): |
61 | 77 | full_prefix = prefix + delimiter | 79 | full_prefix = prefix + delimiter |
62 | 78 | if k.startswith(full_prefix): | 80 | if k.startswith(full_prefix): |
63 | 79 | 81 | ||
64 | === modified file 'hooks/charmhelpers/core/hookenv.py' | |||
65 | --- hooks/charmhelpers/core/hookenv.py 2015-05-13 10:21:30 +0000 | |||
66 | +++ hooks/charmhelpers/core/hookenv.py 2015-05-22 18:56:07 +0000 | |||
67 | @@ -21,12 +21,14 @@ | |||
68 | 21 | # Charm Helpers Developers <juju@lists.ubuntu.com> | 21 | # Charm Helpers Developers <juju@lists.ubuntu.com> |
69 | 22 | 22 | ||
70 | 23 | from __future__ import print_function | 23 | from __future__ import print_function |
71 | 24 | from functools import wraps | ||
72 | 24 | import os | 25 | import os |
73 | 25 | import json | 26 | import json |
74 | 26 | import yaml | 27 | import yaml |
75 | 27 | import subprocess | 28 | import subprocess |
76 | 28 | import sys | 29 | import sys |
77 | 29 | import errno | 30 | import errno |
78 | 31 | import tempfile | ||
79 | 30 | from subprocess import CalledProcessError | 32 | from subprocess import CalledProcessError |
80 | 31 | 33 | ||
81 | 32 | import six | 34 | import six |
82 | @@ -58,15 +60,17 @@ | |||
83 | 58 | 60 | ||
84 | 59 | will cache the result of unit_get + 'test' for future calls. | 61 | will cache the result of unit_get + 'test' for future calls. |
85 | 60 | """ | 62 | """ |
86 | 63 | @wraps(func) | ||
87 | 61 | def wrapper(*args, **kwargs): | 64 | def wrapper(*args, **kwargs): |
88 | 62 | global cache | 65 | global cache |
89 | 63 | key = str((func, args, kwargs)) | 66 | key = str((func, args, kwargs)) |
90 | 64 | try: | 67 | try: |
91 | 65 | return cache[key] | 68 | return cache[key] |
92 | 66 | except KeyError: | 69 | except KeyError: |
96 | 67 | res = func(*args, **kwargs) | 70 | pass # Drop out of the exception handler scope. |
97 | 68 | cache[key] = res | 71 | res = func(*args, **kwargs) |
98 | 69 | return res | 72 | cache[key] = res |
99 | 73 | return res | ||
100 | 70 | return wrapper | 74 | return wrapper |
101 | 71 | 75 | ||
102 | 72 | 76 | ||
103 | @@ -178,7 +182,7 @@ | |||
104 | 178 | 182 | ||
105 | 179 | def remote_unit(): | 183 | def remote_unit(): |
106 | 180 | """The remote unit for the current relation hook""" | 184 | """The remote unit for the current relation hook""" |
108 | 181 | return os.environ['JUJU_REMOTE_UNIT'] | 185 | return os.environ.get('JUJU_REMOTE_UNIT', None) |
109 | 182 | 186 | ||
110 | 183 | 187 | ||
111 | 184 | def service_name(): | 188 | def service_name(): |
112 | @@ -250,6 +254,12 @@ | |||
113 | 250 | except KeyError: | 254 | except KeyError: |
114 | 251 | return (self._prev_dict or {})[key] | 255 | return (self._prev_dict or {})[key] |
115 | 252 | 256 | ||
116 | 257 | def get(self, key, default=None): | ||
117 | 258 | try: | ||
118 | 259 | return self[key] | ||
119 | 260 | except KeyError: | ||
120 | 261 | return default | ||
121 | 262 | |||
122 | 253 | def keys(self): | 263 | def keys(self): |
123 | 254 | prev_keys = [] | 264 | prev_keys = [] |
124 | 255 | if self._prev_dict is not None: | 265 | if self._prev_dict is not None: |
125 | @@ -353,14 +363,29 @@ | |||
126 | 353 | """Set relation information for the current unit""" | 363 | """Set relation information for the current unit""" |
127 | 354 | relation_settings = relation_settings if relation_settings else {} | 364 | relation_settings = relation_settings if relation_settings else {} |
128 | 355 | relation_cmd_line = ['relation-set'] | 365 | relation_cmd_line = ['relation-set'] |
129 | 366 | accepts_file = "--file" in subprocess.check_output( | ||
130 | 367 | relation_cmd_line + ["--help"]) | ||
131 | 356 | if relation_id is not None: | 368 | if relation_id is not None: |
132 | 357 | relation_cmd_line.extend(('-r', relation_id)) | 369 | relation_cmd_line.extend(('-r', relation_id)) |
139 | 358 | for k, v in (list(relation_settings.items()) + list(kwargs.items())): | 370 | settings = relation_settings.copy() |
140 | 359 | if v is None: | 371 | settings.update(kwargs) |
141 | 360 | relation_cmd_line.append('{}='.format(k)) | 372 | if accepts_file: |
142 | 361 | else: | 373 | # --file was introduced in Juju 1.23.2. Use it by default if |
143 | 362 | relation_cmd_line.append('{}={}'.format(k, v)) | 374 | # available, since otherwise we'll break if the relation data is |
144 | 363 | subprocess.check_call(relation_cmd_line) | 375 | # too big. Ideally we should tell relation-set to read the data from |
145 | 376 | # stdin, but that feature is broken in 1.23.2: Bug #1454678. | ||
146 | 377 | with tempfile.NamedTemporaryFile(delete=False) as settings_file: | ||
147 | 378 | settings_file.write(yaml.safe_dump(settings).encode("utf-8")) | ||
148 | 379 | subprocess.check_call( | ||
149 | 380 | relation_cmd_line + ["--file", settings_file.name]) | ||
150 | 381 | os.remove(settings_file.name) | ||
151 | 382 | else: | ||
152 | 383 | for key, value in settings.items(): | ||
153 | 384 | if value is None: | ||
154 | 385 | relation_cmd_line.append('{}='.format(key)) | ||
155 | 386 | else: | ||
156 | 387 | relation_cmd_line.append('{}={}'.format(key, value)) | ||
157 | 388 | subprocess.check_call(relation_cmd_line) | ||
158 | 364 | # Flush cache of any relation-gets for local unit | 389 | # Flush cache of any relation-gets for local unit |
159 | 365 | flush(local_unit()) | 390 | flush(local_unit()) |
160 | 366 | 391 | ||
161 | @@ -509,6 +534,11 @@ | |||
162 | 509 | return None | 534 | return None |
163 | 510 | 535 | ||
164 | 511 | 536 | ||
165 | 537 | def unit_public_ip(): | ||
166 | 538 | """Get this unit's public IP address""" | ||
167 | 539 | return unit_get('public-address') | ||
168 | 540 | |||
169 | 541 | |||
170 | 512 | def unit_private_ip(): | 542 | def unit_private_ip(): |
171 | 513 | """Get this unit's private IP address""" | 543 | """Get this unit's private IP address""" |
172 | 514 | return unit_get('private-address') | 544 | return unit_get('private-address') |
173 | @@ -605,3 +635,49 @@ | |||
174 | 605 | 635 | ||
175 | 606 | The results set by action_set are preserved.""" | 636 | The results set by action_set are preserved.""" |
176 | 607 | subprocess.check_call(['action-fail', message]) | 637 | subprocess.check_call(['action-fail', message]) |
177 | 638 | |||
178 | 639 | |||
179 | 640 | def status_set(workload_state, message): | ||
180 | 641 | """Set the workload state with a message | ||
181 | 642 | |||
182 | 643 | Use status-set to set the workload state with a message which is visible | ||
183 | 644 | to the user via juju status. If the status-set command is not found then | ||
184 | 645 | assume this is juju < 1.23 and juju-log the message unstead. | ||
185 | 646 | |||
186 | 647 | workload_state -- valid juju workload state. | ||
187 | 648 | message -- status update message | ||
188 | 649 | """ | ||
189 | 650 | valid_states = ['maintenance', 'blocked', 'waiting', 'active'] | ||
190 | 651 | if workload_state not in valid_states: | ||
191 | 652 | raise ValueError( | ||
192 | 653 | '{!r} is not a valid workload state'.format(workload_state) | ||
193 | 654 | ) | ||
194 | 655 | cmd = ['status-set', workload_state, message] | ||
195 | 656 | try: | ||
196 | 657 | ret = subprocess.call(cmd) | ||
197 | 658 | if ret == 0: | ||
198 | 659 | return | ||
199 | 660 | except OSError as e: | ||
200 | 661 | if e.errno != errno.ENOENT: | ||
201 | 662 | raise | ||
202 | 663 | log_message = 'status-set failed: {} {}'.format(workload_state, | ||
203 | 664 | message) | ||
204 | 665 | log(log_message, level='INFO') | ||
205 | 666 | |||
206 | 667 | |||
207 | 668 | def status_get(): | ||
208 | 669 | """Retrieve the previously set juju workload state | ||
209 | 670 | |||
210 | 671 | If the status-set command is not found then assume this is juju < 1.23 and | ||
211 | 672 | return 'unknown' | ||
212 | 673 | """ | ||
213 | 674 | cmd = ['status-get'] | ||
214 | 675 | try: | ||
215 | 676 | raw_status = subprocess.check_output(cmd, universal_newlines=True) | ||
216 | 677 | status = raw_status.rstrip() | ||
217 | 678 | return status | ||
218 | 679 | except OSError as e: | ||
219 | 680 | if e.errno == errno.ENOENT: | ||
220 | 681 | return 'unknown' | ||
221 | 682 | else: | ||
222 | 683 | raise | ||
223 | 608 | 684 | ||
224 | === modified file 'hooks/charmhelpers/core/host.py' | |||
225 | --- hooks/charmhelpers/core/host.py 2015-05-13 10:21:30 +0000 | |||
226 | +++ hooks/charmhelpers/core/host.py 2015-05-22 18:56:07 +0000 | |||
227 | @@ -90,7 +90,7 @@ | |||
228 | 90 | ['service', service_name, 'status'], | 90 | ['service', service_name, 'status'], |
229 | 91 | stderr=subprocess.STDOUT).decode('UTF-8') | 91 | stderr=subprocess.STDOUT).decode('UTF-8') |
230 | 92 | except subprocess.CalledProcessError as e: | 92 | except subprocess.CalledProcessError as e: |
232 | 93 | return 'unrecognized service' not in e.output | 93 | return b'unrecognized service' not in e.output |
233 | 94 | else: | 94 | else: |
234 | 95 | return True | 95 | return True |
235 | 96 | 96 | ||
236 | 97 | 97 | ||
237 | === modified file 'hooks/charmhelpers/core/services/base.py' | |||
238 | --- hooks/charmhelpers/core/services/base.py 2015-05-13 10:21:30 +0000 | |||
239 | +++ hooks/charmhelpers/core/services/base.py 2015-05-22 18:56:07 +0000 | |||
240 | @@ -17,7 +17,7 @@ | |||
241 | 17 | import os | 17 | import os |
242 | 18 | import re | 18 | import re |
243 | 19 | import json | 19 | import json |
245 | 20 | from collections import Iterable | 20 | from collections import Iterable, OrderedDict |
246 | 21 | 21 | ||
247 | 22 | from charmhelpers.core import host | 22 | from charmhelpers.core import host |
248 | 23 | from charmhelpers.core import hookenv | 23 | from charmhelpers.core import hookenv |
249 | @@ -119,7 +119,7 @@ | |||
250 | 119 | """ | 119 | """ |
251 | 120 | self._ready_file = os.path.join(hookenv.charm_dir(), 'READY-SERVICES.json') | 120 | self._ready_file = os.path.join(hookenv.charm_dir(), 'READY-SERVICES.json') |
252 | 121 | self._ready = None | 121 | self._ready = None |
254 | 122 | self.services = {} | 122 | self.services = OrderedDict() |
255 | 123 | for service in services or []: | 123 | for service in services or []: |
256 | 124 | service_name = service['service'] | 124 | service_name = service['service'] |
257 | 125 | self.services[service_name] = service | 125 | self.services[service_name] = service |
258 | 126 | 126 | ||
259 | === modified file 'hooks/charmhelpers/fetch/__init__.py' | |||
260 | --- hooks/charmhelpers/fetch/__init__.py 2015-05-13 10:21:30 +0000 | |||
261 | +++ hooks/charmhelpers/fetch/__init__.py 2015-05-22 18:56:07 +0000 | |||
262 | @@ -158,7 +158,7 @@ | |||
263 | 158 | 158 | ||
264 | 159 | def apt_cache(in_memory=True): | 159 | def apt_cache(in_memory=True): |
265 | 160 | """Build and return an apt cache""" | 160 | """Build and return an apt cache""" |
267 | 161 | import apt_pkg | 161 | from apt import apt_pkg |
268 | 162 | apt_pkg.init() | 162 | apt_pkg.init() |
269 | 163 | if in_memory: | 163 | if in_memory: |
270 | 164 | apt_pkg.config.set("Dir::Cache::pkgcache", "") | 164 | apt_pkg.config.set("Dir::Cache::pkgcache", "") |
271 | 165 | 165 | ||
272 | === modified file 'hooks/percona_hooks.py' | |||
273 | --- hooks/percona_hooks.py 2015-05-13 10:21:30 +0000 | |||
274 | +++ hooks/percona_hooks.py 2015-05-22 18:56:07 +0000 | |||
275 | @@ -56,6 +56,7 @@ | |||
276 | 56 | PerconaClusterHelper, | 56 | PerconaClusterHelper, |
277 | 57 | ) | 57 | ) |
278 | 58 | from charmhelpers.contrib.hahelpers.cluster import ( | 58 | from charmhelpers.contrib.hahelpers.cluster import ( |
279 | 59 | DC_RESOURCE_NAME, | ||
280 | 59 | peer_units, | 60 | peer_units, |
281 | 60 | oldest_peer, | 61 | oldest_peer, |
282 | 61 | eligible_leader, | 62 | eligible_leader, |
283 | @@ -74,7 +75,6 @@ | |||
284 | 74 | 75 | ||
285 | 75 | hooks = Hooks() | 76 | hooks = Hooks() |
286 | 76 | 77 | ||
287 | 77 | LEADER_RES = 'grp_percona_cluster' | ||
288 | 78 | RES_MONITOR_PARAMS = ('params user="sstuser" password="%(sstpass)s" ' | 78 | RES_MONITOR_PARAMS = ('params user="sstuser" password="%(sstpass)s" ' |
289 | 79 | 'pid="/var/run/mysqld/mysqld.pid" ' | 79 | 'pid="/var/run/mysqld/mysqld.pid" ' |
290 | 80 | 'socket="/var/run/mysqld/mysqld.sock" ' | 80 | 'socket="/var/run/mysqld/mysqld.sock" ' |
291 | @@ -207,7 +207,7 @@ | |||
292 | 207 | @hooks.hook('db-relation-changed') | 207 | @hooks.hook('db-relation-changed') |
293 | 208 | @hooks.hook('db-admin-relation-changed') | 208 | @hooks.hook('db-admin-relation-changed') |
294 | 209 | def db_changed(relation_id=None, unit=None, admin=None): | 209 | def db_changed(relation_id=None, unit=None, admin=None): |
296 | 210 | if not eligible_leader(LEADER_RES): | 210 | if not eligible_leader(DC_RESOURCE_NAME): |
297 | 211 | log('Service is peered, clearing db relation' | 211 | log('Service is peered, clearing db relation' |
298 | 212 | ' as this service unit is not the leader') | 212 | ' as this service unit is not the leader') |
299 | 213 | relation_clear(relation_id) | 213 | relation_clear(relation_id) |
300 | @@ -269,7 +269,7 @@ | |||
301 | 269 | # TODO: This could be a hook common between mysql and percona-cluster | 269 | # TODO: This could be a hook common between mysql and percona-cluster |
302 | 270 | @hooks.hook('shared-db-relation-changed') | 270 | @hooks.hook('shared-db-relation-changed') |
303 | 271 | def shared_db_changed(relation_id=None, unit=None): | 271 | def shared_db_changed(relation_id=None, unit=None): |
305 | 272 | if not eligible_leader(LEADER_RES): | 272 | if not eligible_leader(DC_RESOURCE_NAME): |
306 | 273 | relation_clear(relation_id) | 273 | relation_clear(relation_id) |
307 | 274 | # Each unit needs to set the db information otherwise if the unit | 274 | # Each unit needs to set the db information otherwise if the unit |
308 | 275 | # with the info dies the settings die with it Bug# 1355848 | 275 | # with the info dies the settings die with it Bug# 1355848 |
309 | @@ -412,7 +412,7 @@ | |||
310 | 412 | password=cfg_passwd) | 412 | password=cfg_passwd) |
311 | 413 | resource_params = {'res_mysql_vip': vip_params, | 413 | resource_params = {'res_mysql_vip': vip_params, |
312 | 414 | 'res_mysql_monitor': | 414 | 'res_mysql_monitor': |
314 | 415 | RES_MONITOR_PARAMS % {'sstpass': sstpsswd}} | 415 | RES_MONITOR_PARAMS % {'sstpass': sstpsswd}} |
315 | 416 | groups = {'grp_percona_cluster': 'res_mysql_vip'} | 416 | groups = {'grp_percona_cluster': 'res_mysql_vip'} |
316 | 417 | 417 | ||
317 | 418 | clones = {'cl_mysql_monitor': 'res_mysql_monitor meta interleave=true'} | 418 | clones = {'cl_mysql_monitor': 'res_mysql_monitor meta interleave=true'} |
318 | @@ -437,7 +437,7 @@ | |||
319 | 437 | @hooks.hook('ha-relation-changed') | 437 | @hooks.hook('ha-relation-changed') |
320 | 438 | def ha_relation_changed(): | 438 | def ha_relation_changed(): |
321 | 439 | clustered = relation_get('clustered') | 439 | clustered = relation_get('clustered') |
323 | 440 | if (clustered and is_leader(LEADER_RES)): | 440 | if (clustered and is_leader(DC_RESOURCE_NAME)): |
324 | 441 | log('Cluster configured, notifying other services') | 441 | log('Cluster configured, notifying other services') |
325 | 442 | # Tell all related services to start using the VIP | 442 | # Tell all related services to start using the VIP |
326 | 443 | for r_id in relation_ids('shared-db'): | 443 | for r_id in relation_ids('shared-db'): |
charm_lint_check #4544 percona- cluster- next for gnuoy mp259240
LINT FAIL: lint-test failed
LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.
Full lint test output: http:// paste.ubuntu. com/11146857/ 10.245. 162.77: 8080/job/ charm_lint_ check/4544/
Build: http://