-
Dan Williams authored
Non-git-master versions of lldpad refuse to touch a device that doesn't have a carrier. And when enabling/disabling DCB, the kernel driver will reconfigure itself and may turn carrier off for a few seconds. So we must ensure that before enabling/disabling DCB, the carrier is already on. Next we must ensure that *after* enabling/disabling DCB, the carrier is back on before doing further DCB setup. There's a race condition between enabling/disabling DCB and receiving the carrier event in NetworkManager that has to be handled carefully. Because the carrier may not yet be down after the dcbtool call to enable/disable DCB returns, we need to wait for a couple seconds for the carrier to go down, and then again for it to come back up. Otherwise we might see the still-on carrier, proceed with DCB setup, and the carrier finally goes down halfway through the setup, which will fail the operations with "DCB not enabled, link down, or DCB not supported" errors from lldpad.
18fd3e45