Skip to content

IPA hasn't the correct ironic IP #567

@t-h2o

Description

@t-h2o

IPA hasn't the correct ironic IP

IPA: Ironic python agent

Context

Ironic will boot the new node with IPA.
IPA will post the data collected to ironic while the inspection step.
The issue is, IPA doen't have the correct IP to send data to Ironic.

How get logs

To get logs, I read the journal from IPA, and catch IPs with this following command.

ssh -t \
bml \
"journalctl -u ironic-python-agent  | grep '192.168.0.150\|192.168.1.7'"

Logs with issue

IPA receive an exception "ConnectTimeout", because it cannot access to BMC's IP of Ironic service

ipa: DEBUG ironic_python_agent.cmd.agent [-] api_url = https://192.168.0.150:6385 log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: DEBUG ironic_python_agent.cmd.agent [-] inspection_callback_url = https://192.168.1.7:5050/v1/continue log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: CRITICAL ironic-python-agent [-] Unhandled error: requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='192.168.1.7', port=5050): Max retries exceeded with url: /v1/continue (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f0f7a3da540>, 'Connection to 192.168.1.7 timed out. (connect timeout=30)'))
ipa: ERROR ironic-python-agent urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f0f7a3da540>, 'Connection to 192.168.1.7 timed out. (connect timeout=30)')
ipa: ERROR ironic-python-agent urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.7', port=5050): Max retries exceeded with url: /v1/continue (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f0f7a3da540>, 'Connection to 192.168.1.7 timed out. (connect timeout=30)'))
ipa: ERROR ironic-python-agent requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='192.168.1.7', port=5050): Max retries exceeded with url: /v1/continue (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f0f7a3da540>, 'Connection to 192.168.1.7 timed out. (connect timeout=30)'))
ipa: DEBUG ironic_python_agent.cmd.agent [-] api_url = https://192.168.0.150:6385 log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: DEBUG ironic_python_agent.cmd.agent [-] inspection_callback_url = https://192.168.1.7:5050/v1/continue log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.1.7:5050/v1/continue

My patch

Update ironic/ironic_bmo.env by replacing “out of band” network IP with IP for the servers.

- IRONIC_EXTERNAL_IP=192.168.1.7
+ IRONIC_EXTERNAL_IP=192.168.0.150

Logs after patch

With these logs, IPA stop trying to send data by the BMC's IP.

ipa: DEBUG ironic_python_agent.cmd.agent [-] api_url = https://192.168.0.150:6385 log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: DEBUG ironic_python_agent.cmd.agent [-] inspection_callback_url = https://192.168.0.150:5050/v1/continue log_opt_values /opt/ironic-python-agent/lib64/python3.12/site-packages/oslo_config/cfg.py:2817
ipa: INFO ironic_python_agent.inspector [-] Posting collected data to https://192.168.0.150:5050/v1/continue
ipa: /opt/ironic-python-agent/lib64/python3.12/site-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.0.150'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
ipa: DEBUG ironic_python_agent.ironic_api_client [-] Looking up node with addresses 'b8:83:03:53:a9:da,b8:83:03:53:a9:db' and UUID 9f3a31a1-1067-46e1-a422-cbd446129871 at ['https://192.168.0.150:6385'] _do_lookup /opt/ironic-python-agent/lib64/python3.12/site-packages/ironic_python_agent/ironic_api_client.py:227
ipa: /opt/ironic-python-agent/lib64/python3.12/site-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.0.150'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
ipa: /opt/ironic-python-agent/lib64/python3.12/site-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning: Unverified HTTPS request is being made to host '192.168.0.150'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/acceptedIndicates an issue is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions