dneuman64 closed pull request #2151: Fixes hardcoded bond0 check in the ISO
generation API. This fixes #2150.
URL: https://github.com/apache/incubator-trafficcontrol/pull/2151
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_ops/app/lib/API/Iso.pm b/traffic_ops/app/lib/API/Iso.pm
index 56c9dfda2..c42cef7dd 100644
--- a/traffic_ops/app/lib/API/Iso.pm
+++ b/traffic_ops/app/lib/API/Iso.pm
@@ -157,7 +157,7 @@ sub generate_iso {
# BOND_DEVICE='em0'
# BONDOPTS='mode=802.3ad,lacp_rate=fast,xmit_hash_policy=layer3+4'
my $network_string =
"IPADDR=\"$ipaddr\"\nNETMASK=\"$netmask\"\nGATEWAY=\"$gateway\"\nDEVICE=\"$interface_name\"\nMTU=\"$interface_mtu\"\nNAMESERVER=\"$nameservers\"\nHOSTNAME=\"$fqdn\"\nNETWORKING_IPV6=\"yes\"\nIPV6ADDR=\"$ip6_address\"\nIPV6_DEFAULTGW=\"$ip6_gateway\"\nDHCP=\"$dhcp\"";
- if ($interface_name eq 'bond0'){
+ if ($interface_name =~ m/^bond\d+/) {
$network_string =
"IPADDR=\"$ipaddr\"\nNETMASK=\"$netmask\"\nGATEWAY=\"$gateway\"\nBOND_DEVICE=\"$interface_name\"\nMTU=\"$interface_mtu\"\nNAMESERVER=\"$nameservers\"\nHOSTNAME=\"$fqdn\"\nNETWORKING_IPV6=\"yes\"\nIPV6ADDR=\"$ip6_address\"\nIPV6_DEFAULTGW=\"$ip6_gateway\"\nBONDING_OPTS=\"miimon=100
mode=4 lacp_rate=fast xmit_hash_policy=layer3+4\"\nDHCP=\"$dhcp\"";
}
# Write out the networking config:
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services