Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-7244

mysql: how to make mysql::server dependent on a mysql::plugin installation?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mysql
    • Labels:
      None
    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 3.11.0
      Puppet Version: 4.10
      OS Name/Version: Ubuntu 14.04

      Describe your issue in as much detail as possible...
      While trying to use the query_response_time.so MySQL plugins (https://www.percona.com/doc/percona-server/5.7/diagnostics/response_time_distribution.html#installing-the-plugins which we want to install via Puppet, we seem to have stumbled upon a rather impossible situation since MySQL refuses to start with an unknown variable 'query_response_time_stats=on', which can only be set after the query_response_time.so MySQL plugins are installed on the server.

      So currently it does install-server with configuration -> install plugins.
      What it should do is install-base-server -> install plugins -> then apply configuration.

      Desired Behavior:
      I want to define that the plugin(s) should be installed right after the installation of the server, but before the $override_options (configuration) contains these value as that results in a non-startable MySQL server:

      2018-06-03 17:57:13 12151 [ERROR] /usr/sbin/mysqld: unknown variable 'query_response_time_stats=on'
      2018-06-03 17:57:13 12151 [ERROR] Aborting
      

      Setting:

      [mysqld]
      query_response_time_stats = on
      

      Via:

      $override_options = {
              mysqld => {
                  'query_response_time_stats'     => 'on',
              },
      }
      

      Plugin installation code:

          mysql_plugin { 'QUERY_RESPONSE_TIME_AUDIT':
              ensure  => 'present',
              soname => 'query_response_time.so',
          }
       
          mysql_plugin { 'QUERY_RESPONSE_TIME':
              ensure  => 'present',
              soname => 'query_response_time.so',
          }
       
          mysql_plugin { 'QUERY_RESPONSE_TIME_READ':
              ensure  => 'present',
              soname => 'query_response_time.so',
          }
       
          mysql_plugin { 'QUERY_RESPONSE_TIME_WRITE':
              ensure  => 'present',
              soname => 'query_response_time.so',
          }
      

      Current way of dependency management:

          # Dependency management. Only use that part if you are installing the repository
          # as shown in the Preliminary step of this example.
          Apt::Source['percona'] ~> Class['apt::update'] -> Class['::mysql::server']
      

      Actual Behavior:
      See in the text above.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            djvdorp Daniel van Dorp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support