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

Get rid of deprecated /var/run paths

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 5.5(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
    • 10.5.4
    • None

    Description

      Probably in all distros "/var/run" was migrated to "/run" but you can still find remnants of "/var/run" paths in mariadb files:

      debian/mariadb-server-10.2.postinst
      58:    # This is needed because mysql_install_db removes the pid file in /var/run
      61:    # script fails. I can't tell at this point because of the cleaned /var/run.
      67:    mysql_rundir=/var/run/mysqld
       
      debian/mariadb-server-10.2.mysql.init
      111:    test -e /var/run/mysqld || install -m 755 -o mysql -g root -d /var/run/mysqld
       
      debian/mariadb-server-10.2.logcheck.ignore.server
      2:/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
       
      debian/mariadb-server-10.2.logcheck.ignore.paranoid
      1:/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
      5:mysqld\[[0-9]+\]: Version: .* socket: '/var/run/mysqld/mysqld.sock'  port: 3306$
       
      debian/mariadb-server-10.2.logcheck.ignore.workstation
      2:/etc/init.d/mysql\[[0-9]+\]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists\!$
       
      debian/additions/my.cnf
      20:socket		= /var/run/mysqld/mysqld.sock
      27:socket		= /var/run/mysqld/mysqld.sock
      35:pid-file	= /var/run/mysqld/mysqld.pid
      36:socket		= /var/run/mysqld/mysqld.sock
       
      debian/mariadb-server-10.2.postrm
      70:    rm -rf /var/run/mysqld # this directory is created by the init script, don't leave behind
       
      storage/maria/ma_test_force_start.pl
      57:my $server_pid_name="./var/run/master.pid";
       
      support-files/policy/apparmor/usr.sbin.mysqld
      57:  /var/run/mysqld/mysqld.pid w,
      58:  /var/run/mysqld/mysqld.sock w,
       
      libmariadb/.travis/build/Dockerfile
      66:    	&& rm -rf /var/lib/mysql && mkdir -p /var/lib/mysql /var/run/mysqld \
      67:    	&& chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
      68:    	&& chmod 777 /var/run/mysqld \
       
      cmake/systemd.cmake
      59:          SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
       
      cmake/install_layout.cmake
      187:SET(INSTALL_UNIX_ADDRDIR_DEB            "/var/run/mysqld/mysqld.sock")
      

      It should be updated to "/run".

      Attachments

        Issue Links

          Activity

            faust We still have

            ± grep -rF var/run/m *
            cmake/systemd.cmake:          SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld")
            storage/maria/ma_test_force_start.pl:my $server_pid_name="./var/run/master.pid";
            

            otto Otto Kekäläinen added a comment - faust We still have ± grep -rF var/run/m * cmake/systemd.cmake: SET(SYSTEMD_EXECSTARTPRE "ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld") storage/maria/ma_test_force_start.pl:my $server_pid_name="./var/run/master.pid";
            faust Faustin Lammler added a comment - - edited

            HI!

            cmake/systemd.cmake
            

            Handled by https://github.com/MariaDB/server/pull/1105, I will see with danblack how to proceed.

            For:

            storage/maria/ma_test_force_start.pl:my $server_pid_name="./var/run/master.pid";
            

            and also:

            mysql-test/lib/v1/mtr_process.pl:  # We scan the "var/run/" directory for other process id's to kill
              my $rundir= "$::opt_vardir/run";
            

            Maybe anel wants to take a look and confirm that it's easy to test that it can easily be changed?

            faust Faustin Lammler added a comment - - edited HI! cmake/systemd.cmake Handled by https://github.com/MariaDB/server/pull/1105 , I will see with danblack how to proceed. For: storage/maria/ma_test_force_start.pl: my $server_pid_name = "./var/run/master.pid" ; and also: mysql-test/lib/v1/mtr_process.pl: # We scan the "var/run/" directory for other process id's to kill my $rundir = "$::opt_vardir/run" ; Maybe anel wants to take a look and confirm that it's easy to test that it can easily be changed?

            danblack is PR #1105 related to this MDEV? If yes should MDEV be open?
            faust mtr creates its own var/ folder related to build-dir, so it's mtr specific folder:

            anel@anel:~/mariadb/builds/10.5/mysql-test$ ls |grep var
            var
            

            anel Anel Husakovic added a comment - danblack is PR #1105 related to this MDEV? If yes should MDEV be open? faust mtr creates its own var/ folder related to build-dir , so it's mtr specific folder: anel@anel:~/mariadb/builds/10.5/mysql-test$ ls |grep var var
            danblack Daniel Black added a comment -

            > PR #1105 related to this MDEV? If yes should MDEV be open?

            Its the final piece of the cleanup. Given the time passed, make a new MDEV for it 1105.

            danblack Daniel Black added a comment - > PR #1105 related to this MDEV? If yes should MDEV be open? Its the final piece of the cleanup. Given the time passed, make a new MDEV for it 1105.

            Filed this now as MDEV-30874 due to previous comment.

            otto Otto Kekäläinen added a comment - Filed this now as MDEV-30874 due to previous comment.

            People

              danblack Daniel Black
              kstreitova Kristyna Streitova
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.