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

[SPLAT-1074] vSphere add template field and workflow #41996

Merged

Conversation

WenXinWei
Copy link
Contributor

add step to config template in install-config.yaml and add workflow for enable template filed in installation.

@openshift-ci openshift-ci bot requested review from deepsm007 and jhou1 August 4, 2023 05:04
@WenXinWei
Copy link
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14

@WenXinWei WenXinWei force-pushed the add_template_field branch 4 times, most recently from 738f1a5 to 15bffa2 Compare August 4, 2023 08:49
@WenXinWei
Copy link
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14

@WenXinWei WenXinWei force-pushed the add_template_field branch 3 times, most recently from 9b3c6ab to 39865ef Compare August 4, 2023 13:01
@WenXinWei
Copy link
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14

@WenXinWei
Copy link
Contributor Author

@jianlinliu @gpei @jinyunma please help review the pr when you have time.

selected_hw_version_index=$((RANDOM % ${hw_available_versions}))
target_hw_version=${hw_versions[$selected_hw_version_index]}
echo "$(date -u --rfc-3339=seconds) - Selected hardware version ${target_hw_version}"
vm_template=${vm_template}-hw${target_hw_version}
Copy link
Contributor

Choose a reason for hiding this comment

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

We do not need to upload this vm template?

Copy link
Contributor Author

@WenXinWei WenXinWei Aug 10, 2023

Choose a reason for hiding this comment

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

if no target_hw_version is set, the default hw_version is 15.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was talking about I did not see any commands to upload the target vm template.

Copy link
Contributor

Choose a reason for hiding this comment

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

reuse the step upi-conf-vsphere-ova to upload target vm template

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, good to know.

Z_VERSION=$(echo ${VERSION} | cut -d'.' -f2)
if [ ${Z_VERSION} -gt 13 ]; then
cat >> "${ENABLE_TEMPLATE}" << EOF
failureDomains:
Copy link
Contributor

Choose a reason for hiding this comment

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

Seem like this change has a big difference with https://github.com/openshift/release/pull/41672/files, does this work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I have triggered a job and check the installation log. when reuse the exists rhcos, will not download image from remote.

Copy link
Contributor

Choose a reason for hiding this comment

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

In your previous PR, you mentioned this feature is for zonal IPI install - ipi-conf-vsphere-zones, per your current logic, seem like the following setting is only working for vsphere-connected, right?

Copy link
Contributor Author

@WenXinWei WenXinWei Aug 10, 2023

Choose a reason for hiding this comment

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

previous i saw this field is under failureDomains, I thought it's a zonal field as i saw the doc said the failure domain establishes the relationships between a region and zone. actually it should be a common feature.
now i add a step to update the install-config to support adding template. we can also add it into vsphere-discon workflow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know.

