Skip to content

Commit 46dccb7

Browse files
authored
OCPBUGS-36506: Fix config for disconnected cluster (#1707)
Ensure all but BMC traffic goes via the proxy
1 parent 090fd10 commit 46dccb7

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

02_configure_host.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ if [[ ! -z "${INSTALLER_PROXY}" ]]; then
111111
--volume ${WORKING_DIR}/squid.conf:/etc/squid/squid.conf \
112112
--name ds-squid \
113113
--dns 127.0.0.1 \
114+
--add-host=virthost.ostest.test.metalkube.org:$PROVISIONING_HOST_EXTERNAL_IP \
114115
quay.io/sameersbn/squid:latest
115116
fi
116117

06_create_cluster.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ if [[ ! -z "$INSTALLER_PROXY" ]]; then
1717
export HTTP_PROXY=${HTTP_PROXY}
1818
export HTTPS_PROXY=${HTTPS_PROXY}
1919
export NO_PROXY=${NO_PROXY}
20+
# Update libvirt firewalld policy to allow the VM to connect to the proxy
21+
sudo firewall-cmd --policy=libvirt-to-host --add-port=$INSTALLER_PROXY_PORT/tcp
22+
# Allow ironic to talk directly to the virt BMC's without proxy
23+
sudo firewall-cmd --policy=libvirt-to-host --add-port=8000/tcp
24+
sudo firewall-cmd --policy=libvirt-to-host --add-port=6230-6240/udp
25+
# And NFS if used
26+
if [ "${PERSISTENT_IMAGEREG}" == true ] ; then
27+
sudo firewall-cmd --policy=libvirt-to-host --add-port=2049/tcp
28+
fi
2029
fi
2130

2231
# Call openshift-installer to deploy the bootstrap node and masters

network.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ if [[ ! -z "${INSTALLER_PROXY:-}" ]]; then
204204

205205
# When a local registry is enabled (usually in disconnected environments), let's add it to the no proxy list
206206
if [[ ! -z "${MIRROR_IMAGES}" && "${MIRROR_IMAGES,,}" != "false" ]] || [[ ! -z "${ENABLE_LOCAL_REGISTRY}" ]]; then
207-
NO_PROXY=$NO_PROXY,$LOCAL_REGISTRY_DNS_NAME
207+
# If INSTALLER_PROXY has been set, all traffic must go via the proxy (the bm network has no access)
208+
if [[ ${INSTALLER_PROXY:-false} == "false" ]]; then
209+
NO_PROXY=$NO_PROXY,$LOCAL_REGISTRY_DNS_NAME
210+
fi
208211
fi
209212
fi
210213

0 commit comments

Comments
 (0)