Bug #2350

Service mysql.init does not support chkconfig

Added by Davide Principi over 7 years ago. Updated over 7 years ago.

Status:CLOSEDStart date:11/26/2013
Priority:NormalDue date:11/27/2013
Assignee:-% Done:

100%

Category:nethserver-mysql
Target version:v6.5-beta3
Security class: Resolution:
Affected version:v6.4-beta2 NEEDINFO:No

Description

In /var/log/messages:

Nov 14 15:34:11 davidep3 esmith::event[21363]: Processing event: runlevel-adjust 
...
Nov 14 15:34:23 davidep3 esmith::event[21363]: service mysql.init does not support chkconfig
...

mysql.init is a service key in configuration DB:

    # config show mysql.init
mysql.init=service
    status=enabled 

Associated revisions

Revision f064c2a4
Added by Davide Principi over 7 years ago

Added chkconfig headers to mysql.init initscript. Refs #2350

Now chkconfig is aware of mysql.init script and does not exit with
error anymore.

Removed config db defaults, to set mysql.init disabled.

Revision 33343d7c
Added by Davide Principi over 7 years ago

New nethserver-mysql-init action. Refs #2350

The nethserver-mysql-init action is compatible with and replaces
"mysql.init" initscript. It loads any *.sql or runs any executable
file from /etc/e-smith/sql/init.

Revision 57fb2eb5
Added by Davide Principi over 7 years ago

Spool directory in /var/spool/nethserver-mysql-init. Refs #2350

Adhere to FHS:
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARSPOOLAPPLICATIONSPOOLDATA

Revision b14d497e
Added by Giacomo Sanchietti over 7 years ago

Revert to commit 33343d7c2fef3b9e63719c623d5f76cb43453087: avoid rpm bug [RH:447156]. Refs #2350

History

#1 Updated by Davide Principi over 7 years ago

If we decide to remove the mysql.init record, remember to write the command to Upgrade-script-64rc1

#2 Updated by Davide Principi over 7 years ago

  • Due date set to 11/27/2013
  • Status changed from NEW to TRIAGED
  • Priority changed from Low to Normal
  • Start date set to 11/26/2013
  • % Done changed from 0 to 20
  • Estimated time set to 4.00

Set priority to normal: the bug causes runlevel-adjust action to fail when running with nethserver-lib >= 1.3.2-18.0gff4d264

#3 Updated by Davide Principi over 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Davide Principi
  • % Done changed from 20 to 30

#4 Updated by Davide Principi over 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 30 to 60

Changes

Added chkconfig headers to mysql.init init script.

Enhancements (tested with restore-data and migration-import):
  • Added nethserver-mysql-init action. Replaces mysql.init
  • Added spool directory /var/spool/nethserver-mysql-init with a symlink from /etc/e-smith/sql/init

#5 Updated by Davide Principi over 7 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70

In nethserver-testing:
nethserver-mysql-1.0.4-3.0git57fb2eb5.ns6.noarch.rpm

#6 Updated by Giacomo Sanchietti over 7 years ago

  • Assignee set to Giacomo Sanchietti

#7 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from ON_QA to TRIAGED
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 70 to 20

Output from yum transaction:

nethserver-mysql-1.0.4-3.0git57fb2eb5.ns6.noarch.rpm                                                                                   |  27 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : nethserver-mysql-1.0.4-3.0git57fb2eb5.ns6.noarch                                                                                           1/2 
Error unpacking rpm package nethserver-mysql-1.0.4-3.0git57fb2eb5.ns6.noarch
error: unpacking of archive failed on file /etc/e-smith/sql/init: cpio: rename
nethserver-mysql-1.0.2-1.ns6.noarch was supposed to be removed but is not!
  Verifying  : nethserver-mysql-1.0.2-1.ns6.noarch                                                                                                        1/2 
  Verifying  : nethserver-mysql-1.0.4-3.0git57fb2eb5.ns6.noarch                                                                                           2/2 

Failed:
  nethserver-mysql.noarch 0:1.0.2-1.ns6                                   nethserver-mysql.noarch 0:1.0.4-3.0git57fb2eb5.ns6                                  

Complete!

Current implementation causes a well-known rpm bug: an upgrade rpm can't replace a directory with a link.
See: https://bugzilla.redhat.com/show_bug.cgi?id=447156, see also https://bugs.launchpad.net/rpm/+bug/633636/comments/3 for an ugly workaround.

#8 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#9 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#10 Updated by Giacomo Sanchietti over 7 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70

Reverted last commit: /etc/e-smith/events/actions/nethserver-mysql-init now uses old directory /etc/e-smith/sql/init/.

New package in nethserver-testing:
  • nethserver-mysql-1.0.4-4.0gitb14d497e.ns6.noarch.rpm

#11 Updated by Davide Principi over 7 years ago

  • Assignee set to Davide Principi

#12 Updated by Davide Principi over 7 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

RPM/cpio conflict does not occur anymore

#13 Updated by Davide Principi over 7 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

In nethserver-updates:
nethserver-mysql-1.0.5-1.ns6.noarch.rpm

Also available in: Atom PDF