[MXS-2931] MXS-2810 still unfixed in RHEL / CentOS 6 packages Created: 2020-03-16  Updated: 2020-08-25  Resolved: 2020-04-07

Status: Closed
Project: MariaDB MaxScale
Component/s: Packaging
Affects Version/s: 2.4.7
Fix Version/s: 2.3.18, 2.3.19, 2.4.8, 2.4.9

Type: Bug Priority: Minor
Reporter: Hartmut Holzgraefe Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MXS-2969 maxscale service still not stopped / ... Closed
relates to MXS-2810 maxscale process still running after ... Closed

 Description   

MDEV-2810 "maxscale process still running after uninstalling maxscale package" was fixed for distributions using SystemD, but RHEL 6 and CentOS 6 still use the older SysV init system.

So on uninstall service maxscale stop needs to be invoked instead of systemctl stop maxscale in the prerm hook script in the maxscale RPM package ...



 Comments   
Comment by markus makela [ 2020-03-16 ]

I think this will be fixed by commit 13658fe23e02e04d9a9f7e0b33f5c1c28b22ee45 which will be in 2.4.8 and 2.3.18.

Comment by Hartmut Holzgraefe [ 2020-03-30 ]

I just tried 2.3.18 on CentOS 6, but it still seems to be unfixed there:

[root@localhost vagrant]# yum install maxscale
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: ftp.plusline.net
 * extras: ftp.plusline.net
 * updates: mirror2.hs-esslingen.de
Resolving Dependencies
--> Running transaction check
---> Package maxscale.x86_64 0:2.3.18-1 will be installed
--> Processing Dependency: libgnutls.so.26(GNUTLS_1_4)(64bit) for package: maxscale-2.3.18-1.x86_64
--> Processing Dependency: libgnutls.so.26()(64bit) for package: maxscale-2.3.18-1.x86_64
--> Running transaction check
---> Package gnutls.x86_64 0:2.12.23-22.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package        Arch         Version               Repository              Size
================================================================================
Installing:
 maxscale       x86_64       2.3.18-1              mariadb-maxscale        25 M
Installing for dependencies:
 gnutls         x86_64       2.12.23-22.el6        base                   389 k
 
Transaction Summary
================================================================================
Install       2 Package(s)
 
Total download size: 25 M
Installed size: 96 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): gnutls-2.12.23-22.el6.x86_64.rpm                  | 389 kB     00:00     
(2/2): maxscale-2.3.18-1.centos.6.x86_64.rpm             |  25 MB     00:02     
--------------------------------------------------------------------------------
Total                                           7.8 MB/s |  25 MB     00:03     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : gnutls-2.12.23-22.el6.x86_64                                 1/2 
  Installing : maxscale-2.3.18-1.x86_64                                     2/2 
  Verifying  : gnutls-2.12.23-22.el6.x86_64                                 1/2 
  Verifying  : maxscale-2.3.18-1.x86_64                                     2/2 
 
Installed:
  maxscale.x86_64 0:2.3.18-1                                                    
 
Dependency Installed:
  gnutls.x86_64 0:2.12.23-22.el6                                                
 
Complete!
[root@localhost vagrant]# service maxscale start
Starting MaxScale: maxscale (pid 3832) is running...       [  OK  ]
[root@localhost vagrant]# ps aux | grep max
maxscale  3832  0.6  0.6 274716  6384 ?        Ssl  12:17   0:00 /usr/bin/maxscale --user=maxscale
root      3845  0.0  0.0 103320   856 pts/0    R+   12:17   0:00 grep max
[root@localhost vagrant]# yum remove maxscale
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package maxscale.x86_64 0:2.3.18-1 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package         Arch          Version           Repository                Size
================================================================================
Removing:
 maxscale        x86_64        2.3.18-1          @mariadb-maxscale         95 M
 
Transaction Summary
================================================================================
Remove        1 Package(s)
 
Installed size: 95 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : maxscale-2.3.18-1.x86_64                                     1/1 
  Verifying  : maxscale-2.3.18-1.x86_64                                     1/1 
 
Removed:
  maxscale.x86_64 0:2.3.18-1                                                    
 
Complete!
[root@localhost vagrant]# ps aux | grep max
maxscale  3832  0.4  0.6 274716  6384 ?        Ssl  12:17   0:00 /usr/bin/maxscale --user=maxscale
root      3855  0.0  0.0 103320   856 pts/0    R+   12:17   0:00 grep max

Comment by markus makela [ 2020-03-30 ]

To speed up the bug fixing process, can you check whether the /etc/init.d/maxscale file exists after maxscale has been installed and whether it is still there once the package is removed? If the init file is properly installed and uninstalled, I can't see why the process isn't stopped as the init script is called to stop maxscale right before it is removed.

Comment by markus makela [ 2020-03-30 ]

Managed to verify that the script is removed and called correctly but this does not kill the MaxScale process. This is due to the fact that the script is given as a post uninstall script instead of a pre uninstall script which causes it to be run after all the files and directories, including /var/run/maxscale where the PID file resides, have been deleted. This appears to result in MaxScale not being stopped because the SysV script uses the PID file to kill the process, unlike systemd which simply knows which process to kill.

Generated at Thu Feb 08 04:17:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.