Francis.Montagnac(a)inria.fr writes:
Hi.
On Thu, 21 Dec 2017 07:17:38 -0500 Sam Varshavchik wrote:
> I just did a little experiment. I took a different server with an unused
> port. I assigned an IP address to it, in its ifcfg file, then ifup-ed it.
> The result:
> 3: eth1: <snip>
> I then tested this using my script. I can bind it, without any issues.
Right, but in the case you want to do an NFS mount, you better have to
wait the switch and the NIC to have finished to negociate (otherwise
you may hit the timeout of mount).
Which is fine. But nm-online claims that the port is up even before the IP
address is assigned.
After the IP address is assigned, if nm-online wants to a wait a while to
see if the carrier comes up, nothing wrong with that. But nm-online seems to
be seeing the fact that this port has a static IP address, and appears to
decide that nothing needs to be done about it. Let's proceed and boot the
rest of the system, that expects the IP addresses to be already configured.
Who cares about the fact that the IP addresses that are basically hard-coded
for the server are not even up yet? We say we're online, we must mean that
we're online.
This should perhaps be seen as two different problems.
A way to minimize the risk of a failed NFS mount is to use some a the
various automount existing mechanisms, but that may not be sufficient
if another service (ex: a mysql service having its database under NFS)
requires the NFS mount.
Yes, that's a separate issue. The basic issue here: this port has fixed,
static IP addresses set for it. That means that, at the very, bare minimum,
the IP addresses must be bound to the port before it is considered to be
active. I have no idea what definition of "active" includes "the port
doesn't yet have the fixed IP addresses it should have".
This has always been the case, for as long as I can remember. And even if
the port is physically connected to a switch, and a switch is up, that
switch may not be connected to anything else. So, the presence of a carrier,
on the port, is utterly irrelevant when it comes to ports with static IP
addresses.
Yes, when you have DHCP, you want to sense the connection, as an indication
to try to acquire an IP address. But if the port has static IP addresses,
take those bleeping IP addresses, add them to the port, and the port is up.
As far as you're concerned, the port is up. That's it. The presence or the
absence of a sensed connection means utterly NOTHING. Whether there's a
physical connection there, or not, that port will always have those IP
addresses, and absolutely NOTHING, whatsoever, will change that. That's how
it always worked.