This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 487979 - chkconfig creates ypbind startup script with wrong number
chkconfig creates ypbind startup script with wrong number
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: chkconfig (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-01 18:03 EST by Michael Young
Modified: 2014-03-16 23:17 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-06 01:55:32 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 Michael Young 2009-03-01 18:03:24 EST
chkconfig ypbind on creates links /etc/rc?.d/S28ypbind rather than the expected etc/rc?.d/S27pbind (the configuration line is
# chkconfig: - 27 73
). This is a problem because it means it is started after autofs and this breaks the case where autofs is configured via NIS maps which need ypbind to be running.
Comment 1 Bill Nottingham 2009-03-03 19:19:20 EST
Are you using NetworkManager?
Comment 2 Michael Young 2009-03-03 19:34:25 EST
I don't see how it is relevant, but no, we don't use NetworkManager, preferring the more traditional "network" script.
Comment 3 Bill Nottingham 2009-03-03 20:07:24 EST
If NetworkManager is enabled, NM usually starts as 27, which will cause ypbind to start at 28.

In any case, if ypbind is getting a different level than what's specified, it's because it's being adjusted for its dependencies.
Comment 4 Michael Young 2009-03-05 05:38:56 EST
NetworkManager was installed but not being used. Uninstalling it and turning ypbind off and on in chkconfig returned to the correct place (which would be after NetworkManager anyway if chkconfig hadn't interfered because of the alphanumeric sorting).
Presumably my immediate problem could be fixed by putting a dependency in autofs on ypbind, but there seems to me to be a danger of adding this new functionality to chkconfig unless every package supports it and all dependencies are known because it will break things in unexpected ways and what works for one machine might not work on others. This change also seems to be undocumented as I can't see any reference to it in the chkconfig manual page.
So I think there needs to be better documentation and more publicity that this change has been made (did you consider an increment in the major package version of chkconfig to match this change) or else there will be a lot of broken functionality puzzling users.
Comment 5 Bill Nottingham 2009-03-05 10:19:04 EST
It's not a new change - that code for handling LSB-style dependencies has been in there for a couple of years now.
Comment 6 Michael Young 2009-03-05 10:34:36 EST
It does however seem to be newly active. I didn't notice it in Fedora 10, and chkconfig definitely doesn't renumber ypbind in the same circumstances for Fedora 9. So there should be some announcement that this feature is active, and some documentation I can point out to the maintainer of the autofs package to tell him or her what to fix.
Comment 7 Bill Nottingham 2009-03-05 11:39:59 EST
Well, it becomes 'newly active' when the script writer adds LSB dependencies to their script.

As stated in the man page:

Note that default entries in LSB-delimited ’INIT INFO’ sections take  precedence  over the  default runlevels in the initscript; if any Required-Start or Required-Stop entries are present, the start and stop priorities of the script will be adjusted to account for these dependencies.

I'm not sure how to make it more prominent than that.
Comment 8 Michael Young 2009-03-05 12:29:47 EST
That doesn't explain what the section is or what it is supposed to look like and what other fields are supposed to mean, particularly for those who don't know what "LSB-delimited" means . For example what does Provides: do, does the $ prefix in a Provides entry mean anything, and what other fields matter from the point of view of chkconfig? You really need to already know what the above quote means to understand it.

There should be an explained example in the RUNLEVEL FILES section at the end, which is where someone would expect to find details about what should be in their init.d files, and this should say which fields of the LSB are implemented in chkconfig.
Comment 9 Bill Nottingham 2009-03-05 13:22:20 EST
(In reply to comment #8)
> That doesn't explain what the section is or what it is supposed to look like
> and what other fields are supposed to mean, particularly for those who don't
> know what "LSB-delimited" means . For example what does Provides: do, does the
> $ prefix in a Provides entry mean anything, and what other fields matter from
> the point of view of chkconfig? You really need to already know what the above
> quote means to understand it.

Sure, but if you don't understand the LSB spec, you wouldn't add the section to your init file, and you won't run into this issue. I think it's out of scope for the chkconfig man page.
Comment 10 Michael Young 2009-03-05 14:25:00 EST
But you do run into this issue because other people have put that section into their init scripts and chkconfig mismanages the order of packages if you don't. So in practise what you are going to do is copy someone else's script and find something that works because chkconfig doesn't adequately explain what it is doing or where to find more information about the right way to do it.
Comment 11 Bill Nottingham 2009-03-06 01:55:32 EST
Two fixes added in git:
- chkconfig.8 updated to mention LSB scripts in more places
- chkconfig updates so it won't refactor start priorities when the providing service isn't actually enabled (and similar for stop services). This should avoid NM changing your init script priorities when it's installed but not enabled.
Comment 12 Ian Collier 2009-05-08 09:14:04 EDT
Arguably, "chkconfig --add" shouldn't reset the priorities of services that are already enabled (if you want that there's always the "resetpriorities" argument).  That way, the priorities wouldn't break when you update a package.

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