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

iSCSILogicalUnit: do not use lio_iblock with lio-t #1704

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

chrboe
Copy link
Contributor

@chrboe chrboe commented Oct 15, 2021

For lio-t, we cannot use the lio_iblock parameter, as targetcli just
ignores the index we give it and generates its own.

A logical consequence is that we cannot use the contents of the
lio_iblock parameter to access the iblock_* directories in the configfs,
since we do not know the values of the indices generated by targetcli.

This leads to an effect where systems with only one target work just
fine: targetcli always picks "0" as the first index, and the default
value of lio_iblock is "0". But when multiple targets are involved, one
of them will get the index "1" whereas we are still trying to access
"iblock_0", leading to errors of the form:

/sys/kernel/config/target/core/iblock_0/lu1_target1/wwn/product_id: No such file or directory

Since we only ever want to access the target directory inside the
iblock_* directory, we can just use a glob to sufficiently describe the
path -- there should always only be one match.

For lio-t, we cannot use the lio_iblock parameter, as targetcli just
ignores the index we give it and generates its own.

A logical consequence is that we cannot use the contents of the
lio_iblock parameter to access the iblock_* directories in the configfs,
since we do not know the values of the indices generated by targetcli.

This leads to an effect where systems with only one target work just
fine: targetcli always picks "0" as the first index, and the default
value of lio_iblock is "0". But when multiple targets are involved, one
of them will get the index "1" whereas we are still trying to access
"iblock_0", leading to errors of the form:

/sys/kernel/config/target/core/iblock_0/lu1_target1/wwn/product_id: No such file or directory

Since we only ever want to access the target directory inside the
iblock_* directory, we can just use a glob to sufficiently describe the
path -- there should always only be one match.
@knet-ci-bot
Copy link

Can one of the admins verify this patch?

@oalbrigt
Copy link
Contributor

ok to test

@oalbrigt oalbrigt merged commit 4ac7915 into ClusterLabs:master Oct 18, 2021
@oalbrigt
Copy link
Contributor

LGTM. Thanks.

@chrboe chrboe deleted the cbo/lio-t-iblock-glob branch October 18, 2021 10:54
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.

3 participants