-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add preflight check for network card speed
This check ensures that the network interfaces configured during installation are all 10Gbps. If they're less than this, during interactive install, a warning message will be displayed on the network screen. For automated installs, as with other preflight checks, failure will abort the install unless `harvester.install.skipchecks=true` is set. A few oddities worth mentioning: * We can't do the network speed check upfront with the other checks because we don't know which interfaces to test until we're on the network screen (or have them from the remote config). * I've moved `c.config.SkipChecks = true` from the KeyEnter handler in addPreflightCheckPanel() to askCreateV.PreShow(). Imagine the case where the initial preflight checks all pass (so that panel isn't shown), but later the network speed check fails. In this case, SkipChecks wouldn't be set, and the installation would abort in the installV.PreShow() function. * virtio NICs when testing under libvirt don't report speed via /sys/class/net/$IFACE/speed (or, rather, the speed is set to -1) so the test is skipped in this case. Other NIC types under libvirt (e.g. e1000) all seem to be 1Gbps only. Related issue: harvester/harvester#1154 Signed-off-by: Tim Serong <[email protected]>
- Loading branch information
Showing
7 changed files
with
119 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2500 |