mysql-server-5.0 installation reports svcadm error

Bug #335676 reported by Magnus Hedemark
2
Affects Status Importance Assigned to Milestone
Nexenta Operating System
Confirmed
Low
anilg

Bug Description

root@kraken:~# apt-get install mysql-server-5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  mysql-doc-5.0 tinyca
Recommended packages:
  apparmor libhtml-template-perl
The following NEW packages will be installed:
  mysql-server-5.0
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.7MB of archives.
After this operation, 81.5MB of additional disk space will be used.
Get:1 http://apt.nexenta.org hardy-unstable/main mysql-server-5.0 5.0.51a-3nexen ta7.4-build1 [25.7MB]
Fetched 25.7MB in 1min35s (269kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-server-5.0.
(Reading database ... 72794 files and directories currently installed.)
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3nexenta7.4-build1 _solaris-i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-server-5.0 (5.0.51a-3nexenta7.4-build1) ...
svcadm: Pattern 'svc:/application/database/mysql:default' doesn't match any inst ances
invoke-rc.d: initscript mysql, action "disable -st" failed.

root@kraken:~# echo $?
0
root@kraken:~#

Revision history for this message
Tim Spriggs (tim-tajinc) wrote :

I see this same message but it appears that mysql is running:

root@fiji:/usr/src# svcs mysql
STATE STIME FMRI
online 15:53:17 svc:/application/database/mysql:default

root@fiji:/usr/src# ps -ef | grep mysql
    root 9496 9458 0 15:53:15 ? 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    root 9567 17069 0 15:55:13 pts/2 0:00 grep mysql
    root 9458 29620 0 15:53:15 ? 0:00 /bin/sh /usr/bin/mysqld_safe
   mysql 9495 9458 0 15:53:15 ? 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-fil

Revision history for this message
Magnus Hedemark (viridari) wrote :

root@kraken:~# svcadm enable svc:/application/database/mysql:default
root@kraken:~# echo $?
0
root@kraken:~# ps -eaf | grep mysqld
    root 14133 14075 0 23:56:38 ? 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
    root 14075 1 0 23:56:33 ? 0:00 /bin/sh /usr/bin/mysqld_safe
    root 14177 12141 0 23:57:04 pts/2 0:00 grep mysqld
   mysql 14130 14075 0 23:56:38 ? 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-fil
root@kraken:~#

Once the package is installed, I can enable it without any problems, so I'm not sure what's going on during the installation here.

Revision history for this message
anilg (anil-verve) wrote :

Ok.. this is simply because the post-install scripts tries to stop any running mysql instances.. The relevant code is

-----snip----
# This is necessary because mysql_install_db removes the pid file in /var/run
# and because changed configuration options should take effect immediately.
# In case the server wasn't running at all it should be ok if the stop
# script fails. I can't tell at this point because of the cleaned /var/run.
set +e; invoke stop; set -e
-----------

invoke calls -> "/usr/sbin/invoke-rc.d stop", which turns stop into "disable -st" for svcadm. SMF hasn't been imported yet. Removing the above messages would mean, modifying invoke-rc.d, which is a part of sysv-rc package

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

Other bug subscribers

Remote bug watches

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