Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 226804 - chkconfig behavior returns an error that looks like a syntax problem when it should not
Summary: chkconfig behavior returns an error that looks like a syntax problem when it ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: chkconfig
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Ben Levenson
URL:
Whiteboard:
: 439361 (view as bug list)
Depends On:
Blocks: 234547
TreeView+ depends on / blocked
 
Reported: 2007-02-01 18:00 UTC by Red Hat Production Operations
Modified: 2014-03-17 03:05 UTC (History)
2 users (show)

Fixed In Version: RHBA-2008-0456
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-21 15:27:05 UTC


Attachments (Terms of Use)
potential patch (deleted)
2007-02-01 18:21 UTC, Bill Nottingham
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2008:0456 normal SHIPPED_LIVE chkconfig bug fix update 2008-05-20 14:28:23 UTC

Description Red Hat Production Operations 2007-02-01 18:00:53 UTC
Description of problem:

On any of our OS releases prior to RHEL5 (and FC5/6 as far as I can tell), chkconfig would return no 
error output when it was executed on a host to query for a service if it is not installed.  Example:

[csmith@monitor ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
[monitor.mgmt.stage.redhat.com] [12:54:03 PM]
[csmith@monitor ~]$ rpm -qa | grep ypserv
[monitor.mgmt.stage.redhat.com] [12:54:10 PM]
[csmith@monitor ~]$ /sbin/chkconfig ypserv
[monitor.mgmt.stage.redhat.com] [12:54:18 PM]
[csmith@monitor ~]$

On RHEL5 hosts, it now returns what _appears_ as a syntax error on the host with the same situation:

[root@rhnserver3 ~]# /sbin/chkconfig ypserv
chkconfig version 1.3.30.1 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage:   chkconfig --list [name]
         chkconfig --add <name>
         chkconfig --del <name>
         chkconfig [--level <levels>] <name> <on|off|reset|resetpriorities>
[rhnserver3.proxy.stage.redhat.com] [12:55:57 PM]
[root@rhnserver3 ~]# yum -y install ypserv &>/dev/null
[rhnserver3.proxy.stage.redhat.com] [12:56:28 PM]
[root@rhnserver3 ~]# /sbin/chkconfig ypserv
[rhnserver3.proxy.stage.redhat.com] [12:56:34 PM]
[root@rhnserver3 ~]# rpm -e ypserv
[rhnserver3.proxy.stage.redhat.com] [12:56:36 PM]
[root@rhnserver3 ~]# 

This causes errors to be displayed in shell commands or automated scripts that rely on it.  STDERR can 
certainly be redirected, but this doesn't seem to be the correct solution or the correct behavior for the 
command based on past history.

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

chkconfig-1.3.13.4-1 (RHEL4u4)
chkconfig-1.3.30.1-1 (RHEL5b2+)

How reproducible:

On any RHEL5 box, at any time.

Steps to Reproduce:

See information pasted above.
  
Actual results:

See information pasted above.

Expected results:

I would expect the command to return with no error output.

Additional info:

Comment 1 Bill Nottingham 2007-02-01 18:20:05 UTC
So, this is the result of two fixes:

- enable 'chkconfig <foo>' to work for xinetd services (bug 63123)
- reporting errors when passed invalid commandline arguments (bug 147393)

These went into chkconfig-1.3.15, which was in FC4+.

We could change this, although it would essentially revert bug 147393.

Comment 2 Bill Nottingham 2007-02-01 18:21:00 UTC
Created attachment 147126 [details]
potential patch

Comment 3 Red Hat Production Operations 2007-02-01 18:27:43 UTC
Bill--

That's cool.  But how is what I've shown in my example an incorrect command line argument?  

CMS

Comment 4 Bill Nottingham 2007-02-01 18:35:26 UTC
It's really not. I suppose someone might want more feedback about the service
not existing, as opposed to just not being enabled. But that would be a bigger
change.

Putting on the 5.1 radar.

Comment 5 RHEL Product and Program Management 2007-06-05 20:38:54 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Since this
bugzilla is in a component that is not approved for the current
release, it has been closed with resolution deferred.  You may
reopen this bugzilla for consideration in the next release.

Comment 9 Bill Nottingham 2007-11-13 17:15:07 UTC
Fixed in 1.3.30.1-2.

Comment 13 Vladimir Giszpenc 2008-03-26 14:15:47 UTC
The "fix" is to swallow the fact that something is wrong.  If a user does 

  chkconfig --list foo

You get:
error reading information on service foo: No such file or directory

Why not give the same message for

  chkconfig foo


Comment 14 Bill Nottingham 2008-03-26 15:17:29 UTC
Because changing it breaks past historical usage.

Comment 15 Bill Nottingham 2008-03-28 15:56:35 UTC
*** Bug 439361 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2008-05-21 15:27:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0456.html



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