diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2013-12-06 10:02:59 -0600 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-12-09 10:21:20 -0500 |
commit | 03a27c5be9e82add58c8d2f02d7b0f69fe78b9c3 (patch) | |
tree | 55b86e08ddc09a6886acc9008a81444c980051f1 /meta-openstack/recipes-support/postgresql | |
parent | 312a149361b122c8a10a1bb35703ae4e599fc816 (diff) | |
download | meta-cloud-services-03a27c5be9e82add58c8d2f02d7b0f69fe78b9c3.tar.gz |
postgresql: Add corner case for DRBD conversion
If the prior instance of postgresql was running there
is no way to kill it after the conversion to DRBD.
This adds the corner case to stop the old daemon after
the data directory has been migrated.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-support/postgresql')
-rw-r--r-- | meta-openstack/recipes-support/postgresql/postgresql/postgresql | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta-openstack/recipes-support/postgresql/postgresql/postgresql b/meta-openstack/recipes-support/postgresql/postgresql/postgresql index 74f7e2d..5a34ec0 100644 --- a/meta-openstack/recipes-support/postgresql/postgresql/postgresql +++ b/meta-openstack/recipes-support/postgresql/postgresql/postgresql | |||
@@ -55,7 +55,16 @@ stop () | |||
55 | if [ $? -eq 0 ]; then | 55 | if [ $? -eq 0 ]; then |
56 | echo "done." | 56 | echo "done." |
57 | else | 57 | else |
58 | echo "failed." | 58 | if [ -f /etc/postgresql/postmaster.pid -a "$datadir" != "/etc/postgresql" ] ; then |
59 | # Special case for transition | ||
60 | sudo -u postgres /usr/bin/pg_ctl stop -w -D /etc/postgresql -m fast -s | ||
61 | fi | ||
62 | if ! pidof ${DAEMON} > /dev/null; then | ||
63 | echo "done." | ||
64 | else | ||
65 | echo "failed." | ||
66 | exit 1 | ||
67 | fi | ||
59 | fi | 68 | fi |
60 | } | 69 | } |
61 | 70 | ||