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

Option --export-config does not work as documented or in any useful manner

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 24.02.3
    • N/A
    • N/A
    • None
    • Rocky Linux 9.4

    Description

      Your MaxScale training slides and your documentation states to generate a complete configuration file backup/dump one should run the following command:

      1. maxscale --export-config=/home/maxscale/maxscale.cnf.combined

      When doing this I get the error:

      2024-12-10 10:45:55 alert : MaxScale cannot be run as root.

      Which is stupid because I do not want to run/start maxscale but just tell the maxscale daemon to dump the configuration.

      There is also no other message in the error log.

      And we do not have any other user than root on this system. And we also do not want to have any other user on that system:

      1. grep -v nolog /etc/passwd
        root:x:0:0:root:/root:/bin/bash
        sync:x:5:0:sync:/sbin:/bin/sync
        shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
        halt:x:7:0:halt:/sbin:/sbin/halt
        maxscale:x:998:995::/home/maxscale:/bin/false

      When starting the command with a dummy user (not wanted!) we get the following alert:

      [oli@maxscale ~]$ maxscale --export-config=/tmp/test
      2024-12-10 10:48:03 notice : MaxScale will be run in the terminal process.
      2024-12-10 10:48:03 notice : Module 'mariadbmon' loaded from '/usr/lib64/maxscale/libmariadbmon.so'.
      2024-12-10 10:48:03 notice : Module 'readconnroute' loaded from '/usr/lib64/maxscale/libreadconnroute.so'.
      2024-12-10 10:48:03 notice : Module 'readwritesplit' loaded from '/usr/lib64/maxscale/libreadwritesplit.so'.
      2024-12-10 10:48:03 notice : Using up to 2.29GiB of memory for query classifier cache
      2024-12-10 10:48:03 notice : syslog logging is disabled.
      2024-12-10 10:48:03 notice : maxlog logging is enabled.
      2024-12-10 10:48:03 alert : MaxScale doesn't have write permission to '/var/cache/maxscale'.: Permission denied

      Source of documentation: https://mariadb.com/kb/en/mariadb-maxscale-2402-maxscale-2402-mariadb-maxscale-configuration-guide/#backing-up-configuration-changes

      Bonus Info: There is a typo in the docu: "configuration into the it" -> "configuration into it" or "configuration into the file".

      Feature request: Command should look something like: maxctrl config export

      Attachments

        Activity

          johan.wikman Johan Wikman added a comment -

          Invoke MaxScale with the user explicitly specified to be root.

          maxscale --user=root --export-config=/home/maxscale/maxscale.cnf.combined
          

          If you have a feature request, please create it separately.

          johan.wikman Johan Wikman added a comment - Invoke MaxScale with the user explicitly specified to be root. maxscale --user=root --export-config=/home/maxscale/maxscale.cnf.combined If you have a feature request, please create it separately.

          People

            johan.wikman Johan Wikman
            oli Oli Sennhauser
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.