Closed sbeyermann closed 11 months ago
@sbeyermann, thanks for submitting the issue. We are analyzing this one and accordingly pick it up for a fix in future release.
@sbeyermann Can you please help me verifying a changes. Please replace the code in ome.py from line 106 - 114 with the below code.
host_ipaddress = ipaddress.ip_address(self.hostname)
if host_ipaddress.version == 6:
self.hostname = "[{0}]".format(self.hostname)
Attached the file for a reference. ome.zip
@sachin-apa Thank you for picking up this issue. I replaced the original dellemc.openmanage 8.2.0's ome.py
with the file you provided. Unfortunately this results in the following error:
The full traceback is:
File "/tmp/ansible_dellemc.openmanage.ome_device_info_payload_68lqup6r/ansible_dellemc.openmanage.ome_device_info_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/ome_device_info.py", line 389, in main
File "/tmp/ansible_dellemc.openmanage.ome_device_info_payload_68lqup6r/ansible_dellemc.openmanage.ome_device_info_payload.zip/ansible_collections/dellemc/openmanage/plugins/module_utils/ome.py", line 107, in __init__
host_ipaddress = ipaddress.ip_address(self.hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ipaddress.py", line 54, in ip_address
raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
fatal: [somehost.company.com -> localhost]: FAILED! => changed=false
invocation:
module_args:
ca_path: /etc/ssl/certs/ca-certificates.crt
fact_subset: basic_inventory
hostname: ome.company.com
password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
port: 443
system_query_options:
device_id: null
device_service_tag: null
filter: DeviceName eq 'somehost.company.com'
inventory_type: null
timeout: 30
username: admin@company.com
validate_certs: false
msg: '''ome.company.com'' does not appear to be an IPv4 or IPv6 address'
Bug Description
In our environment we need to use a proxy to access public internet resources. Our Dell OpenManage Enterprise installation however can be reached directly and not via the proxy server. Therefore on our machines we have the
http_proxy
,HTTP_PROXY
,https_proxy
,HTTPS_PROXY
,no_proxy
andNO_PROXY
environment variables defined.http_proxy
,HTTP_PROXY
,https_proxy
andHTTPS_PROXY
point to our proxy server whileno_proxy
andNO_PROXY
contains proxy bypass exceptions for internal resources in the format.company.com
With
dellemc.openmanage
modules 8.0.0 and 8.1.0 this worked fine and our ansible host was able to communicate with our Dell OpenManage Enterprise installation. Unfortunately withdellemc.openmanage
8.2.0 we receive the following error message:<urlopen error _ssl.c:975: The handshake operation timed out>
I did some troubleshooting and for me it looks like the
ome.py
in version 8.2.0 does a DNS lookup of the URL first and then connects to the IP address of the Dell OpenManage installation instead of the DNS FQDN. Therefore our proxy bypass exceptions do not match anymore and thedellemc.openmanage
tries to contact our OME through our proxy which fails.As a workaround I added the IP address of our OME installation to the NO_PROXY environment variable as well and afterwards
dellemc.openmanage
is able to contact OME again.Component or Module Name
dellemc.openmanage.ome_device_info
Ansible Version
Ansible core 2.15.4
Python Version
Pyhton 3.11.2
iDRAC/OME/OME-M version
OME 3.10.2 dellemc.openmanage 8.2.0
Operating System
Debian 11
Playbook Used
Logs
Steps to Reproduce
no_proxy
orNO_PROXY
environment variables, e.g..company.com
Expected Behavior
Connections to the domain name of the OME installation will honor proxy bypass exceptions and be created directly (as in
dellemc.openmanage
8.0.0
or8.1.0
Actual Behavior
dellemc.openmanage
8.2.0
tries to access the OME system through proxy because IP addresses proxy bypass exceptions are not set inno_proxy
orNO_PROXY
environment variablesScreenshots
No response
Additional Information
No response