fatal: HTTP Error 500 warning cause playbook to fail
freedge opened this issue · 7 comments
SUMMARY
Running a playbook for volume creation, got a fatal error for something that is actually, a warning.
fatal: [blade1]: FAILED! => {"changed": false, "msg": {"code": 500, "data": {"easytier": "on", "iogrp": "io_grp0", "mdiskgrp": "IaaS_1", "name": "blade1_boot_0", "rsize": "2%", "size": "200", "unit": "gb"}, "err": ["HTTPError %s", "HTTP Error 500: Internal Server Error"], "out": "\"Command error occurred; error code 1: CMMVC6372W The virtualized storage capacity that the cluster is using is approaching the virtualized storage capacity that is licensed. \"", "url": "https://svc:7443/rest/mkvdisk/-autoexpand"}}
The playbook failed because of this fatal error, however the disk was well created! After a rerun, playbook completed successfully.
I expect the API (Current software level: Version 8.2.1.8 (build 147.19.1911061502000) )
to not return an error 500 in case of warning.
If this cannot be fixed easily, I would expect at least the ansible module to fail when running in check mode (here, nothing was reported)
ISSUE TYPE
- Bug Report
COMPONENT NAME
ibm_svc_vdisk
ANSIBLE VERSION
ansible 2.10.0
Can you please share the playbook ?
it should work with just the example playbook for ibm_svc_vdisk
Set the SCU low enough and run something like this
---
- name: Create volume
hosts: blade
connection: local
gather_facts: no
serial: 1
collections:
- ibm.spectrum_virtualize
vars:
svcuser: "{{ lookup('env','IBMSVC_USERNAME') }}"
svcpassword: "{{ lookup('env','IBMSVC_PASSWORD') }}"
volume_name: "{{ inventory_hostname}}_boot_2"
tasks:
- name: Create volume
ignore_errors: false
delegate_to: localhost
ibm_svc_vdisk:
clustername: '{{ svc_ip }}'
username: "{{ svcuser }}"
password: "{{ svcpassword }}"
log_path: /tmp/playbook.debug
name: "{{ volume_name }}"
state: present
mdiskgrp: '{{ svc_pool }}'
size: "200"
unit: gb
It fails with error
fatal: [blade1]: FAILED! => {"changed": false, "msg": {"code": 500, "data": {"easytier": "off", "mdiskgrp": "pool", "name": "blade1_boot_2", "size": "200", "unit": "gb"}, "err": ["HTTPError %s", "HTTP Error 500: Internal Server Error"], "out": "\"Command error occurred; error code 1: CMMVC6372W The virtualized storage capacity that the cluster is using is approaching the virtualized storage capacity that is licensed. \"", "url": "https://svc:7443/rest/mkvdisk"}}
Thanks, I asked for the playbook because I spotted the "rsize" parameter in the output log in your first comment.
Because our module (ibm_svc_vdisk) does not support "rsize" yet.
Nevertheless, We will analyse and look into the issue.
haha yes, I had to fork and make a few changes. I can submit pr if you decide to accept contributions...
on vdisk I need the auto expand and iogroup options, on vol_map the scsi option to specify the lun id.
Thanks man, will let you know once we start accepting contributions. :)
The issue is not reproducible on the latest ibm_svc_vdisk and ibm_svc_manage_volume module. The Ansible module throws proper error message in such case and volume is also not created.
Since the issue is not reproducible anymore on the latest code hence closing this ticket.