Skip to content
Closed
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
129 changes: 129 additions & 0 deletions ci-operator/config/openshift/hive/openshift-hive-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ images:
dockerfile_path: Dockerfile
from: ubi9-minimal-entitled
to: hive
- dockerfile_literal: |
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 as builder
RUN mkdir -p /go/src/github.com/openshift/hive
WORKDIR /go/src/github.com/openshift/hive
RUN git clone --branch fix-ote-init --depth 1 https://github.com/miyadav/hive.git .
RUN make -C test/ote build
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
RUN microdnf install -y gzip jq && microdnf clean all
COPY --from=builder /go/src/github.com/openshift/hive/test/ote/bin/hive /usr/bin/openshift-tests-extension
RUN gzip -f -k /usr/bin/openshift-tests-extension
WORKDIR /tmp
to: hive-tests
skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|PROJECT|LICENSE)$
promotion:
to:
Expand Down Expand Up @@ -291,6 +303,123 @@ tests:
requests:
cpu: 100m
workflow: ipi-openstack
- as: e2e-ote
cluster_claim:
architecture: amd64
as: unused
cloud: aws
labels:
region: us-east-1
owner: openshift-ci
product: ocp
timeout: 1h0m0s
version: "4.20"
skip_if_only_changed: ^(?:docs|\.tekton)/|\.md$|^(?:.*/)?(?:\.gitignore|.coderabbit.yaml|OWNERS|PROJECT|LICENSE)$
steps:
test:
- as: test
cli: latest
commands: |
export AWS_ACCESS_KEY_ID=$(cat /tmp/secret/hiveci-aws-creds/AWS_ACCESS_KEY_ID)
export AWS_SECRET_ACCESS_KEY=$(cat /tmp/secret/hiveci-aws-creds/AWS_SECRET_ACCESS_KEY)
export PULL_SECRET_FILE=/tmp/secret/pull-secret/.dockerconfigjson
export CLUSTER_NAME=$(printf "hiveci-%x-%x" $(date +%s) $PULL_NUMBER)
/usr/bin/openshift-tests-extension run-suite openshift/hive
credentials:
- mount_path: /tmp/secret/hiveci-aws-creds
name: hiveci-aws-creds
namespace: test-credentials
- mount_path: /tmp/secret/pull-secret
name: ci-pull-credentials
namespace: test-credentials
dependencies:
- env: HIVE_IMAGE
name: hive
- env: RELEASE_IMAGE
name: release:latest
from: hive-tests
grace_period: 15m0s
resources:
requests:
cpu: 100m
workflow: generic-claim
- as: e2e-gcp-ote
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As written, this and e2e-azure-ote and e2e-vsphere-ote appear to differ from e2e-ote only in the platform of the hub cluster.

In general for hive we care much less about the platform of the hub -- which technically is allowed to be any k8s and runs almost identically -- and more about that of the spoke, as that informs:

  • A completely different provisioning code path
  • Platform-specific knobs in hive CRDs (primarily ClusterDeployment/ClusterPool & MachinePool) and corresponding behavior.

Is the test suite somehow detecting the cloud provider of the hub and creating spokes accordingly? And also filtering platform-specific test cases?

run_if_changed: gcp
steps:
cluster_profile: openshift-org-gcp
test:
- as: test
cli: latest
commands: |
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
/usr/bin/openshift-tests-extension run-suite openshift/hive
dependencies:
- env: HIVE_IMAGE
name: hive
- env: RELEASE_IMAGE
name: release:latest
from: hive-tests
resources:
requests:
cpu: 100m
workflow: ipi-gcp
- as: e2e-azure-ote
run_if_changed: azure
steps:
cluster_profile: openshift-org-azure
test:
- as: test
cli: latest
commands: |
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt)
/usr/bin/openshift-tests-extension run-suite openshift/hive
dependencies:
- env: HIVE_IMAGE
name: hive
- env: RELEASE_IMAGE
name: release:latest
from: hive-tests
resources:
requests:
cpu: 100m
timeout: 2h30m0s
workflow: ipi-azure
timeout: 4h30m0s
- as: e2e-vsphere-ote
run_if_changed: vsphere
steps:
cluster_profile: vsphere-elastic
env:
NETWORK_TYPE: single-tenant
VSPHERE_ADDITIONAL_CLUSTER: "true"
test:
- as: test
cli: latest
commands: |
export KUBECONFIG="${SHARED_DIR}/kubeconfig"
source $SHARED_DIR/vsphere_context.sh
source $SHARED_DIR/govc.sh
source $SHARED_DIR/additional_cluster.sh

export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME
export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP
export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP
export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt)
export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt)
export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json)

