[MCOL-4194] Running As Non Root Failing Created: 2020-07-18  Updated: 2020-11-12  Resolved: 2020-07-22

Status: Closed
Project: MariaDB ColumnStore
Component/s: Build, installation
Affects Version/s: 1.5.3
Fix Version/s: 5.5.1

Type: Bug Priority: Major
Reporter: Todd Stoffel (Inactive) Assignee: Gregory Dorman (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
PartOf
is part of MCOL-4012 Enable ColumnStore to run as a non ro... Closed

 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



 Comments   
Comment by Todd Stoffel (Inactive) [ 2020-07-19 ]

This can probably be documented for now. It's not much different than the original 1.0 instructions.

https://mariadb.com/kb/en/preparing-for-columnstore-installation-10x/#non-root-user-installs

Comment by Gregory Dorman (Inactive) [ 2020-07-22 ]

This is to be resolved by MCOL-4012.

Generated at Thu Feb 08 02:48:30 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.