Can't create FC host, vdisk limitation?, Documentation.
olemyk opened this issue · 7 comments
SUMMARY
Dokumentation is missing. and cant create FC/SCSI hosts.
ISSUE TYPE
- Bug Report
have found most of the details by looking into the python code and examples there.
I'm guessing that the documentation will be updated soon?
-
When creating hosts, the remove/absent is working but not create a host for me.
getting error: CMMVC5867E The action failed because the worldwide port name is already assigned or is not valid.
However when I'm using the same fcwwpn when creating it manually that works fine.
Have tried different wwpn. ISCSI is working.
if i create the host manually and run playbook it will run the play without errors.
fatal: [localhost]: FAILED! => {"changed": false, "msg": {"code": 500, "data": {"fcwwpn": "10000000C9609C78", "iogrp": "0:1:2:3", "name": "db2hotel2", "protocol": "scsi"}, "err": ["HTTPError %s", "HTTP Error 500: Internal Server Error"], "out": "\"Command error occurred; error code 1: CMMVC5867E The action failed because the worldwide port name is already assigned or is not valid. \"", "url": "https://10.10.10.56:7443/rest/mkhost"}}
-
And The example in the python script is with protocol:
"FC"
this should be ´SCSI´ -
For Creating volumes:
I don't see any values for creating other volumes then thick. Is this Virtualize RestApi limit?
Info: I have tested this on a SVC cluster with code 8.3.0.1 (soon upgrading to 8.3.1) and use the example in Python module.
COMPONENT NAME
ANSIBLE VERSION
ansible 2.9.4
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
---
- name: Using the IBM Spectrum Virtualize collection to create an FC host
hosts: localhost
collections:
- ibm.spectrum_virtualize
gather_facts: no
connection: local
tasks:
- name: Define a new FC host
ibm_svc_host:
clustername: 10.10.10.56
domain:
username: xxx
password: xx
log_path: //Users/olemyk/IdeaProjects/ansible-sandbox/logs/playbook.debug
name: db2hotel2
state: present
fcwwpn: 10000000C9609C78
iogrp: 0:1:2:3
protocol: scsi #wrong in detail
type: generic
EXPECTED RESULTS
ACTUAL RESULTS
fatal: [localhost]: FAILED! => {"changed": false, "msg": {"code": 500, "data": {"fcwwpn": "10000000C9609C78", "iogrp": "0:1:2:3", "name": "db2hotel2", "protocol": "scsi"}, "err": ["HTTPError %s", "HTTP Error 500: Internal Server Error"], "out": "\"Command error occurred; error code 1: CMMVC5867E The action failed because the worldwide port name is already assigned or is not valid. \"", "url": "https://10.10.10.56:7443/rest/mkhost"}}
Yes, you are right, there is mistake in the example doc, thank you very much, I will fix it.
@olemyk, for the create volume, it is not the rest api limitation, for the first release, we don't support it and I think we can add it later.
Thanks for the coments.
I will say that Vdisk is the most important, then host an host cluster!
Have you had time to look into mkhost error that i experiance ?
The root cause is that, in our code, we didn't add the 'force' parameter, and some the CLI help command that :
-force
(Optional) Specifies that a logical host object is created without
validation of the WWPNs.
So if you assign a invalidate wwpn, ansible will not work, but if you use a validate wwpn, it should be work
But I think we need to add the 'force' parameter as the default for our ansible colleciton.
Tried the release 1.0.3. (only available on Galaxy, no git) and I can now create the host. =)
Compared the old and new release and i can see that there is some changes in the make command.
# Make command
cmd = 'mkhost'
cmdopts = {'name': self.name, 'force': True}
Also in git, please use the develop branch https://github.com/ansible-collections/ibm.spectrum_virtualize/blob/develop/plugins/modules/ibm_svc_host.py#L269
Done