On 11/20/2014 01:36 AM, Gris Ge wrote:
1. For a initiator volume mask when requested initiator is a
member of
access group, we will got inconsistent volume masking status between
initiators in access group. The same problem also goes to unmask.
# We can change targetd to do access group masking whenever
# initiator mask requested. But we cannot change targetcl.
Let's just move to use real access groups and then only support those
going forward.
I'm not sure what the point you were making about targetcli was, but yes
we *could* change targetcli if needed but I don't think we'll need to.
You can define access groups in targetcli (via the tpg/acls tag and
untag commands) and you can also define initiators (NodeACLs in
LIO-speak) but I'm assuming targetd, using the new NodeACLGroup support
in rtslib-fb that I'm working on, would ignore NodeACLs not in a group
(i.e. where nodeacl.tag == None).
2. For initiator volume unmask, targetd will remove node_acl if
that's the last mask. This is not acceptable when initiator is
a member of access group. To support access group, we have to
change expose_destroy() method of targetd which break backward
compatibility.
True. I think we need to do this because what we have now is not usable
and also probably not used by anyone :) so we should do what we need to
in order to make it work right.
3. Locking issue. When adding a initiator to a access group,
all current masking status will copy to that initiator. What if
we do volume unmask at the same time?
targetd currently serializes handling of API calls so this should not
cause a race condition.
Generally, supporting both initiator mask and access group mask will
cause inconsistence unless we break backward compatibility and
fix all possibilities. We also have to change targetcli also.
See above, let's just support access groups and break what we need to break.
I would like to suggest we use previous V2 patch to allow LSM
simulator each initiator as access group.
For adding real access group support in targetcli or targetd,
removing initiator mask completely could make life much easier, which
is a major version change of course.
Like I said above, let's just fix it the way we want it to be long-term.
I'll have a development tree to share of the rtslib changes shortly.
Then we can update targetd to take advantage of groups, and lastly
update the libsm targetd plugin, if that sounds ok with everyone.
Regards -- Andy