redhat-performance / badfish

Vendor-agnostic tool for managing bare-metal systems via the Redfish API
https://quads.dev
GNU General Public License v3.0
93 stars 26 forks source link

Badfish problem mixing hardware types #310

Closed sferlin closed 2 years ago

sferlin commented 2 years ago

Your System Details

Describe the bug We are using JetSki to deploy an OCP on Dell (R650) nodes, and we run into some problems (compared to R640). While comparing both, it seems there is an issue with the node being in director mode or not. See below.

To Reproduce / What were you Doing? Steps to reproduce the behavior:

  1. Trying to apply the playbook via: ansible-playbook -i inventory/jetski/hosts playbook-jetski.yml
  2. See error: fatal: [ ]: FAILED! => {"attempts": 5, "changed": true, "cmd": "podman run --rm quay.io/quads/badfish -u quads -p < > -i config/idrac_interfaces.yml -H < > -t director", "delta": "0:00:05.970662", "end": "2022-06-29 11:59:29.726494", "msg": "non-zero return code", "rc": 1, "start": "2022-06-29 11:59:23.755832", "stderr": "- INFO - Job queue for iDRAC < > successfully cleared.\nTraceback (most recent call last):\n File \"/usr/local/bin/badfish\", line 8, in \n sys.exit(main())\n File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 2450, in main\n _host, result = loop.run_until_complete(\n File \"/usr/local/lib/python3.9/asyncio/base_events.py\", line 642, in run_until_complete\n return future.result()\n File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 2115, in execute_badfish\n await badfish.change_boot(host_type, interfaces_path, pxe)\n File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 767, in change_boot\n await self.create_bios_config_job(self.bios_uri)\n File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 981, in create_bios_config_job\n return await self.create_job(_url, _payload, _headers)\n File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 971, in createjob\n result = re.search(\"JID.+?\", raw).group()\nAttributeError: 'NoneType' object has no attribute 'group'", "stderr_lines": ["- INFO - Job queue for iDRAC < > successfully cleared.", "Traceback (most recent call last):", " File \"/usr/local/bin/badfish\", line 8, in ", " sys.exit(main())", " File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 2450, in main", " _host, result = loop.run_until_complete(", " File \"/usr/local/lib/python3.9/asyncio/base_events.py\", line 642, in run_until_complete", " return future.result()", " File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 2115, in execute_badfish", " await badfish.change_boot(host_type, interfaces_path, pxe)", " File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 767, in change_boot", " await self.create_bios_config_job(self.bios_uri)", " File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 981, in create_bios_config_job", " return await self.create_job(_url, _payload, _headers)", " File \"/usr/local/lib/python3.9/site-packages/badfish/badfish.py\", line 971, in createjob", " result = re.search(\"JID.+?\", raw).group()", "AttributeError: 'NoneType' object has no attribute 'group'"], "stdout": "", "stdout_lines": []}

Expected Behavior It should be able to set the node and finish applying the playbook.

Logs / Screenshots N.A.

Additional Details Two different outcomes with and without -t director on the same node.

podman run -it --rm --dns < > quay.io/quads/badfish -u quads -p < > -i config/idrac_interfaces.yml -H < > --check-boot

podman run -it --rm --dns < > quay.io/quads/badfish -u quads -p < > -i config/idrac_interfaces.yml -H < > -t director

sferlin commented 2 years ago

@grafuls merged a fix for this.

sadsfae commented 2 years ago

Thanks for filing this, marking as resolved. If you run into any more issues just reply back here.