Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4194

Running As Non Root Failing

    XMLWordPrintable

    Details

      Description

      The new systemd script for columnstore:

      • mariadb-columnstore.service
        calls
      • mariadb-columnstore-start.sh

      which in turn calls:

      • /bin/systemctl start mcs-loadbrm
      • /bin/systemctl start mcs-workernode
      • /bin/systemctl start mcs-controllernode
      • /bin/systemctl start mcs-primproc
      • /bin/systemctl start mcs-writeengineserver
      • /bin/systemctl start mcs-exemgr
      • /bin/systemctl start mcs-dmlproc
      • /bin/systemctl start mcs-ddlproc
      • /bin/systemctl start mcs-storagemanager

      Of these mcs- processes, four of them require setting LimitNOFILE and LimitNPROC.

      • /bin/systemctl start mcs-primproc
      • /bin/systemctl start mcs-writeengineserver
      • /bin/systemctl start mcs-storagemanager
      • /bin/systemctl start mcs-exemgr

      This all needs to be changed to run as the mysql user to bring it into alignment with the server.

      The [Service] section of all these systemd scripts should have included something like this:

      User=mysql
      Group=mysql
      LimitNOFILE=1048576
      LimitNPROC=1048576
      

      Additionally, these folders need to be owned by mysql:

      • /var/lib/columnstore
      • /tmp/columnstore_tmp_files
      • /opt/cmapi
      • /etc/columnstore
      • /var/log/mariadb/columnstore/

      The mysql system user probably needs a shell due to the way some of these scripts are executed:

      chsh -s /bin/bash mysql
      

      A polkit rules file needs to be added since we have nested systemctl scripts:

      polkit.addRule(function(action, subject) {
          if (action.id == "org.freedesktop.systemd1.manage-units") {
              if (subject.isInGroup("mysql")) {
                  return polkit.Result.YES;
              } else {
                  return polkit.Result.AUTH_ADMIN;
              }
          }
      });
      

      And we might even need to chmod 777 the /dev/shm folder

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gdorman Gregory Dorman
              Reporter:
              toddstoffel Todd Stoffel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: