Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34570

mariabackup prepare fails with data-at-rest encryption and "-u root" option

    XMLWordPrintable

Details

    Description

      When running the mariabackup --prepare step the --user=root option is not needed like it is with the --backup step, but it usually doesn't harm either though.

      In combination with data-at-rest encryption though only the long form --user=root and the no-whitepsace -uroot short form work, the short form -u root with whitespace causes the prepare step to fail even though it works just fine with the backup step earlier.

      [00] 2024-07-11 10:49:33 Loading encryption plugin from hashicorp_key_management=hashicorp_key_management
      [00] 2024-07-11 10:49:33 Loading encryption plugin
      [00] 2024-07-11 10:49:33         Encryption plugin parameter :  '--prepare'
      [00] 2024-07-11 10:49:33         Encryption plugin parameter :  '-u'
      [00] 2024-07-11 10:49:33         Encryption plugin parameter :  'root'
      mariabackup: Can't open shared library '/hashicorp_key_management.so' (errno: 2, cannot open shared object file: No such file or directory)
      2024-07-11 10:49:33 0 [ERROR] Couldn't load plugin 'hashicorp_key_management' from 'hashicorp_key_management.so'.
      [00] 2024-07-11 10:49:33 This target seems to be not prepared yet.
      

      Same output section when using the long form:

      [00] 2024-07-11 09:19:36 Loading encryption plugin from hashicorp_key_management=hashicorp_key_management
      [00] 2024-07-11 09:19:36 Loading encryption plugin
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--plugin_load=hashicorp_key_management=hashicorp_key_management'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_cache_timeout=60000'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_cache_version_timeout=0'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_caching_enabled=ON'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_check_kv_version=ON'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_max_retries=3'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_timeout=15'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_use_cache_on_timeout=OFF'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_vault_ca='
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--hashicorp_key_management_vault_url=http://vault:8200/v1/test'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--innodb_encrypt_log=1'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--innodb_encrypt_tables=FORCE'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--prepare'
      [00] 2024-07-11 09:19:36         Encryption plugin parameter :  '--user=root'
      [00] 2024-07-11 09:19:36 This target seems to be not prepared yet.
      

      So looks as if the command line parameter processing in extra/mariabackup/encryption_plugin.cc is not doing things correctly here, and so the plugin_dir path does not get set up correctly when using -u root with whitespace, so that root ends up in an argv element of it own.

      Attachments

        Activity

          People

            hholzgra Hartmut Holzgraefe
            hholzgra Hartmut Holzgraefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.