-
Notifications
You must be signed in to change notification settings - Fork 12
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
Map LUNs to initiator ACLs individually #5
Comments
Hi Richard, Let me try to rephrase if I understand your question correctly:
In above there is client1:111 that see 2 LUNs and client2:222 that sees one LUN. If you could let me know if the above is the use case you are looking for, I can have a look at the code over weekend and let you know if there is a simple way to implement this into the modules. If my understanding is not correct, could you please give me some example from 'targetcli' when you configure the desired configuration manually so I have better idea what you are looking for? As for the "looping" part of your question, the |
Hi Ondrej, here is a look at the LIO config. So I have some tasks that:
|
Hi Richard, Thank you for answer. I think I have now good understanding on what you would like to do.
The longer answer is: I think it will be possible to add the functionality and make it work, but it will take me some time to prepare the code. My expectation on how it could look like after improving the code is as follows:
with the result that should look like this in targetcli:
NOTE: Above is just example on how this might look like in future and some details for variables in ansible may change, the expected output from If you are OK with giving me some time (I think that I should have time to get some testing code by the end of this month) then I will prepare the code in separate branch and let you know once it is ready to be tested - changes will be in both |
Hi Ondrej, yes that's exactly what I was hoping for :-) Thanks for confirming that it cannot do it now - at least I was not missing something. Sure I would be happy to test it when you have it ready. Just to clarify: will it be possible to supply the "wwn" values at run time, e.g. from a previously registered variable? That would really be perfect if we could? |
I think it should be possible, have a look at following two examples that produces same output. In first one everything is specified manually, in second one the Example 1 (manually input everything):
example 2 (generate same configuration for list of WWNs):
I will later add the 'example 2' into README for the targetcli role as it looks practical for large deployments with very similar/templated configuration. |
Very nice - thanks Ondrej - look forward to it :-) |
Update on progress:
No significant code for testing yet, but I mostly got the code-level idea on what I need to do next. Will let you know once the new module is done at which point I think there will some code that can be tested out. Stay tuned on more updates probably this or next weekend. |
Yes, that |
WARNING: this is breaking change as the format of 'initiators' has changed. Motivation for this change was OndrejHome/ansible.targetcli-modules#5 To be able to use this new format the relevant OndrejHome.targetcli-modules are needed. Known issues: the cluster configuration use case is broken at this time.
Hi Richard, I have finally some code that can be tested :) Your use case should be covered by Example C in https://github.com/OndrejHome/ansible.targetcli/tree/develop README. When you will have time please let me know if this works for you. I have still few things on my TODO list for this change before it can make it into I expect to get to this probably next week or next weekend. |
Hi Ondrej, hey sorry I have not got to testing this yet. Hopefully this week it will happen. Thanks for your work though - looks good so far. |
Hi Ondrej, thanks for creating these great modules for targetcli. For our situation, we have 4 distinct target entries under /iscsi and under each /iscisi/target_iqn/tpg1/acls/initiator_iqn I would like to create a LUN mapping. However, among these modules I cannot see the specific one that effectively executes the "create mapped_lun=... tpg_lun_or_backstore=..." command. The example at the play/role level (step3 of https://www.famera.cz/blog/ansible/ansible_targetcli.html) looks like it would work if I had only a single target WWN/iQN only - but we have 4 in this case (one for each Infiniband HCA), and I don't think we can loop at the play-level (only at the task-level)? I have separately extracted the 4x taget WWNs into a list variable and would like to loop over them applying the same "create mapped_lun=... tpg_lun_or_backstore=..." commands under each respective acls folder?
The text was updated successfully, but these errors were encountered: