Results 1 to 4 of 4

Thread: [heartbeat] mysql.resource script

  1. #1
    Join Date
    Feb 2006
    Location
    Groningen, NL
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation [heartbeat] mysql.resource script

    Since the update to Ubuntu 10.04 this mysql.resource file (/etc/ha.d/resource.d/mysql - see URL below) doesn't work anymore, since 10.04 is using "service" / "upstart-job"...

    Original: http://dev.mysql.com/doc/refman/5.1/...beat-drbd.html

    Is it OK to change it into something like this instead?

    Code:
    start)
            #res=`/etc/init.d/mysql start`
            res=`/usr/sbin/service mysql start`
            ret=$?
            ha_log $res
            exit $ret
            ;;
    Or has anyone found the updated resource-script(s)? TIA!

  2. #2
    Join Date
    Aug 2009
    Location
    West Sussex, England
    Beans
    117
    Distro
    Ubuntu

    Re: [heartbeat] mysql.resource script

    That should work fine.

    Only caveat though is to check this file after updates to check it is not overwritten in future.
    Richard Holloway
    PHP Developer and System Administrator
    http://richardjh.org

  3. #3
    Join Date
    Feb 2006
    Location
    Groningen, NL
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: [heartbeat] mysql.resource script

    Quote Originally Posted by richardjh View Post
    That should work fine.

    Only caveat though is to check this file after updates to check it is not overwritten in future.
    Thanks. I'll give it a try this Thursday in a PRD-cluster.
    AFAIK this specific file is not included in any package.

  4. #4
    Join Date
    Feb 2006
    Location
    Groningen, NL
    Beans
    22
    Distro
    Ubuntu 10.04 Lucid Lynx

    Exclamation Re: [heartbeat] mysql.resource script

    FYI - the above solution DOES NOT work!!

    Code:
    Jul 22 11:17:08 hostname ResourceManager[4420]: [4698]: info: Running /etc/ha.d/resource.d/mysql  stop
    Jul 22 11:17:08 hostname ResourceManager[4420]: [4711]: ERROR: Return code 1 from /etc/ha.d/resource.d/mysql
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4715]: info: Retrying failed stop operation [mysql]
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4725]: info: Running /etc/ha.d/resource.d/mysql  stop
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4738]: ERROR: Return code 1 from /etc/ha.d/resource.d/mysql
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4755]: ERROR: Resource script for mysql probably not LSB-compliant.
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4757]: WARN: it (mysql) MUST succeed on a stop when already stopped
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4759]: WARN: Machine reboot narrowly avoided!
    Jul 22 11:17:09 hostname ResourceManager[4420]: [4774]: info: Running /etc/ha.d/resource.d/Filesystem /dev/drbd0 /var/lib/mysql ext4 stop
    Now looking into replacing the upstart-script with an "old" init.d-script.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •