Merge lp:~stub/charms/precise/postgresql/bug-1302494-fix-persistent-storage into lp:charms/postgresql

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 90
Proposed branch: lp:~stub/charms/precise/postgresql/bug-1302494-fix-persistent-storage
Merge into: lp:charms/postgresql
Diff against target: 14 lines (+3/-1)
1 file modified
hooks/hooks.py (+3/-1)
To merge this branch: bzr merge lp:~stub/charms/precise/postgresql/bug-1302494-fix-persistent-storage
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+214218@code.launchpad.net

Description of the change

Don't check the return code of postgresql_stop(), because there isn't one.

This should unbreak persistent storage.

No investment made in writing tests, as this stuff is being replaced by the storage subordinate charm work.

To post a comment you must log in.
Revision history for this message
Liam Young (gnuoy) wrote :

LGTM

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-02-13 13:38:07 +0000
3+++ hooks/hooks.py 2014-04-04 11:39:31 +0000
4@@ -908,7 +908,9 @@
5 # /srv/juju/vol-000012345/postgresql/9.1/main
6 # but keep previous "main/" directory, by renaming it to
7 # main-$TIMESTAMP
8- if not postgresql_stop():
9+ try:
10+ postgresql_stop()
11+ except subprocess.CalledProcessError:
12 log("postgresql_stop() failed - can't migrate data.", ERROR)
13 return False
14 if not os.path.exists(os.path.join(

Subscribers

People subscribed via source and target branches