[lucid-proposed] post-start script broken

Bug #608423 reported by Jürgen Kreileder
62
This bug affects 9 people
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Fix Released
High
Chuck Short
Lucid
Invalid
Undecided
Unassigned
Maverick
Fix Released
High
Chuck Short
mysql-dfsg-5.1 (Ubuntu)
Invalid
High
Unassigned
Lucid
Fix Released
High
Chuck Short
Maverick
Invalid
High
Unassigned

Bug Description

5.1.41-3ubuntu12.4 from lucid-proposed has a broken post-start script.

After starting mysql, /var/log/syslog says:
init: mysql post-start process (11493) terminated with status 1

Looking at the post-start script shows two problems:

1) ret = $?
Note the spaces before and after the '='. There should be none!
As it is now, it tries to run a command called "ret" instead of setting a variable.

2) /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
If this returns a non-zero exit status (most likely because mysql isn't fully up yet), the post-script exits immediately!
You need a "set +e" or something else that keeps the post-start script from exiting prematurely if the command returns with something != 0.

Jürgen Kreileder (jk)
tags: added: regression-proposed
Revision history for this message
hyper_ch (bugs-launchpad-net-roleplayer) wrote :

Well, since yesterday mysql won't be properly started anymore at boot-up. Grepping the syslog only returns this:

Jul 23 10:27:28 kubi kernel: [ 105.206415] type=1505 audit(1279873648.967:10): operation="profile_load" pid=914 name="/usr/sbin/mysqld"
Jul 23 10:27:29 kubi kernel: [ 105.281964] type=1505 audit(1279873649.044:11): operation="profile_load" pid=979 name="/usr/sbin/mysqld-akonadi"

I don't get the error that the thread opener gets but in effect, mysql is not being started at boot up.

Martin Pitt (pitti)
summary: - post-start script broken
+ [lucid-proposed] post-start script broken
Revision history for this message
Neil Wallace (rowinggolfer) wrote :

+1.

please do not push this up to the stable repos.

Revision history for this message
Richard Hansen (rhansen) wrote :

I have created a PPA for this bug and submitted a fix:

https://edge.launchpad.net/~a7x/+archive/bug608423

It'll take a while before it's done building.

Revision history for this message
Richard Hansen (rhansen) wrote :

Nominating for Lucid according to the instructions at https://wiki.ubuntu.com/StableReleaseUpdates#Verification

tags: added: patch
Revision history for this message
Richard Hansen (rhansen) wrote :

I've updated the debdiff to fix another bug introduced in 5.1.41-3ubuntu12.4: mysql wasn't starting at boot (see comment #1) because of a missing space.

Revision history for this message
Martin Pitt (pitti) wrote :

Chuck, can you please reupload with -v to include the previous lucid-proposed upload?

I see that you removed the "echo timeout", which was discussed in Prague. Thanks for fixing that.

I also see

@@ -30,15 +30,8 @@
     for i in `seq 1 30` ; do
- /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
- ret = $?
- if [ $ret -eq 0 ] ; then
- break
- fi
+ /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping || ret=$?
                sleep 1

This removes the break, but I don't see why? If we don't break the loop on success, then it will always keep trying 30 times?

Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
assignee: nobody → Chuck Short (zulcss)
importance: Undecided → High
Revision history for this message
Christoph (christoph-thomas) wrote :

Hi Chuck,
the same bug is in Maverick mysql-server 5.1.48-1ubuntu3. The patchworks flawless.
Thanks, Christoph

Mathias Gug (mathiaz)
Changed in mysql-dfsg-5.1 (Ubuntu):
importance: Undecided → High
Revision history for this message
Richard Hansen (rhansen) wrote :

I have updated my debdiff to not echo anything if mysqld times out. The updated package should show up in my PPA [1] in a few hours.

Chuck's latest upload [2], currently awaiting approval in the upload queue [3], still has a couple of issues:
 1. it does not fix the missing space issue in the "start on" clause, so mysql won't start on boot
 2. it doesn't sleep between pings

Is there a reason why my patch is being ignored?

[1] https://edge.launchpad.net/~a7x/+archive/bug608423
[2] debdiff: http://launchpadlibrarian.net/52600418/mysql-dfsg-5.1_5.1.41-3ubuntu12.4_5.1.41-3ubuntu12.5.diff.gz
[3] https://edge.launchpad.net/ubuntu/lucid/+queue?queue_state=1&queue_text=mysql-dfsg-5.1

Revision history for this message
Richard Hansen (rhansen) wrote :

There's a third (minor) issue with the latest upload:

    3. If exec fails for some reason, the script will keep attempting to exec debian-start when it should simply fail.

Revision history for this message
Martin Pitt (pitti) wrote :

Chuck, please fix mysql-5.1 in maverick as well, it has the same problem.

Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Invalid
Changed in mysql-5.1 (Ubuntu Lucid):
status: New → Invalid
Changed in mysql-5.1 (Ubuntu Maverick):
importance: Undecided → High
assignee: nobody → Chuck Short (zulcss)
milestone: none → maverick-alpha-3
status: New → Fix Committed
Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted mysql-dfsg-5.1 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Since this regression only affected lucid-proposed, I close the lucid task.

Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Fixed in maverick's mysql-5.1 5.1.48-1ubuntu4.

Changed in mysql-5.1 (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Jürgen Kreileder (jk) wrote :

I agree with a7x. This is not fixed at all: Neither in lucid-proposed (a7x's points 1, 2, and 3) nor in maverick (just point 2, 3 as the new maverick package does have a 'sleep 1').

For the record, I did try the lucid-proposed package nevertheless. syslog still reports 'mysql post-start process (...) terminated with status 1'.

tags: added: verification-failed
removed: verification-needed
Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: Fix Released → In Progress
Changed in mysql-5.1 (Ubuntu Maverick):
status: Fix Released → In Progress
Revision history for this message
ideasbuenas (ideasbuenas) wrote : Re: [Bug 608423] Re: [lucid-proposed] post-start script broken

unsuscribe ideasbuenas <email address hidden>

On Wed, Jul 28, 2010 at 3:19 PM, Jürgen Kreileder <email address hidden> wrote:

> I agree with a7x. This is not fixed at all: Neither in lucid-proposed
> (a7x's points 1, 2, and 3) nor in maverick (just point 2, 3 as the new
> maverick package does have a 'sleep 1').
>
> For the record, I did try the lucid-proposed package nevertheless.
> syslog still reports 'mysql post-start process (...) terminated with
> status 1'.
>
> ** Tags added: verification-failed
> ** Tags removed: verification-needed
>
> ** Changed in: mysql-dfsg-5.1 (Ubuntu Lucid)
> Status: Fix Released => In Progress
>
> ** Changed in: mysql-5.1 (Ubuntu Maverick)
> Status: Fix Released => In Progress
>
> --
> [lucid-proposed] post-start script broken
> https://bugs.launchpad.net/bugs/608423
> You received this bug notification because you are subscribed to Lucid.
>
> Status in “mysql-5.1” package in Ubuntu: In Progress
> Status in “mysql-dfsg-5.1” package in Ubuntu: Invalid
> Status in “mysql-5.1” source package in Lucid: Invalid
> Status in “mysql-dfsg-5.1” source package in Lucid: In Progress
> Status in “mysql-5.1” source package in Maverick: In Progress
> Status in “mysql-dfsg-5.1” source package in Maverick: Invalid
>
> Bug description:
> 5.1.41-3ubuntu12.4 from lucid-proposed has a broken post-start script.
>
> After starting mysql, /var/log/syslog says:
> init: mysql post-start process (11493) terminated with status 1
>
> Looking at the post-start script shows two problems:
>
> 1) ret = $?
> Note the spaces before and after the '='. There should be none!
> As it is now, it tries to run a command called "ret" instead of setting a
> variable.
>
> 2) /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
> If this returns a non-zero exit status (most likely because mysql isn't
> fully up yet), the post-script exits immediately!
> You need a "set +e" or something else that keeps the post-start script from
> exiting prematurely if the command returns with something != 0.
>
>
>

Revision history for this message
Richard Hansen (rhansen) wrote :

See bug #611101 for the missing "sleep 1" issue.

Revision history for this message
Richard Hansen (rhansen) wrote :

See bug #611102 for the missing space preventing startup at boot issue.

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted mysql-dfsg-5.1 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
DAP (akadap) wrote :

Latest patch also does not work for me. mysql is not started on boot.

Revision history for this message
DAP (akadap) wrote :

(my last comment was nearly simultaneous with Martin Pitt's announcement, so it refers to the previous version.)

The latest version appears to work. (mysql is running after a reboot, did not check for spurious entries in the logs).

Revision history for this message
Richard Hansen (rhansen) wrote :

5.1.41-3ubuntu12.6 works for me.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for testing! Closing lucid task, since the regression was only in -proposed.

tags: added: verification-done
removed: verification-needed
Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: Fix Committed → Fix Released
Revision history for this message
Christoph (christoph-thomas) wrote :

Hi,
maverick's mysql-5.1 5.1.48-1ubuntu4 does'n work for me. Might be the missing space "runlevel[2345]" "runlevel [2345]" problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.1 - 5.1.48-1ubuntu5

---------------
mysql-5.1 (5.1.48-1ubuntu5) maverick; urgency=low

  * debian/mysql-server-5.1.mysql.upstart: Fix upstart init script. (LP: #608423)
 -- Chuck Short <email address hidden> Sun, 01 Aug 2010 11:23:11 -0400

Changed in mysql-5.1 (Ubuntu Maverick):
status: In Progress → Fix Released
Revision history for this message
Christoph (christoph-thomas) wrote :

Hi Chuck,
mysql-5.1 (5.1.48-1ubuntu5) maverick works for me.
Thanks for this fix,
Christoph

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.