Cloudify-Recipes
  1. Cloudify-Recipes
  2. RECIPES-4

MySQL master-slave mode does not work when startDetectionQuery=""

    Details

      Description

      This is an issue with the MySQL recipe. When startDetectionQuery is set to an empty string (i.e., startDetectionQuery=""), the MySQL master-slave mode does not work.

      The symptom is that although application can write data to the master node, the data never gets replicated to the slave node. On the slave node, mysql is running, but the processes/threads for performing the replication of data from master to slave are not running. The log shows that the slave node is waiting for the master node to become ready.

      This issue is caused by the logic in mysql_startDetection.groovy. The service attribute "masterIsReady" is never set when startDetectionQuery="". It is only set in the branch when startDetectionQuery is not empty.

      Thus, to fix this issue, we need to add code to set masterIsReady to true when the master node is ready in the situation where startDetectionQuery is empty as well.

        Activity

        Hide
        Uri Cohen added a comment -
        Thanks for submitting Lianping.
        We'll look into it. If you have fixed the code already fill free to submit a github pull request.
        Show
        Uri Cohen added a comment - Thanks for submitting Lianping. We'll look into it. If you have fixed the code already fill free to submit a github pull request.
        Hide
        Tamir Korem added a comment -
        Fixed.
        Show
        Tamir Korem added a comment - Fixed.
        Hide
        Tamir Korem added a comment -
        Added a check of an empty startDetection in masterslave more
        Show
        Tamir Korem added a comment - Added a check of an empty startDetection in masterslave more
        Hide
        Tamir Korem added a comment -
        Show
        Tamir Korem added a comment - Get the latest version from https://github.com/CloudifySource/cloudify-recipes

          People

          • Assignee:
            Tamir Korem
            Reporter:
            Lianping Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development