Skip to content

OCPEDGE-1825: [TNF] Reworked TNF logic to render fencing block conditionally. #1751

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
17 changes: 16 additions & 1 deletion utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ EOF
}

function node_map_to_install_config_fencing_credentials() {
TNF_ENABLED_RELEASE=4.19

# If we didn't support TNF in this release, we skip rendering the fencing block
if is_lower_version "$(openshift_version "${OCP_DIR}")" "$TNF_ENABLED_RELEASE"; then
return 0
fi

if [[ -z "${ENABLE_ARBITER:-}" ]] && [[ "${NUM_MASTERS}" -eq 2 ]]; then
cat <<EOF
fencing:
Expand All @@ -320,7 +327,15 @@ EOF
address: ${address}
username: ${username}
password: ${password}
sslInsecure: true
EOF
# We don't support overriding certificateVerification in 4.19
if [ $(openshift_version "${OCP_DIR}") == "$TNF_ENABLED_RELEASE" ]; then
continue
fi

certificate_verification=$([ node_val ${idx} "driver_info.disableCertificateVerification" | tr '[:upper:]' '[:lower:]' == "true" ] && echo -n "Disabled" || echo -n "Enabled")
cat <<EOF
certificateVerification: ${certificate_verification}
EOF
done
fi
Expand Down