ibm-spectrum-scale-install-infra
ibm-spectrum-scale-install-infra copied to clipboard
explore error message suppression and only output 'mm' command failures
Looking to improve error messaging usability and problem determination by suppressing extra error messages and only posting the 'mm' command output.
Example in current Ansible run:
changed: [node-vm1] => (item={'diff': [], 'dest': '/var/tmp/StanzaFile.new.gpfs300', 'src': '/root/.ansible/tmp/ansible-tmp-1585001588.5356421-65289086087216/source', 'md5sum': '25534cf1001db2ac025b49d2c05a1332', 'checksum': 'bb2265de9b4dc8d6abbceadf832aea081427a9dd', 'changed': True, 'uid': 0, 'gid': 0, 'owner': 'root', 'group': 'root', 'mode': '0644', 'state': 'file', 'secontext': 'unconfined_u:object_r:admin_home_t:s0', 'size': 262, 'invocation': {'module_args': {'src': '/root/.ansible/tmp/ansible-tmp-1585001588.5356421-65289086087216/source', 'dest': '/var/tmp/StanzaFile.new.gpfs300', 'mode': None, 'follow': False, '_original_basename': 'StanzaFile.j2', 'checksum': 'bb2265de9b4dc8d6abbceadf832aea081427a9dd', 'backup': False, 'force': True, 'content': None, 'validate': None, 'directory_mode': None, 'remote_src': None, 'local_follow': None, 'owner': None, 'group': None, 'seuser': None, 'serole': None, 'selevel': None, 'setype': None, 'attributes': None, 'regexp': None, 'delimiter': None, 'unsafe_writes': None}}, 'failed': False, 'item': 'gpfs300', 'ansible_loop_var': 'item'})
failed: [node-vm1] (item={'diff': {'before': {'path': '/var/tmp/StanzaFile.new.gpfs2000'}, 'after': {'path': '/var/tmp/StanzaFile.new.gpfs2000'}}, 'path': '/var/tmp/StanzaFile.new.gpfs2000', 'changed': False, 'uid': 0, 'gid': 0, 'owner': 'root', 'group': 'root', 'mode': '0644', 'state': 'file', 'secontext': 'unconfined_u:object_r:admin_home_t:s0', 'size': 131, 'invocation': {'module_args': {'mode': None, 'follow': False, 'dest': '/var/tmp/StanzaFile.new.gpfs2000', '_original_basename': 'StanzaFile.j2', 'recurse': False, 'state': 'file', 'path': '/var/tmp/StanzaFile.new.gpfs2000', 'force': False, 'modification_time_format': '%Y%m%d%H%M.%S', 'access_time_format': '%Y%m%d%H%M.%S', '_diff_peek': None, 'src': None, 'modification_time': None, 'access_time': None, 'owner': None, 'group': None, 'seuser': None, 'serole': None, 'selevel': None, 'setype': None, 'attributes': None, 'content': None, 'backup': None, 'remote_src': None, 'regexp': None, 'delimiter': None, 'directory_mode': None, 'unsafe_writes': None}}, 'checksum': '7c5d84d86a6b23e28f29975eccd970850559265d', 'dest': '/var/tmp/StanzaFile.new.gpfs2000', 'failed': False, 'item': 'gpfs2000', 'ansible_loop_var': 'item'}) => {"ansible_loop_var": "item", "changed": true, "cmd": ["/usr/lpp/mmfs/bin/mmcrfs", "gpfs2000", "-F", "/var/tmp/StanzaFile.new.gpfs2000", "-B", "4M", "-m", "2", "-r", "2", "-n", "16", "-A", "yes", "-T", "/ibm/gpfs2000"], "delta": "0:00:02.411239", "end": "2020-03-23 15:13:26.068223", "item": {"ansible_loop_var": "item", "changed": false, "checksum": "7c5d84d86a6b23e28f29975eccd970850559265d", "dest": "/var/tmp/StanzaFile.new.gpfs2000", "diff": {"after": {"path": "/var/tmp/StanzaFile.new.gpfs2000"}, "before": {"path": "/var/tmp/StanzaFile.new.gpfs2000"}}, "failed": false, "gid": 0, "group": "root", "invocation": {"module_args": {"_diff_peek": null, "_original_basename": "StanzaFile.j2", "access_time": null, "access_time_format": "%Y%m%d%H%M.%S", "attributes": null, "backup": null, "content": null, "delimiter": null, "dest": "/var/tmp/StanzaFile.new.gpfs2000", "directory_mode": null, "follow": false, "force": false, "group": null, "mode": null, "modification_time": null, "modification_time_format": "%Y%m%d%H%M.%S", "owner": null, "path": "/var/tmp/StanzaFile.new.gpfs2000", "recurse": false, "regexp": null, "remote_src": null, "selevel": null, "serole": null, "setype": null, "seuser": null, "src": null, "state": "file", "unsafe_writes": null}}, "item": "gpfs2000", "mode": "0644", "owner": "root", "path": "/var/tmp/StanzaFile.new.gpfs2000", "secontext": "unconfined_u:object_r:admin_home_t:s0", "size": 131, "state": "file", "uid": 0}, "msg": "non-zero return code", "rc": 22, "start": "2020-03-23 15:13:23.656984", "stderr": "Incompatible parameters: Unable to create file system.\nChange one or more of the following as suggested and try again:\n increase the number of failure groups\n decrease the value for -r\nmmcrfs: tscrfs failed. Cannot create gpfs2000\nmmcrfs: Command failed. Examine previous error messages to determine cause.", "stderr_lines": ["Incompatible parameters: Unable to create file system.", "Change one or more of the following as suggested and try again:", " increase the number of failure groups", " decrease the value for -r", "mmcrfs: tscrfs failed. Cannot create gpfs2000", "mmcrfs: Command failed. Examine previous error messages to determine cause."], "stdout": "\nThe following disks of gpfs2000 will be formatted on node node-vm2:\n nsd_2001: size 76800 MB\nFormatting file system ...\nDisks up to size 785.99 GB can be added to storage pool system.", "stdout_lines": ["", "The following disks of gpfs2000 will be formatted on node node-vm2:", " nsd_2001: size 76800 MB", "Formatting file system ...", "Disks up to size 785.99 GB can be added to storage pool system."]}NO MORE HOSTS LEFT ****************************************************************************************************************************************PLAY RECAP ************************************************************************************************************************************************
node-vm1 : ok=78 changed=4 unreachable=0 failed=1 skipped=54 rescued=0 ignored=0
node-vm2 : ok=56 changed=0 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0
node-vm3 : ok=56 changed=0 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0
node-vm4 : ok=56 changed=0 unreachable=0 failed=0 skipped=32 rescued=0 ignored=0
Example of what just the 'mm' command failure output would be:
```[root@node-vm1 group_vars]# /usr/lpp/mmfs/bin/mmcrfs gpfs2000 -F /var/tmp/StanzaFile.new.gpfs2000 -B 4M -m 2 -r 2 -n 16 -A yes -T /ibm/gpfs2000The following disks of gpfs2000 will be formatted on node node-vm2:
nsd_2001: size 76800 MB
Formatting file system ...
Disks up to size 785.99 GB can be added to storage pool system.
Incompatible parameters: Unable to create file system.
Change one or more of the following as suggested and try again:
increase the number of failure groups
decrease the value for -r
mmcrfs: tscrfs failed. Cannot create gpfs2000
mmcrfs: Command failed. Examine previous error messages to determine cause.