improve interface filtering when iscsi session is detected #891
+54
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR improves nic filtering when iscsi sessions are detected.
With this change, in case a vlan interface is used for an iscsi session, then the parent interface is filtered from the list of interfaces and is no longer visible in the list of interfaces
If there is no iscsi session then the behaviour of the installer remains unchanged.
Problem:
v1.4.0 introduced support for external iscsi disks to be used as install disks. Changes were made in the installer to skip interfaces which were being used for the iscsi session. In environments where vlans are in use for accessing the iscsi disks, then dracut sets up a vlan interface which is subsequently used for iscsi login and subsequent sessions.
Our current logic did not pick this up and the parent interface being used for the vlan interface was still included in the installer drop down.
Solution:
Improve the interface filtering to identify if a vlan interface is in use for an iscsi session, and filter the corresponding parent interface
For example on a sample setup a vlan interface for
vlan 2017
running of the base interfaceenp4s0f0
is being used for iscsi login.With the improved filtering, interface
enp4s0f0
is no longer shown in the harvester installer network optionsRelated Issue:
harvester/harvester#6964
Test plan: