Bug 80197
Summary: | redhat-config-date crashes evert time it runs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Art Wagner <awagner> | ||||||
Component: | redhat-config-date | Assignee: | Brent Fox <bfox> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 8.0 | CC: | p.van.egdom | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2003-05-25 14:29:21 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
Art Wagner
2002-12-22 04:34:34 UTC
Can you run '/sbin/service/ntpd status' and post the results to this report? That would be most helpful. Brent; My result for; # /sbin/service/ntpd status bash: /sbin/service/ntpd: Not a directory { the command available in /sbin is "service"] ---------------------------------------------------------------- My result for; # /sbin/service ntpd status /etc/init.d/ntpd: line 25: [: too many arguments { this time we executed "/etc/init.d/ntpd" (sysvinit) and it didn't like "status" ----------------------------------------------------- my results for; # /sbin/service ntpd --status /etc/init.d/ntpd: line 25: [: too many arguments { this time we executed "/etc/init.d/ntpd" (sysvinit) and it didn't like "--status" ======================= Art Oh, I'm sorry. I made a typo. The command should be: '/sbin/service ntpd status' On my system the /etc/init.d/ntpd bash script doesn't seem to like the "status" parameter. The result I get for '/sbin/service ntpd status' actually executes /etc/init.d/ntpd with the parameter "status which results in; /etc/init.d/ntpd: line 25: [: too many arguments Lines 19 - 28 of /etc/init.d/ntpd are; 19 # Check that networking is up. 20 [ ${NETWORKING} = "no" ] && exit 0 21 22 ntpconf=/etc/ntp.conf 23 ntpstep=/etc/ntp/step-tickers 24 25 [ -x /usr/sbin/ntpd -a -f -d $ntpconf ] || exit 0 26 27 RETVAL=0 28 prog="ntpd" Art Umm, something must be very, very wrong with ntp. Passing the 'status' parameter to the initscript should return something like "ntpd is running" or "ntpd is stopped". redhat-config-date relies on some kind of response to '/sbin/service ntpd status' in order to know if the service is running or not. What version of ntp is installed? Also, what is the output of 'rpm -V ntp'? Output of "rpm -V ntp is; S.5....T c /etc/ntp.conf .....UG. c /etc/ntp/drift S.5....T c /etc/rc.d/init.d/ntpd ------------------------------------------------------ Version of ntp per Redhat 8,0 /root/install log is; ntp-4.1.1a-9 ------------------------------------------------------ (note; see your smail at bfox for a question) Created attachment 88861 [details]
strace of command "redhat-config-date" failure
Maybe this will help. This is how the command fails on my system
See "attachment" Something seems to be wrong with my /etc/init.d/ntpd. It fails whenever it is invoked from anywhere, with ANY parameter, ie: stop, start, restart, conrestart, or status. It also fails when invoked in my sysvint startup scripts, per /var/log/messages. As far as I knoe I HAVE NOT edited it manually but it might have been modified ???? by the redhat sysvinit editor while I was playing with getting ntp setup?? Would a copy of my current /etc/init.d/ntpd help you? Art According to rpm -V, something has changed /etc/rc.d/init.d/ntpd. Whatever changed it has caused it to break. Although it's hard to know at this point what changed it, you may want to investigate this matter further. I don't believe that the Red Hat runlevel editor modifies the initscripts directly. Rather, I believe that it changes the symlinks in /etc/rc5.d/ for example. Please attach your /etc/rc.d/init.d/ntpd file to this report. We can diff it against the stock initscript and see where it broke. I would now recommend that you uninstall ntp with 'rpm -e ntp --nodeps' and then reinstall ntp from the cd. I bet the problem will go away. Created attachment 88862 [details]
My /etc/init.d/ntpd
We'll, here's the diff of the pristine initscript and the one you attached:
[bfox@snowbird ntp-4.1.1a]$ diff /etc/rc.d/init.d/ntpd /tmp/ntpd
25c25
< [ -x /usr/sbin/ntpd -a -f $ntpconf ] || exit 0
---
> [ -x /usr/sbin/ntpd -a -f -d $ntpconf ] || exit 0
So as you can see, something added a "-d" option to line 25. I have no idea
what may have changed that file, but I don't think that any of our config tools
could do that. Does removing the "-d" from that line fix the problem?
I uninstalled and reinstalled ntp which fixed the problem, My /etc/init.d/ntpd is now missing the -d. BUT!! if I add the -d back in and do "./ntpd status" from /etc/init.d, I get the failure as I did before, and "Data & Time" from the GUI also fails as before. However if I then remove the -d ntpd status works OK *BUT* "Date & Time" continues to fail ???!!!???!!!. I guess this qualifies as a "AW SH*T". I don't know if there is anywhere we can go from here. I can't think of anything we can do to resolve how the problem got started, or how to prevent it occuring again?? Yeah, I'd expect the problem to reappear if the '-d' option gets added back to the initscript. I will add some code to redhat-config-date that will try to catch this problem. Bascially, if the initscript is busted for some reason (i.e. the program doesn't get the results it expects from the initscript) maybe it will just disable the ntp part of the gui. Should be fixed in redhat-config-date-1.5.6-1, which should appear in Rawhide tomorrow. redhat-config-date now pops up a dialog saying "The NTP initscript (/etc/rc.d/init.d/ntpd) does not seem to be functioning properly. Try running 'rpm -V ntp' to see if the initscript has been modified. redhat-config-date will exit now." This is maybe not the most elegant solution, but it works. I decided that if the initscript is busted, it's better to notify the user of this fact than continue as if nothing is wrong. Thanks for your report on this issue. QA, please verify that this is the current behavior. I deliberately sabotaged the ntpd initscript on my system: [root@powermate init.d]# diff ntpd.original ntpd 13c13 < . /etc/init.d/functions --- > /etc/init.d/functions Running "redhat-config-date", and selecting a time server, generates these errors: /etc/init.d/ntpd: line 143: status: command not found /etc/init.d/ntpd: line 143: status: command not found /etc/init.d/ntpd: line 85: failure: command not found /etc/init.d/ntpd: line 97: daemon: command not found I have not seen the dialog mentioned by Brent in comment #14. Using "redhat-config-date-1.5.9-7" on Phoebe 8.0.94. There is a stack of 64 bugs that have been in Modified state for a long period of time. I am closing these as Rawhide now. If you find that the issue is not fixed, please reopen this report. |