Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenShift: Web server on different IP #779

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

Akrog
Copy link
Contributor

@Akrog Akrog commented Jan 30, 2025

When serving ISO images for baremetal machines on the OpenShift cluster
deployment we were assuming that these were always served on the
default network interface, and that's the IP address that was
configured on the BMC of the baremetal server.

This only works if we are running kcli on the same network as the
servers, but that's not the case when we access them through a VPN.

In this patch we add a new configuration option named
baremetal_web_nic that allows us to specify the network interface we
want to use to serve the ISO.

The default value will be default, to maintain backward compatibility,
but for example we could set it to tun0 when using the VPN to access
the machines to be provisioned.

Akrog added 2 commits January 29, 2025 18:00
If we use a self signed `bmc_url` the code fails with a bad error:

```
  File "/usr/lib/python3.13/site-packages/kvirt/kfish/__init__.py", line 54, in get_info
    error(f"Hit issue {e.msg} when accessing url {chassis_url}")
                       ^^^^^
AttributeError: 'URLError' object has no attribute 'msg'
```

The actual error is

```
URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1020)'))
```

This patch adds a generic mechanism to print a text version of the error
when thee `msg` attribute is not present in the exception.
When serving ISO images for baremetal machines on the OpenShift cluster
deployment we were assuming that these were always served on the
`default` network interface, and that's the IP address that was
configured on the BMC of the baremetal server.

This only works if we are running kcli on the same network as the
servers, but that's not the case when we access them through a VPN.

In this patch we add a new configuration option named
`baremetal_web_nic` that allows us to specify the network interface we
want to use to serve the ISO.

The default value will be `default`, to maintain backward compatibility,
but for example we could set it to `tun0` when using the VPN to access
the machines to be provisioned.
@karmab karmab force-pushed the main branch 3 times, most recently from 7b3f421 to b87ce13 Compare January 30, 2025 13:58
@karmab karmab merged commit 86797a7 into karmab:main Jan 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants