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

[OCPQE-27882] - [ Staged Rollout ] - Enable OP in ABI static-3-plus-1 jobs #60215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ cp "${INSTALL_DIR}/auth/kubeconfig" "${SHARED_DIR}/"
cp "${INSTALL_DIR}/auth/kubeadmin-password" "${SHARED_DIR}/"
scp "${SSHOPTS[@]}" "${INSTALL_DIR}"/auth/* "root@${AUX_HOST}:/var/builds/${CLUSTER_NAME}/"

# Copy coreos stream file so the observer pod can check if the correct live image was booted
echo -e "\nGenerating coreOS stream file..."

# Creating file straight into $SHARED_DIR is not 100% reliable because of propagation issues (author guessing)
oinst coreos print-stream-json > "${INSTALL_DIR}/coreos-stream.json"
scp "${SSHOPTS[@]}" "${INSTALL_DIR}/coreos-stream.json" "root@${AUX_HOST}:/var/builds/${CLUSTER_NAME}/coreos-stream.json"

proxy="$(<"${CLUSTER_PROFILE_DIR}/proxy")"
# shellcheck disable=SC2154
for bmhost in $(yq e -o=j -I=0 '.[]' "${SHARED_DIR}/hosts.yaml"); do
Expand All @@ -256,6 +263,9 @@ echo "Launching 'wait-for bootstrap-complete' installation step....."
http_proxy="${proxy}" https_proxy="${proxy}" HTTP_PROXY="${proxy}" HTTPS_PROXY="${proxy}" \
oinst agent wait-for bootstrap-complete 2>&1 &
if ! wait $!; then
# Used by observer pod
touch "${SHARED_DIR}/failure"
# TODO: gather logs??
echo "ERROR: Bootstrap failed. Aborting execution."
exit 1
fi
Expand All @@ -266,9 +276,16 @@ http_proxy="${proxy}" https_proxy="${proxy}" HTTP_PROXY="${proxy}" HTTPS_PROXY="
oinst agent wait-for install-complete &
if ! wait "$!"; then
echo "ERROR: Installation failed. Aborting execution."
# Used by observer pod
touch "${SHARED_DIR}/failure"
# TODO: gather logs??
exit 1
fi

# Used by observer pod
touch "${SHARED_DIR}/success"

echo "Ensure that all the cluster operators remain stable and ready until OCPBUGS-18658 is fixed."
oc adm wait-for-stable-cluster --minimum-stable-period=1m --timeout=15m
update_image_registry

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ workflow:
- chain: baremetal-lab-agent-install
post:
- chain: baremetal-lab-post
observers:
enable:
- observers-ocp-baremetal-qe
env:
ipv4_enabled: "true"
ipv6_enabled: "false"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ timeout -s 9 10m ssh "${SSHOPTS[@]}" "root@${AUX_HOST}" bash -s -- \
INTERNAL_NET_CIDR="${1}"
IP_ARRAY="${@:2}"
for ip in $IP_ARRAY; do
iptables -D FORWARD -s ${ip} ! -d "${INTERNAL_NET_CIDR}" -j DROP
iptables -D FORWARD -s ${ip} ! -d "${INTERNAL_NET_CIDR}" ! -p tcp --dport 22 -j DROP
done
EOF
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ timeout -s 9 10m ssh "${SSHOPTS[@]}" "root@${AUX_HOST}" bash -s -- \
IP_ARRAY="${@:2}"
for ip in $IP_ARRAY; do
# TODO: change to firewalld or nftables
iptables -A FORWARD -s ${ip} ! -d "${INTERNAL_NET_CIDR}" -j DROP
# Allow connections on port 22 used by observer pod
iptables -A FORWARD -s ${ip} ! -d "${INTERNAL_NET_CIDR}" ! -p tcp --dport 22 -j DROP
done
EOF

Expand Down
10 changes: 10 additions & 0 deletions ci-operator/step-registry/observers/ocp-baremetal-qe/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
approvers:
- aleskandro
- pamoedom
- bmanzari
reviewers:
- aleskandro
- jadhaj
- bmanzari
- pamoedom
- sgoveas
Loading