Skip to content
Merged
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
4 changes: 2 additions & 2 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function create_cluster() {

find assets/generated -name '*.yaml' -exec cp -f {} ${assets_dir}/openshift \;

if [[ "${IP_STACK}" == "v4v6" && "$OPENSHIFT_VERSION" =~ 4.[67] ]]; then
if [[ "${IP_STACK}" == "v4v6" && "$(openshift_version $OCP_DIR)" =~ 4.[67] ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good catch, I wonder if we can either remove OPENSHIFT_VERSION, or make it local to the places it's really needed (only the oc download IIRC, everywhere else we should use the release-derived version since #1146)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hardys

I'll check the other places as well, if it does not need dramatic changes, I can add it to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed OPENSHIFT_VERSION usage only

if [[ -z "$OPENSHIFT_VERSION" ]]; then
remained.

# The IPv6DualStack feature is not on by default in 4.6 and 4.7 and needs
# to be manually enabled
cp assets/ipv6-dual-stack-no-upgrade.yaml ${assets_dir}/openshift/.
Expand Down Expand Up @@ -302,7 +302,7 @@ function generate_metal3_config {
mkdir -p ${OCP_DIR}/deploy
go get github.com/apparentlymart/go-cidr/cidr github.com/openshift/installer/pkg/ipnet

if [[ "$OPENSHIFT_VERSION" == "4.3" ]]; then
if [[ "$(openshift_version $OCP_DIR)" == "4.3" ]]; then
go run metal3-templater.go noauth -template-file=metal3-config.yaml.template -provisioning-interface="$CLUSTER_PRO_IF" -provisioning-network="$PROVISIONING_NETWORK" -image-url="$MACHINE_OS_IMAGE_URL" -bootstrap-ip="$BOOTSTRAP_PROVISIONING_IP" -cluster-ip="$CLUSTER_PROVISIONING_IP" > ${OCP_DIR}/deploy/metal3-config.yaml
cp ${OCP_DIR}/deploy/metal3-config.yaml assets/generated/98_metal3-config.yaml
else
Expand Down