1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments
patchback[bot] 206ac72bd8
extend open_iscsi to allow rescanning a session to discover new mapped 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. (https://github.com/ansible-collections/community.general/issues/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 921417c4b5)

Co-authored-by: Michaela Lang <94735640+michaelalang@users.noreply.github.com>
2021-11-22 19:50:44 +01:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
4.1.0.yml Prepare 4.1.0 release. 2021-11-20 09:16:49 +01:00
1088-nmcli_add_multiple_addresses_support.yml change ip4 type to list of str (#3738) (#3757) 2021-11-19 07:27:36 +01:00
2386-github_repo-fix-idempotency-issues.yml Bugfix: github_repo does not apply defaults on existing repos (#2386) (#3769) 2021-11-22 13:49:29 +01:00
3632-add-redfish-host-interface-config-support.yml redfish_config: Add support to configure Redfish Host Interface (#3632) (#3718) 2021-11-16 19:45:30 +01:00
3661-lxd_container-add-vm-support.yml lxd_container: support lxd instance types (#3661) (#3761) 2021-11-20 08:36:04 +01:00
3693-add-redfish-host-interface-info-support.yml Add GetHostInterfaces command to redfish_info (#3693) (#3743) 2021-11-16 20:06:28 +01:00
3694-gitlab-cleanup.yml gitlab: clean up modules and utils (#3694) (#3741) 2021-11-16 19:45:45 +01:00
3702-ipmi-encryption-key.yml Support IPMI encryption key parameter in ipmi_boot (#3702) (#3770) 2021-11-22 13:49:54 +01:00
3708-listen_ports_facts-add-ss-support.yml listen_ports_facts: Added support for ss (#3708) (#3744) 2021-11-16 20:06:56 +01:00
3765-extend-open_iscsi-with-rescan.yml extend open_iscsi to allow rescanning a session to discover new mapped LUN's #3763 (#3765) (#3774) 2021-11-22 19:50:44 +01:00