Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-121

Ability to launch external scripts from Monitor Plugins

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • Plugin
    • None

    Description

      All monitor plugin should have ability to launch external scripts upon trigger events.
      Example trigger events:

      • Master down
      • New Master found (A Slave has been promoted to a master)

      List of Events and Event Parameters here

      The script to be launched should be invoked with this command line format
      <script_name> --event <event_name> --initiator <initiating_node> --nodelist <server1> <server2> <server3>

      Where event_name is the name of the event, initiator is the node whose status change resulted in this event and nodelist is the list of nodes that the plugin is monitoring

      The script associated with the events should be configurable and admin user should be able to change the configured script name associated with an event during runtime without requireing MaxScale or Service to restart

      Each monitor plugin should also have configurable list of events for which a script will be launched

      Attachments

        Issue Links

          Activity

            I have additional issues performing with failover with scripts, notably because the script passes node names instead of IP addresses. As node names can be absolutely any kind of string and not necessarily resolvable hostnames, I'd rather have the function pass the address= directive as argument, which makes much more sense to me.

            tanj Guillaume Lefranc added a comment - I have additional issues performing with failover with scripts, notably because the script passes node names instead of IP addresses. As node names can be absolutely any kind of string and not necessarily resolvable hostnames, I'd rather have the function pass the address= directive as argument, which makes much more sense to me.

            When failover script returns an error, process becomes a zombie:
            root 2258 0.0 0.0 0 0 ? Z 11:10 0:00 [failover.sh] <defunct>
            root 2698 0.0 0.0 0 0 ? Z 12:25 0:00 [failover.sh] <defunct>

            Please read the following: http://lubutu.com/code/spawning-in-unix and apply one of the suggested techniques at your discretion

            Thanks

            tanj Guillaume Lefranc added a comment - When failover script returns an error, process becomes a zombie: root 2258 0.0 0.0 0 0 ? Z 11:10 0:00 [failover.sh] <defunct> root 2698 0.0 0.0 0 0 ? Z 12:25 0:00 [failover.sh] <defunct> Please read the following: http://lubutu.com/code/spawning-in-unix and apply one of the suggested techniques at your discretion Thanks

            tanj can you please paste the script you launched from MaxScale for your testing ?

            dshjoshi Dipti Joshi (Inactive) added a comment - tanj can you please paste the script you launched from MaxScale for your testing ?

            I have another (albeit small) issue with the current implementation:
            --nodelist is a list of all nodes.
            However, I mostly know this list already. In the case of a master_down event, I would prefer to have the list of remaining nodes only. Why?
            To perform failover, I need to elect a master among the remaining nodes.
            If I want to obtain the full node list, I just need to concatenate "initiator" and "nodelist".

            Thanks

            tanj Guillaume Lefranc added a comment - I have another (albeit small) issue with the current implementation: --nodelist is a list of all nodes. However, I mostly know this list already. In the case of a master_down event, I would prefer to have the list of remaining nodes only. Why? To perform failover, I need to elect a master among the remaining nodes. If I want to obtain the full node list, I just need to concatenate "initiator" and "nodelist". Thanks

            markus makela tturenko Can this be closed now ?

            dshjoshi Dipti Joshi (Inactive) added a comment - markus makela tturenko Can this be closed now ?

            People

              markus makela markus makela
              dshjoshi Dipti Joshi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.