Closed autocoder10 closed 3 years ago
I am getting the same error message for ibm_svc_vdisk.py and ibm_svc_vol_map.py modules as well. I did some troubleshooting and after the SVC code updated from 8.2.1.8 to 8.3.1.3 in early Jan this year which I believe this issue started. All these modules were working before the code update without any errors. Can you please check and let me know that fatal error is occurring.
In modules/ibm_svc_host.py under "def host_create" the below "if/else" condition is not working and we are getting 'message' in result. I am not seeing any of those self.log output in the debug file.
# Run command
result = self.restapi.svc_run_command(cmd, cmdopts, cmdargs=None)
self.log("create host result '%s'", result)
**if 'message' in result:
self.changed = True
self.log("create host result message '%s'", (result['message']))
else:
self.module.fail_json(
msg="Failed to create host [%s]" % self.name)**
Thanks for reporting it @autocoder10 We will analyze this and revert.
@rohitk-github: Can you please provide update on this issue. Thanks!!
Hi @autocoder10 Yes, I have an update on this. This issue is present in SV 8.3.1.3 and 8.3.1.4. Apparently, the REST calls for "mk" actions do not return JSON output and thus "json.load()" is failing. This is fixed in Build 8.4.0.0.
Hmm that's a bummer. We are not planning to upgrade SVC's to 8.4 this year. So, will have to add some addl. validation tasks in the playbook after creating the objects before going to the next task till then.
SUMMARY
When running a create host playbook using ibm_svc_host py module, got a fatal error and showing as Failed but creating the host entry.
Error: fatal: [localhost]: FAILED! => {"changed": false, "msg": "Module failed. Error [argument of type 'NoneType' is not iterable]."}
ISSUE TYPE
COMPONENT NAME
ibm_svc_host
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS