Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6004

MySQL exporter reporting wrong values for cluster status (wsrep_cluster_status)

    XMLWordPrintable

    Details

    • Story Points:
      0
    • Sprint:
      Platform Sprint 17, Platform Sprint 18
    • Needs Review:
      Yes
    • Needs QA:
      Yes
    • Needs Doc:
      No

      Description

      MySQLd exporters instruments wsrep_cluster_status as:

      ...
       if bytes.Compare(data, []byte("Non-Primary")) == 0 || bytes.Compare(data, []byte("Disconnected")) == 0 {
      
        return 0, true
      
       }
      ...
      

      buy WSREP reports the state as non-Primary, not Non-Primary:

      static const char*  cluster_status_str[WSREP_VIEW_MAX] =
      
      {
      
          "Primary",
      
          "non-Primary",
      
          "Disconnected"
      
      };
      
      

      DoD:

      • Our version of mysqld_exporter fixed
      • Dashboard present correct information
      • PR for upstream created

      Out of scope:

      • waiting for fix this on the upstream side, just send PR for them
      • Update of PS documentation

       

      DOC:  Correct status (non_Primary) has to be shown in documentation too
      https://www.percona.com/doc/percona-xtradb-cluster/LATEST/wsrep-status-index.html

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              iwo.panowicz Iwo Panowicz
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 7 hours, 15 minutes
                  7h 15m

                    Smart Checklist