badfish run inside podman within VM cannot resolve iDRAC hostname
bengland2 opened this issue · 3 comments
Your System Details
Fedora 31 laptop, Centos 8.2 VM, podman podman-1.6.4-10. , docker.io/quads/badfish
-
Python Version: whatever is in docker.io/quads/badfish
-
Operating System: RHEL8.2
-
Target System Type: Dell 740xd BIOS 2.8.1
-
IPMI / Out-of-band Firmware Version: (_e.g. iDRAC 9 4.22.00.00)
Describe the bug
badfish run from within podman from within a VM on my laptop cannot talk to the iDRAC, but badfish run direct from the VM can.
Why am I doing this? I'm running from a VM because JetSki is having problems with python versions when run direct from my laptop (separate issue). I worked around it by creating a Centos 8 VM on my laptop and then giving it a route to the outside world through my laptop, copying /etc/resolv.conf from the laptop to the VM. However, then JetSki run from inside the VM attempts to run badfish in a container and gets this error.
To Reproduce / What were you Doing?
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected Behavior
badfish run from inside the container should have same behavior as badfish run outside a container on the same host.
Logs / Screenshots
If applicable, add logs or screenshots to help explain your problem.
Additional Details
[root@localhost JetSki]# podman run -it --rm
docker.io/quads/badfish -vv -u quads -p password -i config/idrac_interfaces.yml
-H mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com --check-boot
- DEBUG - Cannot connect to host mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com:443 ssl:False [Name does not resolve]
- ERROR - Failed to communicate with server.
- DEBUG -
- ERROR - There was something wrong executing Badfish.
the same command WORKS when a /etc/hosts entry was added:
[root@localhost JetSki]# podman run -it --rm
--add-host=mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com:10.19.96.137
docker.io/quads/badfish -vv -u quads -p password -i config/idrac_interfaces.yml
-H mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com --check-boot
- DEBUG - Systems service: /redfish/v1/Systems/System.Embedded.1.
- DEBUG - Managers service: /redfish/v1/Managers/iDRAC.Embedded.1.
- DEBUG - Getting bios boot mode.
- WARNING - Current boot order does not match any of the given.
- INFO - Current boot order:
- INFO - 1: NIC.Integrated.1-1-1
-...
[root@localhost JetSki]# ~/badfish/src/badfish/badfish.py -u quads -p password -i ~/badfish/config/idrac_interfaces.yml -H mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com --check-boot
- WARNING - Current boot order does not match any of the given.
- INFO - Current boot order:
- INFO - 1: NIC.Integrated.1-1-1
...
Hi @bengland2,
Thanks for this input.
As per [1] you need to pass --dns
to podman if you are connected to VPN.
"If you are running quads against a host inside a VPN you must specify your VPN DNS server ip address with --dns"
Try this and let me know if it resolves the issue so we can go ahead and close this one.
[1] https://github.com/redhat-performance/badfish#usage-via-docker
You were right. I don't understand why the /etc/resolv.conf on the host was inadequate, but this definitely worked.
[root@localhost ~]# podman run -it --dns=10.5.30.160 --rm docker.io/quads/badfish -u quads -p bos@184 -i config/idrac_interfaces.yml -H mgmt-e25-h25-740xd.alias.bos.scalelab.redhat.com --check-boot
- WARNING - Current boot order does not match any of the given.
- INFO - Current boot order:
- INFO - 1: NIC.Integrated.1-1-1
[root@localhost ~]# more /etc/resolv.conf
# Generated by NetworkManager
search perf.lab.eng.bos.redhat.com alias.bos.scalelab.redhat.com rdu2.scalelab.redhat.com lan1
nameserver 10.11.5.19
nameserver 10.5.30.160
nameserver 192.168.1.1
So then JetSki has to be able to pass --dns if we want to run it this way.
another solution for Fedora 33 is:
podman run -v /etc/resolv.conf:/etc/resolv.conf
``
and edit in the red hat DNS server as the first server in the list (ughh).