@@ -0,0 +1,15 @@
{
"path": "cucushift/installer/rehearse/vsphere/ipi/template-enable/provision/cucushift-installer-rehearse-vsphere-ipi-template-enable-provision-chain.yaml",
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest to rename template-enable to template

installer_bin=$(which openshift-install)
ova_url=$("${installer_bin}" coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.vmware.formats.ova.disk.location')
echo "${ova_url}" > "${SHARED_DIR}"/ova_url.txt
vm_template="${ova_url##*/}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to introduce a ENV var - RHCOS_VM_TEMPLATE, its default value is empty, so that we can allow users to override a specific image, when RHCOS_VM_TEMPLATE is empty, but this step is referenced in a workflow, then we can use the above logic to get a default ova vm template path.

Copy link
Contributor Author

@WenXinWei WenXinWei Aug 11, 2023

Choose a reason for hiding this comment

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

code update done, do we also add a workflow for vsphere-discon?

Copy link
Contributor

Choose a reason for hiding this comment

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

From my understanding, it makes no differences for template feature in vsphere connected and disconnected segment.

@WenXinWei WenXinWei force-pushed the add_template_field branch 3 times, most recently from 08788fe to 783b937 Compare August 10, 2023 14:25
@WenXinWei
Copy link
Contributor Author

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-f14

vm_template=${vm_template}-hw${target_hw_version}

ENABLE_TEMPLATE="${SHARED_DIR}"/enable_template_content.txt
VERSION=$(echo "${JOB_NAME}" | grep -o -E '4\.[0-9]+')
Copy link
Contributor

@jinyunma jinyunma Aug 11, 2023

Choose a reason for hiding this comment

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

Above two lines need to be moved out of if block? otherwise, it has issues when defining env RHCOS_VM_TEMPLATE explicitly.

Copy link
Contributor

Choose a reason for hiding this comment

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

agree.

Copy link
Contributor

Choose a reason for hiding this comment

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

btw, @jinyunma for vsphere jobs, always using JOB_NAME to determinate the cluster version?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the job is added into upgrade ci, I think it would have some problem.
E.g:

$ JOB_NAME="periodic-ci-openshift-openshift-tests-private-release-4.12-amd64-nightly-4.12-upgrade-from-stable-4.12-aws-ipi-network-mtu-localzone-sdn-p2-f28"
$ VERSION=$(echo "${JOB_NAME}" | grep -o -E '4\.[0-9]+')
$ echo $VERSION
4.12 4.12 4.12

Copy link
Contributor

Choose a reason for hiding this comment

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

good point, only searched relevant code in step ipi-conf-vsphere, and this part is indeed executed failed in upgrade job

2023-08-09 21:52:03+00:00 - sourcing context from vsphere_context.sh...
/bin/bash: line 39: [: too many arguments
2023-08-09 21:52:03+00:00 - unable to determine y stream, assuming this is master
2023-08-09 21:52:03+00:00 - 4.x installation is later than 4.9, will install with resource pool
2023-08-09 21:52:03+00:00 - pull-through cache force disabled

It is not safe to use this way to get version, might change to another way, e.g from release image.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think so.

if [ ! -z ${VERSION} ]; then
Z_VERSION=$(echo ${VERSION} | cut -d'.' -f2)
if [ ${Z_VERSION} -gt 13 ]; then
cat >> "${ENABLE_TEMPLATE}" << EOF
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to directly use "${SHARED_DIR}"/enable_template_content.txt to replace ${ENABLE_TEMPLATE}


MACHINE_POOL_OVERRIDES=""
RESOURCE_POOL_DEF=""
set +o errexit
VERSION=$(echo "${JOB_NAME}" | grep -o -E '4\.[0-9]+')
release="${installer_bin}" coreos print-stream-json |jq -r '.architectures.x86_64.artifacts.vmware.release'
VERSION="${release:1:2}"
Copy link
Contributor

Choose a reason for hiding this comment

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

set -o errexit

Z_VERSION=1000
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest to keep the original var.

@openshift-ci-robot
Copy link
Contributor

@WenXinWei, pj-rehearse: failed to create rehearsal jobs ERROR:

failed to ensure imagestreamtags in cluster vsphere: failed waiting for imagestreamtag cnv/4.15:cnv-ci-src-upgrade to appear: timed out waiting for the condition

If the problem persists, please contact Test Platform.

@openshift-ci-robot
Copy link
Contributor

@WenXinWei: job(s): periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14 either don't exist or were not found to be affected, and cannot be rehearsed

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@WenXinWei: job(s): periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14 either don't exist or were not found to be affected, and cannot be rehearsed

@openshift-ci-robot
Copy link
Contributor

@WenXinWei, pj-rehearse: failed to create rehearsal jobs ERROR:

failed to ensure imagestreamtags in cluster vsphere: failed waiting for imagestreamtag cnv/4.15:cnv-ci-src to appear: timed out waiting for the condition

If the problem persists, please contact Test Platform.

@WenXinWei
Copy link
Contributor Author

/pj-rehearse

@WenXinWei
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@WenXinWei, pj-rehearse: failed to create rehearsal jobs ERROR:

failed to ensure imagestreamtags in cluster vsphere: failed waiting for imagestreamtag cnv/4.15:cnv-ci-src to appear: timed out waiting for the condition

If the problem persists, please contact Test Platform.

@openshift-ci-robot
Copy link
Contributor

@WenXinWei, pj-rehearse: failed to create rehearsal jobs ERROR:

failed to ensure imagestreamtags in cluster vsphere: failed waiting for imagestreamtag cnv/4.15:cnv-ci-src-upgrade to appear: timed out waiting for the condition

If the problem persists, please contact Test Platform.

@WenXinWei
Copy link
Contributor Author

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@WenXinWei: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-vmware-vsphere-csi-driver-master-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.15-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.14-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.13-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.12-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.11-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.10-e2e-vsphere openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-master-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.15-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.14-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.13-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.12-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.11-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.10-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.12-e2e-vsphere-csi-migration openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.11-e2e-vsphere-csi-migration openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.10-e2e-vsphere-csi-migration openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.9-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.8-e2e-vsphere-csi openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-master-e2e-vsphere-ovn-upgrade openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.15-e2e-vsphere-ovn-upgrade openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-vmware-vsphere-csi-driver-release-4.14-e2e-vsphere-ovn-upgrade openshift/vmware-vsphere-csi-driver presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-master-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.15-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.14-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.13-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.12-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.11-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.10-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.9-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.8-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-cluster-api-actuator-pkg-release-4.7-e2e-vsphere-operator openshift/cluster-api-actuator-pkg presubmit Registry content changed
pull-ci-openshift-okd-machine-os-master-e2e-vsphere openshift/okd-machine-os presubmit Registry content changed
pull-ci-openshift-okd-machine-os-release-4.15-e2e-vsphere openshift/okd-machine-os presubmit Registry content changed
pull-ci-openshift-okd-machine-os-release-4.14-e2e-vsphere openshift/okd-machine-os presubmit Registry content changed

A total of 580 jobs have been affected by this change. The above listing is non-exhaustive and limited to 35 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 10 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 20 rehearsals
Comment: /pj-rehearse max to run up to 35 rehearsals
Comment: /pj-rehearse auto-ack to run up to 10 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse abort to abort all active rehearsals

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@jianlinliu
Copy link
Contributor

@sgaoshang @WenXinWei do you know why "govc: Post "https://vcenter.devqe.ibmc.devcluster.openshift.com/sdk": dial tcp: lookup vcenter.devqe.ibmc.devcluster.openshift.com on 172.30.0.10:53: server misbehaving" always happened.

@jianlinliu
Copy link
Contributor

/pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-f14

@WenXinWei
Copy link
Contributor Author

WenXinWei commented Aug 14, 2023

@sgaoshang @WenXinWei do you know why "govc: Post "https://vcenter.devqe.ibmc.devcluster.openshift.com/sdk": dial tcp: lookup vcenter.devqe.ibmc.devcluster.openshift.com on 172.30.0.10:53: server misbehaving" always happened.

not sure, i tried the govc command on my local. it works well.
also find another job have same issue at same time. suspect it should be a flake or platform Instablity

@jianlinliu
Copy link
Contributor

all the failed jobs are because e2e testing, so the PR is ready to merge.

@jianlinliu
Copy link
Contributor

/pj-rehearse ack

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Aug 15, 2023
@jianlinliu
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2023
@jianlinliu
Copy link
Contributor

cc @liangxia to review.

@liangxia
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jianlinliu, liangxia, WenXinWei

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 15, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 15, 2023

@WenXinWei: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14 39865ef28f958f560ac2f7ecdb6e819301f9a9a0 link unknown /pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-enable-f14
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-f14 59d4ba3 link unknown /pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.14-amd64-nightly-vsphere-ipi-template-f14
ci/rehearse/openshift/cluster-image-registry-operator/release-4.15/e2e-vsphere-operator 59d4ba3 link unknown /pj-rehearse pull-ci-openshift-cluster-image-registry-operator-release-4.15-e2e-vsphere-operator
ci/rehearse/periodic-ci-openshift-cluster-api-actuator-pkg-release-4.13-e2e-vsphere-operator-periodic 59d4ba3 link unknown /pj-rehearse periodic-ci-openshift-cluster-api-actuator-pkg-release-4.13-e2e-vsphere-operator-periodic
ci/rehearse/periodic-ci-openshift-openshift-tests-private-release-4.10-amd64-nightly-4.10-upgrade-from-eus-4.8-vsphere-ipi-f28 59d4ba3 link unknown /pj-rehearse periodic-ci-openshift-openshift-tests-private-release-4.10-amd64-nightly-4.10-upgrade-from-eus-4.8-vsphere-ipi-f28
ci/rehearse/openshift/cluster-image-registry-operator/master/e2e-vsphere-operator 59d4ba3 link unknown /pj-rehearse pull-ci-openshift-cluster-image-registry-operator-master-e2e-vsphere-operator

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 552e3e4 into openshift:master Aug 15, 2023
24 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged
Projects
None yet
6 participants