Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1202834

Summary: s390utils-cpuplugd - cpuplugd daemon doesn't load kernel module CMM
Product: Red Hat Enterprise Linux 6 Reporter: Brian Schonecker <bschonec>
Component: s390utilsAssignee: Dan Horák <dhorak>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.6CC: bschonec, cspicer, cww, dhorak, fkrska, fsumsal, hannsj_uhl, ovasik, psklenar, salmy, secondary-arch-list, stalexan
Target Milestone: rcKeywords: ZStream
Target Release: 6.8   
Hardware: s390x   
OS: Linux   
Whiteboard:
Fixed In Version: s390utils-1.8.2-59.el6 Doc Type: Bug Fix
Doc Text:
Previously, due to a bug in the cpuplugd daemon, the Cooperative Memory Management (CMM) kernel module was not automatically loaded when necessary. As a consequence, hot-plugging memory could only be performed after manually loading CMM. This has been fixed, and now it is possible to hot-plug memory without manually loading CMM.
Story Points: ---
Clone Of:
: 1291892 1309961 (view as bug list) Environment:
Last Closed: 2016-05-11 00:11:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1172231, 1254457, 1291892, 1309961, 1416831    

Description Brian Schonecker 2015-03-17 14:13:13 UTC
Description of problem:

When starting cpuplugd, the daemon doesn't load the kernel module "cmm" (/lib/modules/2.6.32-504.8.1.el6.s390x/kernel/arch/s390/mm/cmm.ko in my case).  The cmm.ko module is required for the OS to hot-add RAM.


Version-Release number of selected component (if applicable):

Name        : s390utils-cpuplugd           Relocations: (not relocatable)
Version     : 1.8.2                             Vendor: Red Hat, Inc.
Release     : 54.el6                        Build Date: Tue 17 Jun 2014 06:53:06 AM EDT

How reproducible:

Start cpuplugd and notice that the module "cmm" isn't loaded.

[root@example sysconfig]# /etc/init.d/cpuplugd start
Starting cpuplugd: [  OK  ]
[root@example sysconfig]# lsmod | grep cmm
[root@example sysconfig]#


Steps to Reproduce:
1.  start cpuplugd
2. notice that 'cmm' module isn't loaded.


Actual results:

cmm module isn't loadded, therefore the hot add RAM feature doesn't work behind the scenes at the s390x hipervisor.

Expected results:

Expect that the cmm.ko module should be loaded at 'cpuplugd start' time.



Additional info:

When loading the module manually via 'modprobe cmm', then the hooks to the hipervisor are in place and hot add RAM functionality works.

Comment 2 Brian Schonecker 2015-05-07 13:31:27 UTC
Any update?  Even a verification of "This doesn't work for me, either" would be nice.

Comment 3 Brian Schonecker 2015-05-07 14:34:18 UTC
/etc/init.d/cpuplugd needs a "modprobe cmm" somewhere in the startup and a "modprobe -r cmm" in the shutdown sequence.  I am not qualified to write such code but a comparison of other init scripts (/etc/init.d/iptables, for example) shows examples of how modules are loaded and unloaded.

Comment 4 Brian Schonecker 2015-06-09 15:49:28 UTC
Three months later an no response from anyone.

Comment 5 Dan Horák 2015-06-09 16:18:58 UTC
I wasn't able to replicate the problem due how the guests I can use are set up, but I agree there is a problem. The question is whether the CMM support shouldn't be rather built in into the kernel instead of being a module.

Comment 6 Brian Schonecker 2015-08-19 12:38:17 UTC
I have created a diff patch file that does solve the problem of the kernel module not being loaded.  WARNING:  I have never submitted a patch before and I am by no means a developer or BASH expert but the patch does work for me.  

[root@ltstd001 ~]# cat cpuplugd.patch


--- cpuplugd    2015-08-19 08:34:09.746233648 -0400
+++ /etc/init.d/cpuplugd        2015-08-19 08:18:07.756397528 -0400
@@ -28,15 +28,31 @@
 
 lockfile=/var/lock/subsys/$prog
 
+# Module name to load/unload on start/stop
+mod=cmm
+
 start() {
     [ -x $exec ] || exit 5
     [ -f $config ] || exit 6
     [ `id -u` -eq 0 ] || exit 4
     echo -n $"Starting $prog: "
+
+    # Load cmm module
+    modprobe $mod > /dev/null 2>&1
+    retval=$?
+    if [ $retval -ne 0 ] 
+      then
+        failure
+        echo
+        echo "Failed to load kernel module ${mod}"
+        exit 7
+    fi
+
     daemon $exec -c $config
     retval=$?
     echo
-    [ $retval -eq 0 ] && touch $lockfile
+
+    [ $retval -eq 0 ] && touch $lockfile || failure
     return $retval
 }
 
@@ -47,6 +63,17 @@
     retval=$?
     echo
     [ $retval -eq 0 ] && rm -f $lockfile
+
+    # Unload module.
+    # The extra test is for 2.6: The module might have autocleaned,
+    # after all referring modules are unloaded.
+    if grep -q "^${mod}" /proc/modules ; then
+        modprobe -r $mod > /dev/null 2>&1
+        res=$?
+        [ $res -eq 0 ] || echo -n " $mod"
+        let retval+=$res;
+    fi
+
     return $retval
 }

Comment 10 Frantisek Sumsal 2016-02-16 09:30:53 UTC
1) Reproducer:
# service cpuplugd start
# lsmod | grep cmm

2) Output
1) Old package
# service cpuplugd start
# lsmod | grep cmm
# echo $?
1

2) New package
# service cpuplugd start
# lsmod | grep cmm                    
cmm                    11092  0 
smsgiucv                5007  1 cmm

Comment 17 errata-xmlrpc 2016-05-11 00:11:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0881.html