Bug 639101
Summary: | ntp init script is broken | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Simo Sorce <ssorce> |
Component: | ntp | Assignee: | Miroslav Lichvar <mlichvar> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | low | ||
Version: | 14 | CC: | dpal, mlichvar, mschmidt, orion, pertusus, redhat-bugzilla |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ntp-4.2.6p2-7.fc14 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-10-05 13:25:55 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1049322 |
Description
Simo Sorce
2010-09-30 20:26:40 UTC
Btw, while looking at the package I saw that the systemd script is broken too That one also hardcodes these options instead of just sourcing them out of /etc/sysconfig/ntp That needs fixing too. This causes problems for folk distributing /etc/sysconfig/ntpd via cfengine or puppet too. ntpd could be made more forgiving when parsing its command line arguments. If it tolerated multiple occurrences of "-u" and "-p" by accepting the last one given, it would fix the problem, wouldn't it? I don't see why anyone would need to change the "-u" or "-p" options from the default (so hardcoding them is justified), but not breaking old /etc/sysconfig/ntp configs would be nice. The -p option is used only in the SysV script, so I think it made sense to move the options related to init scripts to the scripts themselves. If the user, group and capabilities were set in the systemd unit file by the User=, Group=, Capabilities= directives, the -u option wouldn't be needed at all. Why IPA doesn't only add the -x option instead of replacing the whole line? Anyway, as Michal suggested, I'd rather "fix" this by allowing multiple -u options, the later would take precedence. Is that acceptable for you? (In reply to comment #4) > The -p option is used only in the SysV script, so I think it made sense to move > the options related to init scripts to the scripts themselves. If the user, > group and capabilities were set in the systemd unit file by the User=, Group=, > Capabilities= directives, the -u option wouldn't be needed at all. > > Why IPA doesn't only add the -x option instead of replacing the whole line? Because it was the simplest thing to do ? :) > Anyway, as Michal suggested, I'd rather "fix" this by allowing multiple -u > options, the later would take precedence. Is that acceptable for you? It will make my stuff work, if you think it is better to hardcode these options in the init script then it is up to you I guess. My main issue is to not break working configurations, for the rest I let you choose what's the best way to achieve it. It looked simpler to me to patch the init script then to patch the binary (and faster). Simo. (In reply to comment #5) > It will make my stuff work, if you think it is better to hardcode these options > in the init script then it is up to you I guess. There is a different set of options used when started by systemd and when started the SysV script, so we can put only the common options to the sysconfig file. > My main issue is to not break working configurations, for the rest I let you > choose what's the best way to achieve it. It looked simpler to me to patch the > init script then to patch the binary (and faster). Ok, I'll patch ntpd to allow -u and -p options to be specified twice. I'm hoping this is only a temporary fix and IPA will eventually do the right thing :). ntp-4.2.6p2-7.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/ntp-4.2.6p2-7.fc14 Thank you Miroslaw, I opened this bug upstream to avoid issues in future: https://fedorahosted.org/freeipa/ticket/319 ntp-4.2.6p2-7.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update ntp'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/ntp-4.2.6p2-7.fc14 ntp-4.2.6p2-7.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. Was IPA fixed meanwhile? Because that patch still exists... (In reply to Robert Scheck from comment #11) > Was IPA fixed meanwhile? Because that patch still exists... Yes, about 2 years ago. FYI, the patch in ntp allowing two -u or -p options on command line is now removed in ntp-4.2.6p5-18.fc20. |