Fix incorrect storage protocol usage when multiple appliances are defined in secret #361
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.
Description
Issue: When each of the arrays in the secret are processed during node pod startup, host objects are getting created with correct protocol on each of the arrays. But the flags that are used to determine the protocol are saved in the Node's controller service, which is later used during NodeStageVolume and other Node calls. So, depending on whichever array was last processed, that protocol is used for these Node calls. This causes the 'unable to find device' failure.
Fix: Similar to how the FC/NVMe initiators are maintained in the service for each of the arrays as 'map', NVMe and FC protocol flags are maintained in the same way for each of the arrays.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
K8s cluster setup with iSCSI and NVMe pre-req steps. Added 2 arrays in the secret with NVMe/TCP for array-1 and iSCSI for array-2. Host objects are created on both the arrays as expected once node pods are deployed.
Provisioned PV with SC referring to NVMe/array-1. Issue was reproduced.
With the fix, the steps are repeated and it worked.
Provisioning from other array with iSCSI protocol too worked. App pods are in running state and can write data to it.
tests/simple.yaml also passed.
cert-csi suites passed for both NVMe and iSCSI based storage classes.
Logs and reports are attached to ticket 28493.