Bug 201391

Summary: daemon() macro doesn't normalize the nicelevel
Product: [Fedora] Fedora Reporter: Bill Rugolsky, Jr. <bill>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CANTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-17 00:02:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to set the nicelevel explicitly none

Description Bill Rugolsky, Jr. 2006-08-04 19:07:23 UTC
Description of problem:

When upgrading packages on a production server, we find it desirable to "nice"
the update process.  Unfortunately, this interacts poorly with the post-install
restart logic and the initscripts daemon logic.  The attached patch changes
initscripts to treat NICELEVEL and the nicelevel argument to daemon() as
absolute nicelevels, and uses nice to adjust the level accordingly.  It has an
unfortunate dependency on the coreutils /bin/nice SUSv3-compatible extension
which causes nice to return the process nicelevel if a command to execute is
not specified.  

Version-Release number of selected component (if applicable):
initscripts-8.38-1 and earlier.

How reproducible:
Always.

Steps to Reproduce:
1. nice rpm -Uvh openssh*.rpm
2. ps -o command,nice -p $(pgrep -x sshd)
  
Actual results:
COMMAND                      NI
/usr/sbin/sshd               10

Expected results:
COMMAND                      NI
/usr/sbin/sshd                0

Additional info:

Comment 1 Bill Rugolsky, Jr. 2006-08-04 19:07:24 UTC
Created attachment 133656 [details]
patch to set the nicelevel explicitly

Comment 2 Bill Nottingham 2007-04-17 00:02:53 UTC
Unfortunately, setting it as absolutes changes the existing (documented)
behavior, so this can't be done as-is.