Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1376924 - satellite 6 provisioning a client with 2 nics will have to default gateways
Summary: satellite 6 provisioning a client with 2 nics will have to default gateways
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Networking
Version: 6.2.0
Hardware: x86_64
OS: Linux
medium
urgent
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Peter Ondrejka
URL:
Whiteboard:
: 1386295 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-16 20:26 UTC by Fotios Tsiadimos
Modified: 2023-09-07 18:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18125 0 Normal Closed provisioning a client with 2 nics will have to default gateways 2020-04-22 10:19:29 UTC
Red Hat Bugzilla 1386295 0 medium CLOSED [RFE] Have option to select default gateway if provisioning hosts with multiple nics and networks. 2023-09-15 00:00:18 UTC
Red Hat Knowledge Base (Solution) 2640101 0 None None None 2016-09-21 00:25:15 UTC
Red Hat Knowledge Base (Solution) 3197912 0 None None None 2017-09-27 15:50:25 UTC

Internal Links: 1386295

Description Fotios Tsiadimos 2016-09-16 20:26:01 UTC
Description of problem:
satellite 6 provisioning a client with 2 nics will have to default gateways.


Version-Release number of selected component (if applicable):

Satelltie 6.2.2

How reproducible:

Create 2 subnets on the Satellite and specify the gateway for etch one then create a client and add 2 networks to point to these 2 subnets. After you kickstart the client the client will have 2 default gateways. when we create a new host we need to have an option to specify the default gateway instead to remove the gateway from the subnets.

Comment 10 Marek Hulan 2017-01-18 09:45:11 UTC
Created redmine issue http://projects.theforeman.org/issues/18125 from this bug

Comment 12 Satellite Program 2017-01-18 11:18:41 UTC
Upstream bug assigned to mhulan

Comment 13 Satellite Program 2017-01-18 11:18:44 UTC
Upstream bug assigned to mhulan

Comment 14 Satellite Program 2017-01-18 19:18:20 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18125 has been resolved.

Comment 17 Marek Hulan 2017-04-04 06:54:24 UTC
*** Bug 1386295 has been marked as a duplicate of this bug. ***

Comment 18 daniel 2017-09-27 15:50:26 UTC
In case one has 2 subnets configured with 2 gateways we really get 2 default gateways configured:


[root@server-static-vlan105-test-165 ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.24.105.254  0.0.0.0         UG        0 0          0 eth0
0.0.0.0         172.24.104.254  0.0.0.0         UG        0 0          0 eth1
172.24.104.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
172.24.105.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
[root@server-static-vlan105-test-165 ~]# 


----------------------
[root@sat6 ~]# hammer host info --name server-static-vlan105-test-165.vlan105.example.com 
Id:                 220
Name:               server-static-vlan105-test-165.vlan105.example.com
Organization:       server
Location:           Lab/RHV_vlan105
Host Group:         HG-server-vlan105-static
Compute Profile:    CP-server-vlan105-static
Puppet CA Id:       
Puppet Master Id:   
Cert name:          server-static-vlan105-test-165.vlan105.example.com
Managed:            yes
Installed at:       2017/09/27 13:16:39
Last report:        
Network:            
    IP:     172.24.105.165
    MAC:    00:1a:4a:60:00:e0
    Subnet: static-vlan105.example.com
    Domain: vlan105.example.com
Network interfaces: 
 1) Id:          365
    Identifier:  
    Type:        interface (primary, provision)
    MAC address: 00:1a:4a:60:00:e0
    IP address:  172.24.105.165
    FQDN:
 2) Id:          366
    Identifier:  
    Type:        interface
    MAC address: 00:1a:4a:60:00:e1
    IP address:  172.24.104.165
    FQDN:
Operating system:   
    Architecture:           x86_64
    Operating System:       RedHat 7.4
    Build:                  no
    Medium:                 server/Library/Red_Hat_Server/Red_Hat_Enterprise_Linux_7_Server_Kickstart_x86_64_7_4
    Partition Table:        Kickstart default
    Custom partition table:
Parameters:         

Additional info:    
    Owner Id:   6
    Owner Type: User
    Enabled:    yes
    Comment:

[root@sat6 ~]# 

[root@sat6 ~]# hammer host interface list  --host server-static-vlan105-test-165.vlan105.example.com 
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------
ID  | IDENTIFIER | TYPE                           | MAC ADDRESS       | IP ADDRESS     | DNS NAME                                                   
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------                                                         
365 |            | interface (primary, provision) | 00:1a:4a:60:00:e0 | 172.24.105.165 | server-static-vlan105-test-165.vlan105.example.com
366 |            | interface                      | 00:1a:4a:60:00:e1 | 172.24.104.165 | server-static-vlan104-test-165.vlan104.example.com  
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------
[root@sat6 ~]# 





------------------------

cloned kickstart_networking_setup to kickstart_networking_setup2 and changed it as suggested by https://bugzilla.redhat.com/show_bug.cgi?id=1376924 / http://projects.theforeman.org/issues/18125  , also cloned default kickstart template and added the new snippet there (renaming kickstart_networking_setup to kickstart_networking_setup2 and associated this to the OS,
redeployed host:


[root@server-static-vlan105-test-165 ~]# ip r
default via 172.24.105.254 dev eth0 proto static metric 100 
172.24.104.0/24 dev eth1 proto kernel scope link src 172.24.104.100 metric 100 
172.24.105.0/24 dev eth0 proto kernel scope link src 172.24.105.165 metric 100 
[root@server-static-vlan105-test-165 ~]# 

