diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst index d9a4bcb70..b1903bc93 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/network/cfg_routes.rst @@ -10,6 +10,8 @@ There are 2 ways to configure OS route in xCAT: Before using ``makeroutes`` or ``setroute`` to configure OS route, details of the routes data such as routename, subnet, net mask and gateway should be stored in ``routes`` table. +**Notes**: the ``gateway`` in the ``networks`` table assigns ``gateway`` from DHCP to compute node, so if use ``makeroutes`` or ``setroute`` to configure OS static route for compute node, make sure there is no ``gateway`` for the specific network in ``networks`` table. + Configure ``routes`` table `````````````````````````` diff --git a/xCAT/postscripts/routeop b/xCAT/postscripts/routeop index 9ee356107..b90e447a6 100755 --- a/xCAT/postscripts/routeop +++ b/xCAT/postscripts/routeop @@ -271,7 +271,7 @@ replace_persistent_route() #echo "rh/fedora/centos" if [ -z "$ifname" ]; then echo "Error: the device name is necessary to configure static route." - return + return 1 fi if echo $net | grep : 2>&1 1>/dev/null @@ -319,7 +319,7 @@ replace_persistent_route() # on debian/ubuntu need the network device name if [ -z "$ifname" ]; then echo "Error: the device name is necessary to configure static route." - return + return 1 fi filename="/etc/network/interfaces.d/$ifname" @@ -901,7 +901,10 @@ elif [ "$op" = "replace" ]; then #replace the persistent route # the $cmd param is used for Ubuntu since it needs to run the specific cmd to enable # the route during the up of the device - replace_persistent_route $net $mask $gw $ifname + replace_persistent_route $net $mask $gw $ifname + if [ $? -ne 0 ]; then + exit 1 + fi fi exit 0