xcat-core
xcat-core copied to clipboard
confignetworks using nicutils.sh fails to modify bridge if name contains white spaces
In nicutils.sh line 2010
cmd="$nmcli con mod "$con_use_same_dev" master $ifname $_mtu connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1 co....
confignetwork fails e.g. with such network setup including 'System ens3'
[root@netsres46 ~]# nmcli c s
NAME UUID TYPE DEVICE
xcat-bridge-br_green-tmp 51a5f7ab-f39e-4ef9-88a5-36fe1c5e7e84 bridge br_green
System ens3 60ca8c7e-be10-48c4-87bf-0df97b0f070e ethernet ens3
xcat-bridge-br_blue d8bfc965-7dd8-4bf7-9021-6a7f053e7fd5 bridge br_blue
ens4 911f015d-93fc-4db6-9eb4-6d953aaa5d9f ethernet ens4
xcat-bridge-br_green 980ae86b-66b2-4336-9781-9c1d140353fd bridge --
xcat-bridge-br_green-tmp a48d69fb-dc0c-4419-a432-68084b91ad35 bridge --
Can you show us the error message?
I am seeing System <interface name>
from nmcli c s
on our system too. not sure what's wrong with that.
I take that back. I redefined the node and ran updatenode
Well, I reproduced it. Installed RHEl8.2.0 with precreatepostscripts=0
[root@netsres-xcat work]# lsdef netsres46
Object name: netsres46
addkcmdline=inst.sshd kernel.watchdog_thresh=30
arch=x86_64
cons=ipmi
currchain=boot
currstate=boot
groups=all,vm
ip=172.16.17.46
mac=52:54:00:4b:2e:38
mgt=kvm
netboot=xnba
nicdevices.br_blue=ens4
nicdevices.br_green=ens3
nichostnamesuffixes.br_blue=-blu
nichostnamesuffixes.br_green=-gre
nicips.br_blue=9.2.156.70
nicips.br_green=172.16.17.46
nicnetworks.br_blue=blue
nicnetworks.br_green=green
nictypes.br_blue=bridge
nictypes.ens3=ethernet
nictypes.ens4=ethernet
nictypes.br_green=bridge
os=rhels8.2.0
postbootscripts=syncfiles,console-rev.sh,net-peer-disable.sh,dummy.postbootscript
postscripts=syslog,remoteshell,syncfiles,dummy.postscript,confignetwork,setroute
power=ipmi
profile=netsres
provmethod=rhels8.2.0-x86_64-install-netsres
routenames=pubrt,greenrt
serialport=0
serialspeed=115200
status=booted
statustime=10-01-2020 23:14:18
updatestatus=failed
updatestatustime=10-01-2020 23:49:10
xcatmaster=172.16.16.1
Then I ran updatenode netsres46 confignetwork
This did not create br_green.
[root@netsres-xcat netsres46]# updatenode netsres46 confignetwork,setroute
netsres46: =============updatenode starting====================
netsres46: trying to download postscripts...
netsres46: postscripts downloaded successfully
netsres46: trying to get mypostscript from 172.16.16.1...
netsres46: postscript start..: confignetwork
netsres46: [I]: NetworkManager is active
netsres46: [I]: All valid nics and device list:
netsres46: [I]: br_blue ens4
netsres46: [I]: br_green ens3
netsres46: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netsres46: configure nic and its device : br_blue ens4
netsres46: DEBUG networkmanager_active=1
netsres46: [I]: create_bridge_interface_nmcli ifname=br_blue _brtype=bridge _port=ens4 _pretype=ethernet _ipaddr=9.2.156.70
netsres46: [I]: Pickup xcatnet, "blue", from NICNETWORKS for interface "br_blue".
netsres46: [I]: xcat-bridge-br_blue exists, down it first
netsres46: Connection 'xcat-bridge-br_blue' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/22)
netsres46: Cannot find device "br_blue"
netsres46: [I]: xcat-bridge-br_blue exists, rename old xcat-bridge-br_blue to xcat-bridge-br_blue-tmp
netsres46: [I]: create bridge connection xcat-bridge-br_blue
netsres46: [I]: nmcli con add type bridge con-name xcat-bridge-br_blue ifname br_blue mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-retries 0 connection.autoconnect-slaves 1
netsres46: Connection 'xcat-bridge-br_blue' (c254d9ba-fc5a-4b5d-a524-05eb086a5183) successfully added.
netsres46: [I]: create ethernet slaves connection ens4 for bridge
netsres46: [I]: nmcli con mod ens4 master br_blue mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1 connection.autoconnect-retries 0
netsres46: [I]: add ip 9.2.156.70/26 to bridge
netsres46: [I]: nmcli con up xcat-bridge-br_blue
netsres46: Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/28)
netsres46: [I]: nmcli con up ens4
netsres46: Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/30)
netsres46: Connection 'xcat-bridge-br_blue-tmp' (a54d0177-d697-42d9-8526-db13842d4cec) successfully deleted.
netsres46: [I]: State of "br_blue" was "UNKNOWN" instead of expected "UP". Wait 0 of 40 with interval 40.
netsres46: [I]: [bridge] >> 6: br_blue: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
netsres46: [I]: [bridge] >> link/ether 52:54:00:85:e6:71 brd ff:ff:ff:ff:ff:ff
netsres46: [I]: [bridge] >> inet 9.2.156.70/26 brd 9.2.156.127 scope global noprefixroute br_blue
netsres46: [I]: [bridge] >> valid_lft forever preferred_lft forever
netsres46: [I]: [bridge] >> inet6 fe80::c086:775f:85d4:70c7/64 scope link noprefixroute
netsres46: [I]: [bridge] >> valid_lft forever preferred_lft forever
netsres46: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
netsres46: configure nic and its device : br_green ens3
netsres46: DEBUG networkmanager_active=1
netsres46: [I]: create_bridge_interface_nmcli ifname=br_green _brtype=bridge _port=ens3 _pretype=ethernet _ipaddr=172.16.17.46
netsres46: [I]: Pickup xcatnet, "green", from NICNETWORKS for interface "br_green".
netsres46: [I]: xcat-bridge-br_green exists, rename old xcat-bridge-br_green to xcat-bridge-br_green-tmp
netsres46: [I]: create bridge connection xcat-bridge-br_green
netsres46: [I]: nmcli con add type bridge con-name xcat-bridge-br_green ifname br_green mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-retries 0 connection.autoconnect-slaves 1
netsres46: Connection 'xcat-bridge-br_green' (aefabe05-f91f-4160-a66e-42517156f4e8) successfully added.
netsres46: [I]: create ethernet slaves connection System ens3 for bridge
netsres46: [I]: nmcli con mod System ens3 master br_green mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1 connection.autoconnect-retries 0
netsres46: Error: unknown connection 'System'.
netsres46: [E]:Error: nmcli failed to add bridge slave ens3
netsres46: [E]:Error: create bridge interface br_green failed
netsres46: postscript end....: confignetwork exited with code 10
netsres46: postscript start..: setroute
netsres46: Adding temporary route: ip route replace 0.0.0.0/0 via 9.2.156.65; Persistent route "0.0.0.0/0 via 9.2.156.65" has been replaced in /etc/sysconfig/network-scripts/route-br_blue.
netsres46: Adding temporary route: ip route replace 172.16.0.0/12 via 172.16.16.1; Persistent route "172.16.0.0/12 via 172.16.16.1" has been replaced in /etc/sysconfig/network-scripts/route-br_green.
netsres46: postscript end....: setroute exited with code 0
netsres46: Running of postscripts has completed.
netsres46: =============updatenode ending====================
result:
NAME UUID TYPE DEVICE
xcat-bridge-br_green-tmp 1f78f8df-9648-431b-a561-d82006b4555a bridge br_green
xcat-bridge-br_blue c254d9ba-fc5a-4b5d-a524-05eb086a5183 bridge br_blue
System ens3 48a42e79-cfc3-4bf8-bef0-203ee5cdf151 ethernet ens3
ens4 e5e0c4ab-f123-4e2d-ad04-afa7fff01b27 ethernet ens4
xcat-bridge-br_green aefabe05-f91f-4160-a66e-42517156f4e8 bridge --
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:4b:2e:38 brd ff:ff:ff:ff:ff:ff
inet 172.16.17.46/20 brd 172.16.31.255 scope global dynamic noprefixroute ens3
valid_lft 40409sec preferred_lft 40409sec
inet6 fe80::5054:ff:fe4b:2e38/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br_blue state UP group default qlen 1000
link/ether 52:54:00:85:e6:71 brd ff:ff:ff:ff:ff:ff
5: br_green: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 72:b7:c0:28:52:ed brd ff:ff:ff:ff:ff:ff
6: br_blue: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 52:54:00:85:e6:71 brd ff:ff:ff:ff:ff:ff
inet 9.2.156.70/26 brd 9.2.156.127 scope global noprefixroute br_blue
valid_lft forever preferred_lft forever
inet6 fe80::c086:775f:85d4:70c7/64 scope link noprefixroute
valid_lft forever preferred_lft forever
default via 9.2.156.65 dev br_blue
default via 172.16.16.1 dev ens3 proto dhcp metric 100
9.2.156.64/26 dev br_blue proto kernel scope link src 9.2.156.70 metric 427
172.16.0.0/12 via 172.16.16.1 dev ens3
172.16.16.0/20 dev ens3 proto kernel scope link src 172.16.17.46 metric 100
A second attempt to run updatenode fails with:
...
netsres46: configure nic and its device : br_green ens3
netsres46: DEBUG networkmanager_active=1
netsres46: [I]: create_bridge_interface_nmcli ifname=br_green _brtype=bridge _port=ens3 _pretype=ethernet _ipaddr=172.16.17.46
netsres46: [I]: Pickup xcatnet, "green", from NICNETWORKS for interface "br_green".
netsres46: [I]: xcat-bridge-br_green exists, rename old xcat-bridge-br_green to xcat-bridge-br_green-tmp
netsres46: [I]: create bridge connection xcat-bridge-br_green
netsres46: [I]: nmcli con add type bridge con-name xcat-bridge-br_green ifname br_green mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-retries 0 connection.autoconnect-slaves 1
netsres46: Connection 'xcat-bridge-br_green' (aefabe05-f91f-4160-a66e-42517156f4e8) successfully added.
netsres46: [I]: create ethernet slaves connection System ens3 for bridge
netsres46: [I]: nmcli con mod System ens3 master br_green mtu 1500 connection.autoconnect-priority 9 autoconnect yes connection.autoconnect-slaves 1 connection.autoconnect-retries 0
netsres46: Error: unknown connection 'System'.
netsres46: [E]:Error: nmcli failed to add bridge slave ens3
netsres46: [E]:Error: create bridge interface br_green failed
netsres46: postscript end....: confignetwork exited with code 10
netsres46: postscript start..: setroute
netsres46: Adding temporary route: ip route replace 0.0.0.0/0 via 9.2.156.65; Persistent route "0.0.0.0/0 via 9.2.156.65" has been replaced in /etc/sysconf
networking shows:
[root@netsres46 ~]# nmcli c s
NAME UUID TYPE DEVICE
xcat-bridge-br_green-tmp 1f78f8df-9648-431b-a561-d82006b4555a bridge br_green
xcat-bridge-br_blue c254d9ba-fc5a-4b5d-a524-05eb086a5183 bridge br_blue
System ens3 48a42e79-cfc3-4bf8-bef0-203ee5cdf151 ethernet ens3
ens4 e5e0c4ab-f123-4e2d-ad04-afa7fff01b27 ethernet ens4
xcat-bridge-br_green aefabe05-f91f-4160-a66e-42517156f4e8 bridge --
networks table
[root@netsres-xcat netsres46]# tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"blue","9.2.156.64","255.255.255.192","eth2","9.2.156.65",,"9.2.156.71","9.2.250.86",,,,,,,,,,"1500",,
"green","172.16.16.0","255.255.240.0","eth1","<xcatmaster>",,"172.16.16.1",,,,"172.16.28.1-172.16.31.254",,,,,,,"1500",,
"nickel","172.16.80.0","255.255.240.0","lo0","172.16.80.1",,,,,,,,,,,,,"9000",,
"purple","172.16.32.0","255.255.240.0","eth3","172.16.32.1",,"172.16.32.1",,,,"172.16.44.1-172.16.47.254",,,,,,,"1500",,
"red","172.16.0.0","255.255.240.0","eth0","172.16.0.1",,"172.16.0.1",,,,"172.16.12.1-172.16.15.254",,,,,,,"1500",,
"silver","172.16.96.0","255.255.240.0","lo0","172.16.96.1",,,,,,,,,,,,,"9000",,
"zinc","172.16.48.0","255.255.240.0","lo0","172.16.48.1",,,,,,,,,,,,,"9000",,
"cadmium","172.16.176.0","255.255.240.0","lo0","172.16.176.1",,,,,,,,,,,,,"9000",,
"copper","172.16.144.0","255.255.240.0","lo0","172.16.144.1",,,,,,,,,,,,,"9000",,
"chromium","172.16.160.0","255.255.240.0","lo0","172.16.160.1",,,,,,,,,,,,,"9000",,
"titanium","172.16.192.0","255.255.240.0","lo0","172.16.192.1",,,,,,,,,,,,,"9000",,
"tungsten","172.16.208.0","255.255.240.0","lo0","172.16.208.1",,,,,,,,,,,,,"9000",,
"tantalum","172.16.224.0","255.255.240.0","lo0","172.16.224.1",,,,,,,,,,,,,"9000",,
"gold","172.16.240.0","255.255.240.0","lo0","172.16.240.1",,,,,,,,,,,,,"9000",,
"platinum","172.17.16.0","255.255.240.0","lo0","172.17.16.1",,,,,,,,,,,,,"9000",,
"mercury","172.17.32.0","255.255.240.0","lo0","172.17.32.1",,,,,,,,,,,,,"9000",,
"iridium","172.17.0.0","255.255.240.0","lo0","172.17.0.1",,,,,,,,,,,,,"9000",,
"iron","172.16.64.0","255.255.240.0","lo0","172.16.64.1",,,,,,,,,,,,,"9000",,
"cobalt","172.16.112.0","255.255.240.0","lo0","172.16.112.1",,,,,,,,,,,,,"9000",,
"manganese","172.16.128.0","255.255.240.0","lo0","172.16.128.1",,,,,,,,,,,,,"9000",,
"554","9.2.154.128","255.255.255.192","eth2","9.2.154.130",,"9.2.154.140","9.2.250.86",,,,,,,,,,"1500",,
"192_168_122_0-255_255_255_0","192.168.122.0","255.255.255.0","virbr0","<xcatmaster>",,"<xcatmaster>",,,,,,,,,,,"1500",,
routes
[root@netsres-xcat netsres46]# tabdump routes
#routename,net,mask,gateway,ifname,comments,disable
"pubrt","0.0.0.0","0.0.0.0","9.2.156.65","br_blue",,
"bluert_M4","0.0.0.0","0.0.0.0","9.2.156.65","br_blue",,
"bluert_mc","0.0.0.0","0.0.0.0","9.2.156.65","br_blue",,
"bluert_tp","0.0.0.0","0.0.0.0","9.2.156.65","br_blue",,
"bluert_M3","0.0.0.0","0.0.0.0","9.2.156.65","br_blue",,
"greenrt_M3","172.16.0.0","255.240.0.0","172.16.31.250","br_green",,
"greenrt_M4","172.16.0.0","255.240.0.0","172.16.31.250","br_green",,
"greenrt_mc","172.16.0.0","255.240.0.0","172.16.31.250","br_green",,
"greenrt_tp","172.16.0.0","255.240.0.0","172.16.31.250","br_green",,
"greenrt","172.16.0.0","255.240.0.0","172.16.16.1","br_green",,
[root@netsres-xcat netsres46]#
The ip
address and br_green
ip address are same, right? If you confignetwork on the install nic, can u use confignetwork -s
for postscripts
?
Yes, br_green is the sama as the management/ netboot network. It is using DHCP but set to static in the nodedef. I did not find how to specify DHCP for network manager in xCAT yet.
What does confignetwork -s do and can it be run as such?
updatenode netsres46 confiognetwork -s
If involve the install nic ( also call provision nic), we are recommend to use confignetwork -s
#6851 seems to be similar to this issue. confignetwork works fine on the first pass, but a second pass wrecks the network config on the node. Also RHEL 8.1
@dombrowa and @shawn174 , did u try to use confignetwork -s
?
for this case
System ens3 60ca8c7e-be10-48c4-87bf-0df97b0f070e ethernet ens3
ens3
is provision network. the postscript configeth
will go to different path with -s
option.
I did not get to run this:
Does this run as updatenode <node> confignetwork -s
(just the added -s arg?)
should be updatenode <node> -P "confignetwork -s"