-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced ability to deploy ubuntu network configuration on edge server #147
base: master
Are you sure you want to change the base?
Enhanced ability to deploy ubuntu network configuration on edge server #147
Conversation
@@ -31,11 +27,37 @@ if [ -e /dev/disk/by-label/CNFLNT_IDNT ]; then | |||
MYGW="" | |||
fi | |||
MYNM=$(grep ^ipv4_netmask: $tcfg | awk '{print $2}') | |||
for NICGUESS in $(ip link|grep LOWER_UP|grep -v LOOPBACK|cut -d ' ' -f 2 | sed -e 's/:$//'); do | |||
for NICGUESS in `ls /sys/class/net/`; do | |||
if [ -n "$(ip link show "$NICGUESS" | grep "LOOPBACK")" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this line to avoid check lo nic
I'm still curious, I gathter you want to wait up to 20 seconds for link to negotiate, but does it really have to be one at a time? In this scenario I'd wonder if the original 'link up all the nics at once' behavior is still sufficient, but with a loop to loop the nic iteration:
|
As i mention, even if we have link up for all nics at before, we also need wait a servel times until their up. it not up immediately |
The more explicit way to do this is probably by filtering out any netdevs using the loopback or cdc_ether (and friends) drivers by checking |
On the matter of the one at a time, my hope was that the addition of the outer 'while' loop would address that issue, along with a few others. The problem as I saw was that there's only a single loop going through the interfaces. Problems that can happen to be aware of:
Unfortunately this function may need to be fleshed out over time, since there are multiple ways for the record to indicate the NIC. For now, all my platforms gives us the usb vender and product id, and that can be used. Since the existing for loop, in theory, should not be satisfied by mere 'link up' already, I was hoping that repeating the loop until a pass identifies a NIC it would get to the end game, and do so in a manner robust against all the scenarios. |
I am wondering if: Solves this. It does not do anything with the host interface (no parsed DMI handy nor utility to parse it), but the impact is still hopefully mitigated by the repeat loop. |
Note In the se350 v2 se455 v2 se360 v2, it is found that the network adapter is not up immediately when the machine is started, and it takes a period of time for all network adapters to change to lower_up. Therefore, a mechanism is added to wait for the status of the network adapter, traversing all network adapters, and monitoring each network adapter for 20 seconds