Merge lp:~marcoceppi/charms/precise/mysql/actually-start-mysql into lp:charms/mysql

Proposed by Marco Ceppi
Status: Merged
Merged at revision: 113
Proposed branch: lp:~marcoceppi/charms/precise/mysql/actually-start-mysql
Merge into: lp:charms/mysql
Diff against target: 55 lines (+12/-8)
3 files modified
hooks/config-changed (+5/-5)
hooks/start (+5/-1)
hooks/stop (+2/-2)
To merge this branch: bzr merge lp:~marcoceppi/charms/precise/mysql/actually-start-mysql
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
charmers Pending
Review via email: mp+206597@code.launchpad.net

Description of the change

Fix MySQL not restarting properly during first bootup

To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

Verified on:
- HP Cloud - East
- AWS
- Local

review: Approve
Revision history for this message
Charles Butler (lazypower) wrote :

+1 LGTM

Verified on:
- HP Cloud - East
- AWS
- Local

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2014-01-06 20:26:32 +0000
3+++ hooks/config-changed 2014-02-15 21:40:50 +0000
4@@ -220,7 +220,7 @@
5 #
6 # * Fine Tuning
7 #
8-key_buffer = %(key-buffer)s
9+key_buffer_size = %(key-buffer)s
10 max_allowed_packet = 16M
11 # This replaces the startup script and checks MyISAM tables if needed
12 # the first time they are touched
13@@ -292,7 +292,7 @@
14 #no-auto-rehash # faster start of mysql but no tab completition
15
16 [isamchk]
17-key_buffer = 16M
18+key_buffer_size = 16M
19
20 #
21 # * IMPORTANT: Additional settings that can override those from this file!
22@@ -350,7 +350,7 @@
23
24 if need_restart:
25 try:
26- check_call(['service','mysql','stop'])
27+ check_call(['service', 'mysql', 'restart'])
28 except CalledProcessError:
29- pass
30- check_call(['service','mysql','start'])
31+ check_call(['juju-log', '-l', 'INFO', 'Restart failed, trying again'])
32+ check_call(['service', 'mysql', 'restart'])
33
34=== modified file 'hooks/start'
35--- hooks/start 2011-02-07 22:23:02 +0000
36+++ hooks/start 2014-02-15 21:40:50 +0000
37@@ -1,1 +1,5 @@
38-#!/bin/bash
39\ No newline at end of file
40+#!/bin/bash
41+
42+set -e
43+
44+service mysql restart
45
46=== modified file 'hooks/stop'
47--- hooks/stop 2011-02-07 22:23:02 +0000
48+++ hooks/stop 2014-02-15 21:40:50 +0000
49@@ -1,3 +1,3 @@
50-#!/bin/bash
51+#!/bin/sh
52
53-/etc/init.d/mysql stop
54\ No newline at end of file
55+service mysql stop || true

Subscribers

People subscribed via source and target branches

to all changes: