CentOS 6 init script check_running() reports PID of LXC instance

Bug #1446030 reported by Mark Carbonaro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
New
Wishlist
Unassigned

Bug Description

When running PXC (possible standard Percona Server also) on a LXC host machine instances of mysqld will be found running in the check_running() function of the init script when run on CentOS 6.

This is due to the pidof command being used without the '-c' option, when run with that option the init script no longer finds the mysqld process running in the LXC container and starts correctly.

I'm not sure if this is the correct solution but certainly resolved the issue for my installation, attached is the patch I used.

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi, I can see in your patch that, you have removed -c option

- mysqld_pid=`pidof -c $libexecdir/mysqld`
+ mysqld_pid=`pidof $libexecdir/mysqld`

But, in the latest version of PXC 5.6.22, I don't see -c option with pidof command.

[root@percona-pxc56-2 mysql]# cat /etc/init.d/mysql | grep pidof
        mysqld_pid=`pidof $libexecdir/mysqld`
[root@percona-pxc56-2 mysql]#

So it seems, its already resolved.

Changed in percona-xtradb-cluster:
status: New → Invalid
Revision history for this message
Mark Carbonaro (mark-carbonaro) wrote :

Sorry, I got my diff backwards, we need to add in the -c option.

I'll add the correct patch

Revision history for this message
Mark Carbonaro (mark-carbonaro) wrote :

Here is the correct patch

Changed in percona-xtradb-cluster:
status: Invalid → New
Changed in percona-xtradb-cluster:
importance: Undecided → Wishlist
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1183

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.