-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
extend open_iscsi to allow rescanning a session to discover new mapped LUN's #3763
Comments
Files identified in the description: If these files are incorrect, please update the |
@michaelalang if you convert your POC to a PR, that increases the chance that this feature will actually be implemented :) |
- open_iscsi - extended module to allow rescanning of established session for one or all targets. (ansible-collections#3763)
…d LUN's #3763 (#3765) * <!--- Describe the change below, including rationale and design decisions --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> According to issue 3767, adding a session rescan flag to add and utilize mapped_luns after login into a portal and target. <!--- Pick one below and delete the rest --> - Feature Pull Request <!--- Write the short name of the module, plugin, task or feature below --> open_iscsi rescan flag <!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> <!--- Paste verbatim command output below, e.g. before and after your change --> ``` yaml - name: Rescan Targets open_iscsi: rescan: true target: "{{ item.0 }}" register: iscsi_rescan loop: - iqn.1994-05.com.redhat:8c4ea31d28e tags: - rescan ``` ```bash TASK [Rescan Targets] ******************************************************************************************************************************************************************** changed: [node1] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) changed: [node2] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) TASK [Output rescan output] ************************************************************************************************************************************************************** ok: [node1] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e'" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ok: [node2] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ``` * minor_changes: - open_iscsi - extended module to allow rescanning of established session for one or all targets. (#3763) * * fixed commend according to the recommendation. * Update plugins/modules/system/open_iscsi.py Co-authored-by: Felix Fontein <felix@fontein.de>
…d LUN's #3763 (#3765) * <!--- Describe the change below, including rationale and design decisions --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> According to issue 3767, adding a session rescan flag to add and utilize mapped_luns after login into a portal and target. <!--- Pick one below and delete the rest --> - Feature Pull Request <!--- Write the short name of the module, plugin, task or feature below --> open_iscsi rescan flag <!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> <!--- Paste verbatim command output below, e.g. before and after your change --> ``` yaml - name: Rescan Targets open_iscsi: rescan: true target: "{{ item.0 }}" register: iscsi_rescan loop: - iqn.1994-05.com.redhat:8c4ea31d28e tags: - rescan ``` ```bash TASK [Rescan Targets] ******************************************************************************************************************************************************************** changed: [node1] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) changed: [node2] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) TASK [Output rescan output] ************************************************************************************************************************************************************** ok: [node1] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e'" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ok: [node2] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ``` * minor_changes: - open_iscsi - extended module to allow rescanning of established session for one or all targets. (#3763) * * fixed commend according to the recommendation. * Update plugins/modules/system/open_iscsi.py Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 921417c)
…d LUN's #3763 (#3765) (#3774) * <!--- Describe the change below, including rationale and design decisions --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> According to issue 3767, adding a session rescan flag to add and utilize mapped_luns after login into a portal and target. <!--- Pick one below and delete the rest --> - Feature Pull Request <!--- Write the short name of the module, plugin, task or feature below --> open_iscsi rescan flag <!--- Include additional information to help people understand the change here --> <!--- A step-by-step reproduction of the problem is helpful if there is no related issue --> <!--- Paste verbatim command output below, e.g. before and after your change --> ``` yaml - name: Rescan Targets open_iscsi: rescan: true target: "{{ item.0 }}" register: iscsi_rescan loop: - iqn.1994-05.com.redhat:8c4ea31d28e tags: - rescan ``` ```bash TASK [Rescan Targets] ******************************************************************************************************************************************************************** changed: [node1] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) changed: [node2] => (item=['iqn.1994-05.com.redhat:8c4ea31d28e']) TASK [Output rescan output] ************************************************************************************************************************************************************** ok: [node1] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e'" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ok: [node2] => { "iscsi_rescan": { "changed": true, "msg": "All items completed", "results": [ { "ansible_loop_var": "item", "changed": true, "failed": false, "invocation": { "module_args": { "auto_node_startup": null, "discover": false, "login": null, "node_auth": "CHAP", "node_pass": null, "node_user": null, "port": "3260", "portal": null, "rescan": true, "show_nodes": false, "target": "iqn.1994-05.com.redhat:8c4ea31d28e" } }, "item": [ "iqn.1994-05.com.redhat:8c4ea31d28e" ], "sessions": [ "Rescanning session [sid: 3, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.1,3260]", "Rescanning session [sid: 2, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.2,3260]", "Rescanning session [sid: 1, target: iqn.1994-05.com.redhat:8c4ea31d28e, portal: 127.0.0.3,3260]", "" ] } ] } } ``` * minor_changes: - open_iscsi - extended module to allow rescanning of established session for one or all targets. (#3763) * * fixed commend according to the recommendation. * Update plugins/modules/system/open_iscsi.py Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 921417c) Co-authored-by: Michaela Lang <94735640+michaelalang@users.noreply.github.com>
Files identified in the description: If these files are incorrect, please update the |
Summary
I want to ask for the feature of rescanning a session to discover new mapped LUN targets.
Targetd configurations with multiple mapped LUN's at a Target can not be addressed with the current features.
The patch below POCs how to add a rescan feature to the module.
Issue Type
Feature Idea
Component Name
open_iscsi
Additional Information
example targeted configuration
Code of Conduct
The text was updated successfully, but these errors were encountered: