Problem while configuring MDS zoneset
damalf opened this issue · 12 comments
SUMMARY
Problem while configuring MDS zoneset
ISSUE TYPE
- Bug Report
COMPONENT NAME
cisco.nxos.nxos_zone_zoneset
ANSIBLE VERSION
'ansible_version': {'full': '2.13.3',
'major': 2,
'minor': 13,
'revision': 3,
'string': '2.13.3'},
COLLECTION VERSION
# /root/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.nxos 4.1.0
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
zoneset:
- name: VSAN23_ZS
members:
- name: GENERALE_ESX
- name: GENERALE_PMAX_2427
action: activate
EXPECTED RESULTS
zoneset created
ACTUAL RESULTS
fatal: [mdsvsi21]: FAILED! => {"changed": false, "module_stderr": "'dict' object has no attribute 'split'", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"}
[
cc @srbharadwaj
Can you please share what is GENERALE_ESX and GENERALE_PMAX_2427
Also can you run the playbook with -vvvv and share the verbose output?
- name: Declare zones and zonesets
cisco.nxos.nxos_zone_zoneset:
zone_zoneset_details:
- vsan: 23
mode: basic
smart_zoning: true
zone:
- name: GENERALE_ESX
members:
- device_alias: esxvsi201_vmhba4
devtype: initiator
- device_alias: esxvsi202_vmhba4
devtype: initiator
- device_alias: esxvsi203_vmhba4
devtype: initiator
- device_alias: esxvsi204_vmhba4
devtype: initiator
- device_alias: esxvsi205_vmhba4
devtype: initiator
- device_alias: esxvsi206_vmhba4
devtype: initiator
- device_alias: esxvsi207_vmhba4
devtype: initiator
- device_alias: esxvsi208_vmhba4
devtype: initiator
- name: GENERALE_PMAX_2427
members:
- device_alias: pmaxvsi21-2427_DIR0_A2P2
devtype: target
- device_alias: pmaxvsi21-2427_DIR0_A3P2
devtype: target
- device_alias: pmaxvsi22-2427_DIR1_B2P2
devtype: target
- device_alias: pmaxvsi22-2427_DIR1_B3P2
devtype: target
zoneset:
- name: VSAN23_ZS
members:
- name: GENERALE_ESX
- name: GENERALE_PMAX_2427
action: activate
TASK [Declare zones and zonesets] *******************************************************************************************************************************************************************************************************************************************************************************************
task path: /opt/Ansible/Cisco/IAAS/mds/mdsvsi12_VSI_Generale.yml:58
<mdsvsi12.patek.com> attempting to start connection
<mdsvsi12.patek.com> using connection plugin ansible.netcommon.httpapi
Found ansible-connection at path /usr/bin/ansible-connection
<mdsvsi12.patek.com> found existing local domain socket, using it!
<mdsvsi12.patek.com> updating play_context for connection
<mdsvsi12.patek.com>
<mdsvsi12.patek.com> local domain socket path is /root/.ansible/pc/ebe6260b71
redirecting (type: action) cisco.nxos.nxos_zone_zoneset to cisco.nxos.nxos
redirecting (type: action) cisco.nxos.nxos_zone_zoneset to cisco.nxos.nxos
<mdsvsi12.patek.com> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<mdsvsi12.patek.com> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.nxos.nxos_zone_zoneset at /root/.ansible/collections/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py
<mdsvsi12.patek.com> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.nxos.nxos_zone_zoneset
<mdsvsi12.patek.com> ANSIBLE_NETWORK_IMPORT_MODULES: complete
fatal: [mdsvsi12]: FAILED! => {
"changed": false,
"module_stderr": "'dict' object has no attribute 'split'",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"
}
can you share on which switch and which version of switch this module was run?
I ran on my switch 9718 with 9.3(2) and it ran fine,
<m9718-175> ssh type is now set to paramiko
<m9718-175>
<m9718-175> local domain socket path is /root/.ansible/pc/84d373fccd
redirecting (type: action) cisco.nxos.nxos_zone_zoneset to cisco.nxos.nxos
redirecting (type: action) cisco.nxos.nxos_zone_zoneset to cisco.nxos.nxos
<m9718-175> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<m9718-175> ANSIBLE_NETWORK_IMPORT_MODULES: found cisco.nxos.nxos_zone_zoneset at /root/ans_fc_int/collections/ansible_collections/cisco/nxos/plugins/modules/nxos_zone_zoneset.py
<m9718-175> ANSIBLE_NETWORK_IMPORT_MODULES: running cisco.nxos.nxos_zone_zoneset
<m9718-175> ANSIBLE_NETWORK_IMPORT_MODULES: complete
changed: [m9718-175] => {
"changed": true,
"commands": [
"terminal dont-ask",
"no zone mode enhanced vsan 100",
"zone smart-zoning enable vsan 100",
"zone name GENERALE_ESX vsan 100",
"member device-alias esxvsi201_vmhba4 initiator",
"member device-alias esxvsi202_vmhba4 initiator",
"member device-alias esxvsi203_vmhba4 initiator",
"member device-alias esxvsi204_vmhba4 initiator",
"member device-alias esxvsi205_vmhba4 initiator",
"member device-alias esxvsi206_vmhba4 initiator",
"member device-alias esxvsi207_vmhba4 initiator",
"member device-alias esxvsi208_vmhba4 initiator",
"zone name GENERALE_PMAX_2427 vsan 100",
"member device-alias pmaxvsi21-2427_DIR0_A2P2 target",
"member device-alias pmaxvsi21-2427_DIR0_A3P2 target",
"member device-alias pmaxvsi22-2427_DIR1_B2P2 target",
"member device-alias pmaxvsi22-2427_DIR1_B3P2 target",
"zoneset name VSAN23_ZS vsan 100",
"member GENERALE_ESX",
"member GENERALE_PMAX_2427",
"zoneset activate name VSAN23_ZS vsan 100",
"no terminal dont-ask"
],
"invocation": {
"module_args": {
"zone_zoneset_details": [
{
"default_zone": null,
"mode": "basic",
"smart_zoning": true,
"vsan": 100,
"zone": [
{
"members": [
{
"device_alias": "esxvsi201_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi201_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi202_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi202_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi203_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi203_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi204_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi204_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi205_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi205_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi206_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi206_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi207_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi207_vmhba4",
"remove": false
},
{
"device_alias": "esxvsi208_vmhba4",
"devtype": "initiator",
"pwwn": "esxvsi208_vmhba4",
"remove": false
}
],
"name": "GENERALE_ESX",
"remove": false
},
{
"members": [
{
"device_alias": "pmaxvsi21-2427_DIR0_A2P2",
"devtype": "target",
"pwwn": "pmaxvsi21-2427_DIR0_A2P2",
"remove": false
},
{
"device_alias": "pmaxvsi21-2427_DIR0_A3P2",
"devtype": "target",
"pwwn": "pmaxvsi21-2427_DIR0_A3P2",
"remove": false
},
{
"device_alias": "pmaxvsi22-2427_DIR1_B2P2",
"devtype": "target",
"pwwn": "pmaxvsi22-2427_DIR1_B2P2",
"remove": false
},
{
"device_alias": "pmaxvsi22-2427_DIR1_B3P2",
"devtype": "target",
"pwwn": "pmaxvsi22-2427_DIR1_B3P2",
"remove": false
}
],
"name": "GENERALE_PMAX_2427",
"remove": false
}
],
"zoneset": [
{
"action": "activate",
"members": [
{
"name": "GENERALE_ESX",
"remove": false
},
{
"name": "GENERALE_PMAX_2427",
"remove": false
}
],
"name": "VSAN23_ZS",
"remove": false
}
]
}
]
}
},
"messages": [
"zone mode configuration changed from enhanced to basic for vsan 100",
"smart-zoning enabled for vsan 100",
"adding zone member 'esxvsi201_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi202_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi203_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi204_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi205_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi206_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi207_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'esxvsi208_vmhba4' of device type 'initiator' to zone 'GENERALE_ESX' in vsan 100",
"adding zone member 'pmaxvsi21-2427_DIR0_A2P2' of device type 'target' to zone 'GENERALE_PMAX_2427' in vsan 100",
"adding zone member 'pmaxvsi21-2427_DIR0_A3P2' of device type 'target' to zone 'GENERALE_PMAX_2427' in vsan 100",
"adding zone member 'pmaxvsi22-2427_DIR1_B2P2' of device type 'target' to zone 'GENERALE_PMAX_2427' in vsan 100",
"adding zone member 'pmaxvsi22-2427_DIR1_B3P2' of device type 'target' to zone 'GENERALE_PMAX_2427' in vsan 100",
"adding zoneset member 'GENERALE_ESX' to zoneset 'VSAN23_ZS' in vsan 100",
"adding zoneset member 'GENERALE_PMAX_2427' to zoneset 'VSAN23_ZS' in vsan 100",
"activating zoneset 'VSAN23_ZS' in vsan 100"
]
}
META: ran handlers
META: ran handlers
PLAY RECAP ******************************************************************************************************************************
m9718-175 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
(ans_fc_int) [root@rhel7-suhas-211 ans_fc_int]#
The switch are version 8.4(2d)
Is it possible to share the tech support? if so please share it on my official id: subharad@cisco.com
@NilashishC according to my unit tests with the above yaml, and running multiple local tests, i dont see why the module failed, can you point to me exactly why its failing?
How to check this part?
msg": "MODULE FAILURE\nSee stdout/stderr for the exact error"
@damalf Can you try running the playbook after setting export ANSIBLE_NETWORK_IMPORT_MODULES=False
? It might give a more verbose traceback.
For even more detailed logs, please follow these steps: https://docs.ansible.com/ansible/latest/network/user_guide/network_debug_troubleshooting.html#enabling-networking-device-interaction-logging
Hi.
Many thanks for your feedback.
In fact changing the zoning to one single zone solved my problem :
- name: Declare zones and zonesets
cisco.nxos.nxos_zone_zoneset:
zone_zoneset_details:
- vsan: 24
mode: basic
smart_zoning: true
zone:
- name: GENERALE_ESX-GENERALE_PMAX_2427
members:
- device_alias: esxvsi201_vmhba5
devtype: initiator
- device_alias: esxvsi202_vmhba5
devtype: initiator
- device_alias: esxvsi203_vmhba5
devtype: initiator
- device_alias: esxvsi204_vmhba5
devtype: initiator
- device_alias: esxvsi205_vmhba5
devtype: initiator
- device_alias: esxvsi206_vmhba5
devtype: initiator
- device_alias: esxvsi207_vmhba5
devtype: initiator
- device_alias: esxvsi208_vmhba5
devtype: initiator
- device_alias: pmaxvsi21-2427_DIR0_A2P3
devtype: target
- device_alias: pmaxvsi21-2427_DIR0_A3P3
devtype: target
- device_alias: pmaxvsi22-2427_DIR1_B2P3
devtype: target
- device_alias: pmaxvsi22-2427_DIR1_B3P3
devtype: target
zoneset:
- name: VSAN24_ZS
members:
- name: GENERALE_ESX-GENERALE_PMAX_2427
action: activate
@damalf Good to know that your issue is resolved. I'll close this ticket now.