[root@server-static-vlan105-test-165 ~]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.24.105.254  0.0.0.0         UG        0 0          0 eth0
172.24.104.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
172.24.105.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
[root@server-static-vlan105-test-165 ~]# 

[root@sat6 ~]# hammer host info --name server-static-vlan105-test-165.vlan105.example.com 
Id:                 220
Name:               server-static-vlan105-test-165.vlan105.example.com
Organization:       server
Location:           Lab/RHV_vlan105
Host Group:         HG-server-vlan105-static-nw-template
Compute Profile:    CP-server-vlan105-static
Puppet CA Id:       
Puppet Master Id:   
Cert name:          server-static-vlan105-test-165.vlan105.example.com
Managed:            yes
Installed at:       2017/09/27 13:45:41
Last report:        
Network:            
    IP:     172.24.105.165
    MAC:    00:1a:4a:60:00:e0
    Subnet: static-vlan105.example.com
    Domain: vlan105.example.com
Network interfaces: 
 1) Id:          365
    Identifier:  
    Type:        interface (primary, provision)
    MAC address: 00:1a:4a:60:00:e0
    IP address:  172.24.105.165
    FQDN:
 2) Id:          366
    Identifier:  
    Type:        interface
    MAC address: 00:1a:4a:60:00:e1
    IP address:  172.24.104.165
    FQDN:
Operating system:   
    Architecture:           x86_64
    Operating System:       RedHat 7.4
    Build:                  no
    Partition Table:        Kickstart default
    Custom partition table:
Parameters:         

Additional info:    
    Owner Id:   6
    Owner Type: User
    Enabled:    yes
    Model:      RHEV Hypervisor
    Comment:

[root@sat6 ~]# 

[root@sat6 ~]# hammer host interface list  --host server-static-vlan105-test-165.vlan105.example.com 
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------
ID  | IDENTIFIER | TYPE                           | MAC ADDRESS       | IP ADDRESS     | DNS NAME                                                   
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------
365 |            | interface (primary, provision) | 00:1a:4a:60:00:e0 | 172.24.105.165 | server-static-vlan105-test-165.vlan105.example.com
366 |            | interface                      | 00:1a:4a:60:00:e1 | 172.24.104.165 | server-static-vlan104-test-165.vlan104.example.com  
----|------------|--------------------------------|-------------------|----------------|------------------------------------------------------------
[root@sat6 ~]# 



template :

~~~
#  interface
real=`ip -o link | grep 00:1a:4a:60:00:e0 | awk '{print $2;}' | sed s/:$//`

# ifcfg files are ignored by NM if their name contains colons so we convert colons to underscore
sanitized_real=$real

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="none"
IPADDR="172.24.105.165"
NETMASK="255.255.255.0"
GATEWAY="172.24.105.254"
DEVICE=$real
HWADDR="00:1a:4a:60:00:e0"
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
DNS1=172.24.105.5
EOF




#  interface
real=`ip -o link | grep 00:1a:4a:60:00:e1 | awk '{print $2;}' | sed s/:$//`

# ifcfg files are ignored by NM if their name contains colons so we convert colons to underscore
sanitized_real=$real

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="none"
IPADDR="172.24.104.165"
NETMASK="255.255.255.0"
GATEWAY="172.24.104.254"
DEVICE=$real
HWADDR="00:1a:4a:60:00:e1"
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
DEFROUTE=no
EOF

~~~


# diff -u Satellite_Kickstart_Default Satellite_Kickstart_Default_2
--- Satellite_Kickstart_Default	2017-09-27 16:14:53.123359219 +0200
+++ Satellite_Kickstart_Default_2	2017-09-27 16:15:05.189946712 +0200
@@ -94,7 +95,7 @@
 /usr/bin/chvt 3
 (
 <% if subnet.respond_to?(:dhcp_boot_mode?) -%>
-<%= snippet 'kickstart_networking_setup' %>
+<%= snippet 'kickstart_networking_setup2' %>
 <% end -%>
 
 #update local time
#



# diff -u kickstart_networking_setup kickstart_networking_setup2
--- kickstart_networking_setup	2017-09-27 16:16:04.621840310 +0200
+++ kickstart_networking_setup2	2017-09-27 16:16:30.708110389 +0200
@@ -88,6 +88,7 @@
 ONBOOT=yes
 PEERDNS=no
 PEERROUTES=no
+DEFROUTE=no
 <% if vlan -%>
 VLAN=yes
 <% elsif alias_type -%>
@@ -142,6 +143,7 @@
 <% if interface.respond_to?(:primary) && interface.primary -%>
 PEERDNS=yes
 PEERROUTES=yes
+DEFROUTE=yes
 <% if !dhcp && !subnet.dns_primary.nil? && !subnet.dns_primary.empty? -%>
 DNS1=<%= subnet.dns_primary %>
 <% if !subnet.dns_secondary.nil? && !subnet.dns_secondary.empty? -%>
@@ -151,6 +153,7 @@
 <% else -%>
 PEERDNS=no
 PEERROUTES=no
+DEFROUTE=no
 <% end -%>
 <% if vlan -%>
 VLAN=yes
#

Comment 23 Satellite Program 2018-02-21 16:54:17 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.