7 Posts
0
1745
Initiator alias fails as invalid in host module
Hello -
I am having difficulty assigning initiator aliases using the host module. The host initiators list for the host module fails to accept initiator aliases. I have tried all combinations of quotes, double quotes, not quotes, escape the slash, spaces between the hostname, slash and port name. It indicates the initiator alias is invalid.
playbook task:
- name: Create Initiator Group "{ { ig_name }}"
dellemc.powermax.host:
<<: *uni_connection_vars
host_name: "{ { host_name }}"
initiators: "{ { host_initiators }}"
state: 'present'
initiator_state: 'present-in-host'
vars_files host_initiator list:
host_initiators:
- 10000000cabffaee
- 'ANSIBLE/FAEE'
# - 10000000cccffaef
# - 'ANSIBLE/FAEF'
play output:
TASK [Create Initiator Group "ANSIBLE_IG"] *********************************************************************************
task path: /opt/ansible/dellemc/vmax_pmax/etc_dc/poc/poc_ans_playbook/host_provision_jtw.yml:40
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Initiator alias ANSIBLE/FAEE is invalid"}
PLAY RECAP *****************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Thank you!
John_TW
7 Posts
0
September 2nd, 2022 11:00
Jennifer,
I was unable to get the host module w/initiator and alias list to work; it continued to show initiator alias invalid.
I was able to get the aliases to be applied by using the initiator module w/new_aliases after the masking view was created:
tasks:
- name: Create Storage Group and volumes for "{ { sg_name }}"
dellemc.powermax.storagegroup:
<<: *uni_connection_vars
sg_name: "{ { sg_name }}"
service_level: "Diamond"
volumes: "{ { volume_list }}"
vol_state: "present-in-group"
state: 'present'
- name: Create Initiator Group "{ { ig_name }}"
dellemc.powermax.host:
<<: *uni_connection_vars
host_name: "{ { ig_name }}"
initiators: "{ { item.initiator_id }}"
state: 'present'
initiator_state: 'present-in-host'
loop: "{ { initiator_info }}"
- name: Create Port Group "{ { pg_name }}"
dellemc.powermax.portgroup:
<<: *uni_connection_vars
portgroup_name: "{ { pg_name }}"
state: "present"
ports: "{ { port_list }}"
port_state: 'present-in-group'
- name: Create Masking View "{ { mv_name }}" with "{ { sg_name }}", "{ { ig_name }}", and "{ { pg_name }}"
dellemc.powermax.maskingview:
<<: *uni_connection_vars
mv_name: "{ { mv_name }}"
portgroup_name: "{ { pg_name }}"
host_name: "{ { ig_name }}"
sg_name: "{ { sg_name }}"
state: 'present'
- name: Set initiator aliases for "{ { ig_name }}"
dellemc.powermax.initiator:
<<: *uni_connection_vars
initiator_id: "{ { item.initiator_id }}"
new_alias:
new_node_name: "{ { host_name }}"
new_port_name: "{ { item.new_port_name }}"
state: 'present'
loop: "{ { initiator_info }}"
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
September 2nd, 2022 03:00
Hi @John_TW ,
Could you please try to list the initiator details using the alias in the initiator module, if the details are returned?
Thanks,
Jennifer
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
September 2nd, 2022 04:00
Hi @John_TW
Play book syntax to retrieve initiator details using initiator module is as below
John_TW
7 Posts
0
September 2nd, 2022 09:00
Hello Jennifer - it still fails.
Here is the get task and output:
- name: Get initiator details
dellemc.powermax.initiator:
<<: *uni_connection_vars
alias: 'ANSIBLE/FAEE'
state: 'present'
play --ask-vault-pass host_get-initiator-details.yml
Vault password:
PLAY [Provisioning storage for Powermax] ****************************************************************************************************
TASK [Get initiator details] ****************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Initiator ANSIBLE/FAEE is not found"}
PLAY RECAP **********************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Here is the set task and output:
- name: Set initiator details
dellemc.powermax.host:
<<: *uni_connection_vars
host_name: '{ { ig_name }}'
initiators: 'ANSIBLE/FAEE'
initiator_state: 'present-in-host'
state: 'present'
play --ask-vault-pass host_set-initiator-details.yml
Vault password:
PLAY [Provisioning storage for Powermax] ****************************************************************************************************
TASK [Set initiator details] ****************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Initiator alias ANSIBLE/FAEE is invalid"}
PLAY RECAP **********************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
jennifer_john
1 Rookie
1 Rookie
•
79 Posts
0
September 5th, 2022 08:00
Hi @John_TW ,
Thanks for the update. Are u able to apply the new initiator alias that you have created through the initiator module now, to the host module?
I tried to reproduce the behavior and as per the error message, it just seems that the initiator alias is not existing?
Thanks,
Jennifer
John_TW
7 Posts
0
September 7th, 2022 04:00
Hi Jennifer
I was only able to apply the alias through the initiator module after assigning the WWN with the host module. The host module, while it lists the ability to set the initiator WWN and alias at the same time, only allows the WWN to be set. Ansible always indicates the alias is invalid whenever I attempt to set both the WWN and alias with the host module.
The sequence that works:
full sequence for a new host:
Thanks
John