-
Notifications
You must be signed in to change notification settings - Fork 148
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
fix the stpg command error for multiple port group #475
Open
tangwenji
wants to merge
1
commit into
open-iscsi:main
Choose a base branch
from
tangwenji:fix_stpg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you want this behavior? We will be reporting success even though we did not transition the state. It could result in a initiator thinking failover worked when it didn't or in some loop where STPG reports success but then a RTPG reports states that do not match what the STPG was requesting, so the initiator retries over and over.
I think I could go either way, because I think we only see this type of command in testing, so I do not really know what the initiator expects and I do not see anything in SPC about this partial case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want this behavior, just make the message above tcmu_dev_warn() in case we find out we were wrong and then this issue will not be silently dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like my example,the stpg command is successful,because the second loop meet the criteria。
In the actual environment, the TPG corresponding to the Initiator sd device is enable.So we don't need to log the message with warn level, and if no TPG match,there is error message following。
If there is no enabled TPG, it will be returned before this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about users/apps that expect all transitions requested in the STPG to be successful or the command to fail?
Are you saying SPC is ok with partial completions like in your patch? I did not see anything in SPC. If you see something then send the section number.
Or, are you saying apps/users are ok with it? My concern was that apps/users expect all transitions in the STPG to succeed if the STPG is returned with a successful status. Is there a specific app that works like how you are testing with sg_stpg or is this just a protocol type of test to check the behavior?
I get what you are saying that for your example we matched one of the group transitions in the STPG, but I was saying the user needs some sort of notification that the entire command is not succeeding for some reason.