Merge lp:~bloodearnest/charms/precise/pgbouncer/fix-port-restart into lp:charms/pgbouncer

Proposed by Simon Davy
Status: Merged
Merged at revision: 65
Proposed branch: lp:~bloodearnest/charms/precise/pgbouncer/fix-port-restart
Merge into: lp:charms/pgbouncer
Diff against target: 15 lines (+5/-1)
1 file modified
hooks/hooks.py (+5/-1)
To merge this branch: bzr merge lp:~bloodearnest/charms/precise/pgbouncer/fix-port-restart
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+261945@code.launchpad.net

Commit message

Do full restart if port changes

Description of the change

Do full restart if port changes

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

All good. Tests pass. Not that you added one, you lazy bum. Landing anyway.

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 2014-06-19 12:43:41 +0000
3+++ hooks/hooks.py 2015-06-15 10:32:57 +0000
4@@ -87,7 +87,11 @@
5 master, standbys)
6 open_ports(config)
7 if host.service_running(SERVICE_NAME):
8- host.service_reload(SERVICE_NAME)
9+ if config.changed('listen_port') or config.changed('listen_addr'):
10+ stop()
11+ start()
12+ else:
13+ host.service_reload(SERVICE_NAME)
14
15 recreate_console_shortcut()
16

Subscribers

People subscribed via source and target branches

to all changes: