jfwl
April 13, 2021, 4:04pm
#1
Problem:
two interfaces set. One DHCP, one static
Static failed to be identified
DHCP address is OK.
Expected outcome:
Foreman and Proxy versions:
2.3.3
Foreman and Proxy plugin versions:
Distribution and version:
CentOS 7.9
Other relevant data:
Here is the kickstart network part related produced
eno4 interface
real=grep -l 24:80:0d:9e:e1:63 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1
sanitized_real=echo $real | sed s/:/_/
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO=βnoneβ
IPADDR=β10.16.203.115β
NETMASK=β255.255.255.192β
GATEWAY=β10.16.103.65β
DOMAIN=βpriv.manos.fr β
DEVICE=$real
HWADDR=β24:80:0d:9e:e1:63β
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
DNS1=β10.15.22.10β
DNS2=β10.15.22.11β
MTU=1500
EOF
ens192 interface
real=grep -l 90:36:9f:f1:ff:10 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1
sanitized_real=echo $real | sed s/:/_/
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO=βdhcpβ
DOMAIN=βinstall.manos.com β
DEVICE=$real
HWADDR=β90:36:9f:f1:ff:10β
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
DEFROUTE=no
MTU=1500
EOF
After installation, the eno4 is not set while the MAC is correct
more /etc/sysconfig/network-scripts/ifcfg-eno4
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno4
UUID=cb6d9586-310c-4c44-86b9-a83c32bda24c
DEVICE=eno4
ONBOOT=no
cat /sys/class/net/eno4/address
24:80:0d:9e:e1:63
Subnet is configured as static and IPAM to none:
parameters: (truncated)
foreman_subnets:
name: 10.16.103.64
network: 10.16.103.64
mask: 255.255.255.192
gateway: 10.16.103.65
dns_primary: 10.15.22.10
dns_secondary: 10.15.22.11
from: ββ
to: ββ
boot_mode: Static
ipam: None
vlanid:
mtu: 1500
nic_delay:
network_type: IPv4
description: ββ
Please whatβs wrong ?
Regards
jfwl
April 13, 2021, 4:11pm
#2
Here the list of file in /sys/class/net/eno4
ls /sys/class/net/eno4
addr_assign_type carrier device duplex ifindex name_assign_type phys_port_name queues tx_queue_len
address carrier_changes dev_id flags iflink netdev_group phys_switch_id speed type
addr_len carrier_down_count dev_port gro_flush_timeout link_mode operstate power statistics uevent
broadcast carrier_up_count dormant ifalias mtu phys_port_id proto_down subsystem
gvde
April 13, 2021, 4:27pm
#3
You set the IP address to 10.16.203.115 but your network seems to be:
That canβt be right. But I donβt know if that makes a difference to your problem, though.
jfwl
April 13, 2021, 4:58pm
#4
Thank you for reviewing.
Sorry I changed the IP for publishing and made a type.
IPADDR=β10.16.103.115β
Fixed. But not my problemβ¦
jfwl
April 14, 2021, 8:00am
#5
Once the machine network fixed by hand, we can see the command should have been worked
grep -l 24:80:0d:9e:e1:63 /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F β/β β// {print $5}β | head -1
eno4
But the static configuration is not set:
]# more /etc/sysconfig/network-scripts/ifcfg-eno4
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eno4
UUID=cb6d9586-310c-4c44-86b9-a83c32bda24c
DEVICE=eno4
ONBOOT=no
lzap
April 14, 2021, 10:43am
#6
Please take a moment to properly format your snips.
What defines if a host will be configured with DHCP or Static is your Subnet Boot Mode setting. Check that.
jfwl
April 14, 2021, 10:52am
#7
Hello,
Subnet boot mode is well set to Static.
gvde
April 14, 2021, 11:35am
#8
Are there any other ifcfg files in the directory?
/etc/sysconfig/network-scripts/ifcfg-*
jfwl
April 14, 2021, 12:12pm
#9
Yes
]# ls -l
total 36
-rw-rβr--. 1 root root 277 Apr 14 05:56 ifcfg-eno1
-rw-rβr--. 1 root root 277 Apr 14 05:56 ifcfg-eno2
-rw-rβr--. 1 root root 277 Apr 14 05:56 ifcfg-eno3
-rw-rβr--. 1 root root 277 Apr 14 05:56 ifcfg-eno4
-rw-rβr--. 1 root root 297 Apr 14 05:56 ifcfg-enp0s20f0u14u3
-rw-rβr--. 1 root root 292 Apr 14 05:56 ifcfg-ens1f0
-rw-rβr--. 1 root root 281 Apr 14 05:56 ifcfg-ens1f1
-rw-rβr--. 1 root root 281 Apr 14 05:56 ifcfg-ens1f2
-rw-rβr--. 1 root root 281 Apr 14 05:56 ifcfg-ens1f3
[root@obench29s network-scripts]# grep BOOTPRO *
ifcfg-eno1:BOOTPROTO=dhcp
ifcfg-eno2:BOOTPROTO=dhcp
ifcfg-eno3:BOOTPROTO=dhcp
ifcfg-eno4:BOOTPROTO=dhcp
ifcfg-enp0s20f0u14u3:BOOTPROTO=dhcp
ifcfg-ens1f0:BOOTPROTO=dhcp
ifcfg-ens1f1:BOOTPROTO=dhcp
ifcfg-ens1f2:BOOTPROTO=dhcp
ifcfg-ens1f3:BOOTPROTO=dhcp
Iβve also tried to disable NetworkManager. No difference.
jfwl
April 14, 2021, 1:03pm
#10
It seems the script does not complete because some commands before the network interfaces files are not played. Is there any log file for ks-script- files ?
jfwl
April 14, 2021, 1:44pm
#11
Postinstall script had en error. So the end of the kickstart script was not played.
Problem was the install was not reported faulty. So I did not suspect such error.
Found the error in /root/install.post.log
Thank you for your reviewing.