Commit 5c79e63
committed
Ensure consistent hostname setting
During the initial node discovery, we retrieve the hostname for a device
and use that. However, on initializing the SSH for the first time, we
also reinit the hostname, and sometimes from a different command than
whats present in the initial node discovery phase. The hostname needs to
be whatever is advertised in LLDP because that is how we find peers of
an interface and is essential for many tasks that we do.
This diff in hostname computed during node discovery from the one in
polling can cause us to recreate incorrect hostnames. This patch ensures
that we only ever use the hostname computed during ssh setup after node
discovery.
Signed-off-by: Dinesh Dutt <[email protected]>1 parent e41f902 commit 5c79e63
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
413 | 417 | | |
414 | 418 | | |
415 | 419 | | |
| |||
0 commit comments