/usr/bin/openshift-tests-extension run-suite openshift/hive
dependencies:
- env: HIVE_IMAGE
name: hive
- env: RELEASE_IMAGE
name: release:latest
from: hive-tests
Comment on lines +396 to +418
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Compare existing e2e-vsphere with e2e-vsphere-ote:"
sed -n '227,263p;375,407p' ci-operator/config/openshift/hive/openshift-hive-master.yaml

echo
echo "Locate the shared vSphere setup scripts referenced by the jobs:"
fd -i 'govc\.sh$|vsphere_context\.sh$|additional_cluster\.sh$' -t f | while read -r f; do
  echo "--- $f ---"
  sed -n '1,200p' "$f"
done

Repository: openshift/release

Length of output: 2427


Restore the vSphere secret mount in e2e-vsphere-ote.

The e2e-vsphere-ote job sources the same vSphere setup scripts (vsphere_context.sh, govc.sh, additional_cluster.sh) as the existing e2e-vsphere job, but it omits the vsphere-ibmcloud-ci credential mount that the working job includes. The govc.sh script requires vSphere credentials for authentication, so this job will fail during the sourcing phase without that secret.

Suggested fix
     - as: test
       cli: latest
       commands: |
         source $SHARED_DIR/vsphere_context.sh
         source $SHARED_DIR/govc.sh
         source $SHARED_DIR/additional_cluster.sh

         export CLUSTER_NAME=$ADDITIONAL_CLUSTER_NAME
         export VSPHERE_API_VIP=$ADDITIONAL_CLUSTER_API_VIP
         export VSPHERE_INGRESS_VIP=$ADDITIONAL_CLUSTER_INGRESS_VIP
         export VSPHERE_MACHINE_NETWORK=$(<"${SHARED_DIR}"/machinecidr.txt)
         export BASE_DOMAIN=$(<"${SHARED_DIR}"/basedomain.txt)
         export VSPHERE_INSTALLER_PLATFORM_SPEC_JSON=$(<"${SHARED_DIR}"/platform.json)

         /usr/bin/openshift-tests-extension run-suite openshift/hive
+      credentials:
+      - mount_path: /var/run/vault/vsphere-ibmcloud-ci
+        name: vsphere-ibmcloud-ci
+        namespace: test-credentials
       dependencies:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci-operator/config/openshift/hive/openshift-hive-master.yaml` around lines
382 - 403, The e2e-vsphere-ote job sources govc.sh/govc-related scripts but is
missing the vSphere credential mount (vsphere-ibmcloud-ci) so govc.sh cannot
authenticate; restore the secret mount by adding the same vsphere credential
dependency/secret used in the working e2e-vsphere job to the e2e-vsphere-ote job
(where the scripts are sourced), ensuring the secret name (vsphere-ibmcloud-ci)
is mounted/available to govc.sh and the sourced scripts.

resources:
requests:
cpu: 100m
workflow: ipi-vsphere
Comment thread
coderabbitai[bot] marked this conversation as resolved.
zz_generated_metadata:
branch: master
org: openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ periodics:
cron: 5 4 * * 4
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/cloud: azure4
ci-operator.openshift.io/cloud-cluster-profile: openshift-org-azure
Expand Down Expand Up @@ -96,11 +99,14 @@ periodics:
cron: 5 4 * * 3
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/cloud: gcp
ci-operator.openshift.io/cloud-cluster-profile: openshift-org-gcp
Expand Down Expand Up @@ -188,11 +194,14 @@ periodics:
cron: 10 23 * * 0
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/cloud: openstack-vexxhost
ci-operator.openshift.io/cloud-cluster-profile: openstack-vexxhost
Expand Down Expand Up @@ -281,11 +290,14 @@ periodics:
cron: 5 4 * * 2
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/variant: periodic
ci.openshift.io/generator: prowgen
Expand Down Expand Up @@ -378,11 +390,14 @@ periodics:
cron: 5 4 * * 5
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/cloud: vsphere
ci-operator.openshift.io/cloud-cluster-profile: vsphere-elastic
Expand Down Expand Up @@ -471,11 +486,14 @@ periodics:
cron: 5 4 * * 1
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
extra_refs:
- base_ref: master
org: openshift
repo: hive
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/variant: periodic
ci.openshift.io/generator: prowgen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ postsubmits:
cluster: build04
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
labels:
ci-operator.openshift.io/is-promotion: "true"
ci.openshift.io/generator: prowgen
Expand Down Expand Up @@ -68,7 +69,8 @@ postsubmits:
cluster: build04
decorate: true
decoration_config:
skip_cloning: true
sparse_checkout_files:
- Dockerfile
labels:
ci.openshift.io/generator: prowgen
job-release: "4.20"
Expand Down
Loading