Bug 702735
Summary: | [regression] NetworkManager 0.8.999-1 breaks dhclient dispatch script API | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | James Ralston <ralston> |
Component: | dhcp | Assignee: | Jiri Popelka <jpopelka> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 15 | CC: | dcbw, jpopelka |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dhcp-4.2.1-7.P1.fc15 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-05-19 05:08:49 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: |
Description
James Ralston
2011-05-06 19:18:35 UTC
I've tried reverting to NetworkManager-0.8.998-4.git20110427.fc15.x86_64 and that doesn't work either. So that indicates that the recent NM change was not the culprit. What version of NM and dhcp were you running previously? In NM 0.8.999, I see the correct environment variables getting from nm-dispatcher.action to /etc/NetworkManager/dispatcher.d/11-dhclient, but then 11-dhclient (from the dhcp package) doesn't seem to be able to convert the variables and stick them in the environment for subscripts; the bits: eval "$( declare | LC_ALL=C grep '^DHCP4_[A-Z_]*=' | while read opt; do optname=${opt%%=*} optname=${optname,,} optname=new_${optname#dhcp4_} optvalue=${opt#*=} echo "$optname=$optvalue" done )" which are supposed to do that work fine until the "echo xxx" statement, which doesn't actually stuff the new_XXXX variables into the environment of subscripts (or even itself) despite the conversion from NM -> dhclient naming having gone fine. I modified 11-dhclient to print out the environment it is given, and that is as expected, yet a script called by 11-dhclient (placed in /etc/dhcp/dhclient.d/) does not receive the changed variable names. Even more debugging of 11-dhclient indicates that everything in that block except the 'echo' statement performs as expected. I did testcases with the change of NM dispatcher behavior from 0.8.998 to 0.8.999 to ensure that the existing script environment did *not* change, and given that and the information above, I'm thinking this is more an 11-dhclient script problem instead of an NM problem... dhcp guys, anything here look suspicious to you? Yeah, this isn't an NM problem. We want this change made to 11-dhclient: eval "$( declare | LC_ALL=C grep '^DHCP4_[A-Z_]*=' | while read opt; do optname=${opt%%=*} optname=${optname,,} optname=new_${optname#dhcp4_} optvalue=${opt#*=} - echo "$optname=$optvalue" + echo "export $optname=$optvalue" done )" which will get the right thing done for subscript environments. I wonder how this was apparently working before? Thank you, Dan. dhcp-4.2.1-7.P1.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/dhcp-4.2.1-7.P1.fc15 Package dhcp-4.2.1-7.P1.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing dhcp-4.2.1-7.P1.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/dhcp-4.2.1-7.P1.fc15 then log in and leave karma (feedback). dhcp-4.2.1-7.P1.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report. |