Bug 607223 - initscript problems
initscript problems
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpuspeed (Show other bugs)
6.0
All Linux
high Severity medium
: rc
: ---
Assigned To: Petr Šabata
Filip Skola
:
Depends On:
Blocks: 633349
  Show dependency treegraph
 
Reported: 2010-06-23 10:34 EDT by Karel Volný
Modified: 2016-05-05 00:40 EDT (History)
6 users (show)

See Also:
Fixed In Version: cpuspeed-1.5-14.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 15:02:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Volný 2010-06-23 10:34:13 EDT
Description of problem:
1. The initscript does not unload modules on stop.

2. 'service cpuspeed reload' restarts the service

but the guidelines (https://fedoraproject.org/wiki/Packaging/SysVInitScript#Required_Actions) say:

"reload: reload the configuration of the service without actually stopping and restarting the service (if the service does not support this, do nothing)"

The configuration of cpuspeed is done via commandline parameters, to my best knowledge there is no method to ask the running daemon to reload the configuration. Thus 'reload' is not supported => should do nothing (fail with exit code 3, unimplemented feature).

But this is true just when using userspace governor and running the daemon. The reload, i.e. changing parameters without restarting, can be supported for other governors.

In addition, 'reload' on a stopped service should not start the service, which is exactly what happens if doing 'restart'.

3. The initscript acts weird for p4-clockmod case - it refuses to stop. But trying manually, p4_clockmod module can be removed - see also above.

Version-Release number of selected component (if applicable):
cpuspeed-1.5-13.el6
Comment 2 RHEL Product and Program Management 2010-06-23 10:52:57 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Petr Šabata 2010-06-30 08:20:29 EDT
(In reply to comment #0)
> Description of problem:
> 1. The initscript does not unload modules on stop.

This should only be case of the acpi_cpufreq module which cannot be removed once loaded.

> 
> 2. 'service cpuspeed reload' restarts the service
> 
> but the guidelines
> (https://fedoraproject.org/wiki/Packaging/SysVInitScript#Required_Actions) say:
> 
> "reload: reload the configuration of the service without actually stopping and
> restarting the service (if the service does not support this, do nothing)"
> 
> The configuration of cpuspeed is done via commandline parameters, to my best
> knowledge there is no method to ask the running daemon to reload the
> configuration. Thus 'reload' is not supported => should do nothing (fail with
> exit code 3, unimplemented feature).
> 
> But this is true just when using userspace governor and running the daemon. The
> reload, i.e. changing parameters without restarting, can be supported for other
> governors.
> 
> In addition, 'reload' on a stopped service should not start the service, which
> is exactly what happens if doing 'restart'.
> 

The init script now contains the reload() function which should behave with respect to the guidelines.

> 3. The initscript acts weird for p4-clockmod case - it refuses to stop. But
> trying manually, p4_clockmod module can be removed - see also above.
> 

The init script now stops the service.

> Version-Release number of selected component (if applicable):
> cpuspeed-1.5-13.el6    

cpuspeed-1.5-14.el6
https://brewweb.devel.redhat.com/taskinfo?taskID=2564890
Comment 6 Filip Skola 2010-08-09 06:07:07 EDT
Reproduced on cpuspeed-1.5-13.el6:

Problem with 'reload' action starting cpufreqd & problem with modules not unloading:
# service cpuspeed status
cpuspeed is stopped
# service cpuspeed reload

Enabling ondemand cpu frequency scaling:                   [  OK  ]
# /etc/init.d/cpuspeed status
Frequency scaling enabled using ondemand governor
# lsmod | grep cpufreq
cpufreq_ondemand        8454  4 
acpi_cpufreq            7384  1 
# /etc/init.d/cpuspeed stop
Disabling ondemand cpu frequency scaling:                  [  OK  ]
# lsmod | grep cpufreq
acpi_cpufreq            7384  1 

Problem with p4-clockmod:
# lsmod | grep p4_clockmod
p4_clockmod            20187  0 
freq_table              4847  1 p4_clockmod
speedstep_lib           5367  1 p4_clockmod
# service cpuspeed stop
p4-clockmod passive cooling support cannot be stopped
# lsmod | grep p4_clockmod
p4_clockmod            20187  0 
freq_table              4847  1 p4_clockmod
speedstep_lib           5367  1 p4_clockmod


Verified on cpuspeed-1.5-14.el6:

Problem with 'reload' action starting cpufreqd:
# service cpuspeed status
cpuspeed is stopped
# service cpuspeed reload
                                                           [FAILED]
# /etc/init.d/cpuspeed status
cpuspeed is stopped
# /etc/init.d/cpuspeed restart

Enabling ondemand cpu frequency scaling:                   [  OK  ]
# /etc/init.d/cpuspeed status
Frequency scaling enabled using ondemand governor

Problem with modules not unloading:
# /etc/init.d/cpuspeed status
Frequency scaling enabled using ondemand governor
# lsmod | grep cpufreq
cpufreq_ondemand        8454  4 
acpi_cpufreq            7384  1 
# /etc/init.d/cpuspeed stop
Disabling ondemand cpu frequency scaling:                  [  OK  ]
# lsmod | grep cpufreq
acpi_cpufreq            7384  1 

Problem with p4-clockmod:
# lsmod | grep p4_clockmod
p4_clockmod            20187  0 
freq_table              4847  1 p4_clockmod
speedstep_lib           5367  1 p4_clockmod
# service cpuspeed stop
p4-clockmod passive cooling support cannot be truly stopped
# lsmod | grep p4_clockmod
p4_clockmod            20187  0 
freq_table              4847  1 p4_clockmod
speedstep_lib           5367  1 p4_clockmod
Comment 7 releng-rhel@redhat.com 2010-11-10 15:02:29 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.