Bug 633984
Summary: | Problems with IP alias / multiple IP on interface handling | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Steve Bonneville <sbonnevi> | ||||||||||
Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons | ||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 6.0 | CC: | alex.eiswirth, azelinka, dcbw, jklimes, mishu, mpoole, notting, pknirsch, plautrba | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | initscripts-9.03.18-1.el6 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2011-05-19 13:51:23 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
Steve Bonneville
2010-09-14 20:13:54 UTC
initscripts (i.e. 'network' service) supports IP aliases via ifcfg-eth0:n files. But it doesn't use the new multiple IP configuration by IPADDRn/PREFIXn. NetworkManager, on the other hand, uses new configuration (IPADDRn/PREFIXn), but misses legacy alias support. I agree that initscripts and NetworkManager should behave the same way as they read the same configuration. The missing functionality should be implemented by the both packages. This bug is about adding new multiple IP configuration for 'network' service. So, I re-assign it to initscripts. See patch proposal in the attachment. There is an RFE for alias support in NetworkManager - bug 443968. Created attachment 455579 [details]
Add support for multiple IPs via IPADDRn/PREFIXn
Has this been added to Fedora yet so it can be tested by a broader audience? Thanks & regards, Phil (In reply to comment #4) > Has this been added to Fedora yet so it can be tested by a broader audience? Not yet, it requires a response/review from initscripts developers/maintainers. Bill, are you for the patch? Looks OK in general (and pushed for rawhide.) However, how does NM handle this for IPv6 - does it just write IPV6ADDR_SECONDARIES? ... and the answer to that is yes. Although, I intend to change it to start at 0, to match the static routes. And also to not use seq, but to just use a bashism. Created attachment 463876 [details]
Add support for multiple IPs via IPADDRn/PREFIXn
Here's an updated patch. Changes:
- uses bash rather than seq
- allows for zero-indexed IPADDRn, to match the static-routes format
-- while still not bailing with NM-written configs that start at 2
- uses array variables to attempt to cut down on the number of subshells and evals. Only partially successful, but, well, bash is bash.
Yeah, NM uses IPV6ADDR and IPV6ADDR_SECONDARIES. It has been implemented according to sysconfig.txt description. Thanks for pushing the change! Your patch looks good; you are obviously better in bash than me :) Just to summarize: Initscripts now accept IPADDR and IPADDRn, where n is 0 .. 255. So max. is 256 IP addresses. The indices have to be contiguous, because parsing ends on the first missing variable. The exception to this is that indices 0 and 1 could be omitted to match the current NM behaviour (IPADDR, IPADDR2, IPADDR3,...) Valid examples: IPADDR0, IPADDR1, IPADDRD2, ... IPADDR1, IPADDR2, IPADDRD3, ... IPADDR, IPADDR1, IPADDRD2, ... IPADDR25, IPADDR26, IPADDRD27, ... IPADDR, IPADDR2, IPADDRD3, ... So, I think we should update NM to allow IPADDR0 and IPADDR1 as well to be consistent. Obviously "IPADDR25, IPADDR26, IPADDRD27" is not valid example. The address sequence can start just with IPADDR, IPADDR0 and IPADDR1. I've included patch for NM's ifcfg-rh plugin to match the new initscripts handling. (bug 658907) So the workaround not to bail when IPADDR0 and IPADDR1 are missing can be removed. Created attachment 464038 [details]
starrting IPADDRn variable adjustment
Don't allow IPADDR, IPADDR2,...
My concern is existing NM configs now are in the wild that start 2-indexed, so I'd prefer not to break them. Also requires upstream commit 03927a3bd0a274baacfd79e5bd0747ed877f9988. Created attachment 491505 [details]
adjust indexes for IPADDR<n>
Small adjustment to indexes. We should bail if IPADDR2 is missing, i.e. IPADDR, IPADDR2, ... is correct. IPADDR, IPADDR3, ... should fail.
Jirka - I think it's too late for 6.1 for that, in which case we should probably just let it go. I've added it to rawhide/F14. (In reply to comment #21) > Jirka - I think it's too late for 6.1 for that, in which case we should > probably just let it go. Yeah, no problem. I just put it in this bug, because I didn't want to open new. > I've added it to rawhide/F14. Thanks. 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 therefore 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-2011-0647.html |