Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Login sequence #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jlowellwofford
Copy link

When trying to get this to work with the iSCSI target provided by RHEL8, I found three issues with the Login sequence:

  1. we re-transmit parameters. this is an RFC violation (and some targets really don't like it);
  2. we don't interpret the three basic param responses. There's a catch for Reject, but not NotUnderstood or Irrelevant. If we get a NotUnderstood we generally try to decode it as, say, an Int, and fail (note: we get lots of NotUnderstoods due to 1);
  3. we have no mechanism to handle requests the target makes of us, which can cause login to fail for trivial reasons.

I handled these three by:

  • Using a param queue to control which params have been sent, and dynamically add params that are needed.
  • Adding some very basic handling for NotUnderstood and Irrelevant (basically, just ignore them and print a message).
  • If we get a param request from the target, blindly mirror it back to accept it (probably not the best long-term strategy, but seems to work).

With these changes, I was able to mount a RHEL8 target.

Signed-off-by: J. Lowell Wofford <lowell@lanl.gov>
Signed-off-by: J. Lowell Wofford <lowell@lanl.gov>
Signed-off-by: J. Lowell Wofford <lowell@lanl.gov>
Signed-off-by: J. Lowell Wofford <lowell@lanl.gov>
Signed-off-by: J. Lowell Wofford <lowell@lanl.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant