2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #6557 from stanford-rc/configib

configib: pass NMCLI_USED from confignetwork instead of checking again
This commit is contained in:
cxhong 2020-02-05 15:58:59 -05:00 committed by GitHub
commit 5c62a2b49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -32,11 +32,15 @@ fi
########################################################################
# nmcli_used=0: use network.service
# nmcli_used=1: use NetworkManager
# nmcli_used=2: RH8 postscripts stage, NetworkManager is active but nmcli cannot modify NIC configure file
########################################################################
nmcli_used=0
ps -ef|grep -v grep|grep NetworkManager >/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
if [ -n "$NMCLI_USED" ] ; then
if [ "$NMCLI_USED" = "1" ]; then
nmcli_used=1
elif [ "$NMCLI_USED" = "2" ]; then
nmcli_used=2
fi
fi
#This is the number of ports for each ib adpator.

View File

@ -610,8 +610,8 @@ function configure_nicdevice {
fi
elif [ x"$nic_dev_type" = "xinfiniband" ] || [ x"$nic_dev_type" = "xOmnipath" ]; then
log_info "Call configib for IB nics: $nic_dev, ports: $num_iba_ports"
log_info "NIC_IBNICS=$nic_dev NIC_IBAPORTS=$num_iba_ports configib"
NIC_IBNICS=$nic_dev NIC_IBAPORTS=$num_iba_ports configib
log_info "NMCLI_USED=$networkmanager_active NIC_IBNICS=$nic_dev NIC_IBAPORTS=$num_iba_ports configib"
NMCLI_USED=$networkmanager_active NIC_IBNICS=$nic_dev NIC_IBAPORTS=$num_iba_ports configib
if [ $? -ne 0 ]; then
log_error "configib failed."
errorcode=1