2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-02 11:37:07 +00:00

enhance error log

This commit is contained in:
bybai 2017-08-17 02:42:53 -04:00
parent c798d4d029
commit 73c032068a
2 changed files with 5 additions and 5 deletions

View File

@ -406,12 +406,12 @@ function sort_nics_device_order {
vlan_slot=$vlan_slot" "$num
fi
else
echo "Error: $nic_dev $base_nic_dev pair is invalid nic and nicdevice pair."
echo "Error: nicdevices.$nic_dev base nic device cannot be $base_nic_type $base_nic_dev.(nicdevices is only required on vlan/bond/bridge)"
fi
((num+=1))
done
else
log_error "Error: only support configure bond/vlan/bridge on redhat."
log_error "only support configure bond/vlan/bridge on redhat."
fi
fi
new_order=$eth_slot" "$bond_slot" "$vlan_slot
@ -555,7 +555,7 @@ function configure_nicdevice {
errorcode=1
fi
else
log_error "Error : please check nic data in nics table."
log_error "please check nic data in nics table."
errorcode=1
fi

View File

@ -76,7 +76,7 @@ function log_lines {
######################################################
function log_error {
local __msg="$*"
$log_print_cmd $log_print_arg "[E]: $__msg"
$log_print_cmd $log_print_arg "[E]:Error: $__msg"
return 0
}
@ -1473,7 +1473,7 @@ function create_bond_interface {
wait_for_ifstate $ifname UP 200 1
rc=$?
if [ $rc -ne 0 ]; then
log_error "Error! Interface \"$ifname\" was NOT in \"UP\" state eventually."
log_error "Interface \"$ifname\" was NOT in \"UP\" state eventually."
$ip link show $ifname \
| $sed -e 's/^/['$ifname' ip out >> /g' \
| log_lines info