Skip to content

Conversation

dlom
Copy link
Contributor

@dlom dlom commented Aug 11, 2025

xref: HIVE-2391

This PR is a re-do of #2541

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 11, 2025

@dlom: This pull request references HIVE-2391 which is a valid jira issue.

In response to this:

xref: HIVE-2391

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2025
@openshift-ci openshift-ci bot requested review from 2uasimojo and jstuever August 11, 2025 19:10
Copy link
Contributor

openshift-ci bot commented Aug 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlom

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 11, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 11, 2025

@dlom: This pull request references HIVE-2391 which is a valid jira issue.

In response to this:

xref: HIVE-2391

This PR is a re-do of #2541

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 openshift-eng/jira-lifecycle-plugin repository.

@dlom
Copy link
Contributor Author

dlom commented Aug 11, 2025

xref: HIVE-2396

Copy link

codecov bot commented Aug 11, 2025

Codecov Report

❌ Patch coverage is 30.85106% with 130 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.27%. Comparing base (5a3b603) to head (981416a).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...om/openshift/hive/apis/hive/v1/vsphere/platform.go 0.00% 47 Missing ⚠️
pkg/clusterresource/vsphere.go 59.42% 28 Missing ⚠️
contrib/pkg/createcluster/create.go 0.00% 10 Missing ⚠️
.../clusterdeployment/clusterdeployment_controller.go 0.00% 9 Missing and 1 partial ⚠️
pkg/controller/utils/credentials.go 0.00% 9 Missing ⚠️
contrib/pkg/deprovision/vsphere.go 0.00% 8 Missing ⚠️
.../v1/clusterdeployment_validating_admission_hook.go 36.36% 5 Missing and 2 partials ⚠️
pkg/install/generate.go 0.00% 6 Missing ⚠️
...g/controller/clusterpool/clusterpool_controller.go 0.00% 3 Missing ⚠️
pkg/controller/machinepool/vsphereactuator.go 84.61% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2731      +/-   ##
==========================================
- Coverage   50.33%   50.27%   -0.07%     
==========================================
  Files         284      285       +1     
  Lines       33954    34000      +46     
==========================================
+ Hits        17092    17093       +1     
- Misses      15517    15564      +47     
+ Partials     1345     1343       -2     
Files with missing lines Coverage Δ
...s/hive/v1/clusterpool_validating_admission_hook.go 80.85% <100.00%> (ø)
...hift/hive/apis/hive/v1/clusterdeprovision_types.go 0.00% <ø> (ø)
pkg/controller/machinepool/vsphereactuator.go 70.90% <84.61%> (-2.66%) ⬇️
...g/controller/clusterpool/clusterpool_controller.go 59.27% <0.00%> (+0.22%) ⬆️
pkg/install/generate.go 46.85% <0.00%> (-0.40%) ⬇️
.../v1/clusterdeployment_validating_admission_hook.go 86.92% <36.36%> (-0.11%) ⬇️
contrib/pkg/deprovision/vsphere.go 0.00% <0.00%> (ø)
pkg/controller/utils/credentials.go 0.00% <0.00%> (ø)
contrib/pkg/createcluster/create.go 0.00% <0.00%> (ø)
.../clusterdeployment/clusterdeployment_controller.go 64.59% <0.00%> (-0.34%) ⬇️
... and 2 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

in the vCenter.
description: |-
Datacenter is the name of the datacenter to use in the vCenter.
Deprecated: Please use Platform.VSphere instead
Copy link
Contributor

Choose a reason for hiding this comment

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

The Deprecated fields datacenter, defaultDatastore and vCenter are still defined as required. After hive upgrade, the users still need to configure them even configuring platform.vsphere.vSphere already, which means the transition not done completely.

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've marked all of the deprecated fields as optional, please let me know if the issue persists

Copy link
Contributor

@jianping-shu jianping-shu Sep 11, 2025

Choose a reason for hiding this comment

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

I can see the update in hive.openshift.io_clusterdeployments.yaml now

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 8, 2025
flags.StringVar(&opt.OpenStackIngressFloatingIP, "openstack-ingress-floating-ip", "", "Floating IP address to use for cluster's Ingress service")

// vSphere flags
flags.StringVar(&opt.VSphereVCenter, "vsphere-vcenter", "", "Domain name or IP address of the vCenter")
Copy link
Contributor

Choose a reason for hiding this comment

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

The vsphere parameters are deleted but the vsphere sample for hiveutil create-cluster not updated accoringly, see the "case 3 - hiveutil" part of OCP-84265.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jianping-shu I've updated the documentation. Please let me know if you have any questions, or need a sample platform-spec.json

Copy link
Contributor

Choose a reason for hiding this comment

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

The vsphere sample for hiveutil create-cluster is updated, fixed.

I've tried the following 2 cases on OCP-84265
1)--vsphere-platform-spec-json paramter is missing but the error could be improved
jianpingshu@jshu-mac bin % ./hiveutil create-cluster jshu1 --cloud=vsphere --vsphere-api-vip=192.168.1.2 --vsphere-ingress-vip=192.168.1.3 --vsphere-ca-certs=./vcenter-certificate -o yaml > jshu1.yaml
DEBU[0000] Couldn't find install logs provider environment variable. Skipping.
FATA[0000] Error command=create-cluster error="error decoding platform : unexpected end of JSON input"
2)I tried several json files but all got the following error, see this code , looks like it needs "os.ReadFile" for the json file, can you help check?
jianpingshu@jshu-mac bin % ./hiveutil create-cluster jshu1 --cloud=vsphere --vsphere-api-vip=192.168.1.2 --vsphere-ingress-vip=192.168.1.3 --vsphere-ca-certs=./vcenter-certificate --vsphere-platform-spec-json=./platform2.json -o yaml > jshu1.yaml
DEBU[0000] Couldn't find install logs provider environment variable. Skipping.
FATA[0000] Error command=create-cluster error="error decoding platform /Users/jianpingshu/program/test_case/HIVE/HIVE-2391/hiveutil/platform2.json: invalid character '/' looking for beginning of value"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jianping-shu it's my mistake: The environment variable should contain the contents of the json, not a path to the json file itself. I've updated the docs to match the correct intended usage

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2025
@dlom dlom force-pushed the HIVE-2391 branch 2 times, most recently from 556f051 to afcf08f Compare September 9, 2025 18:02
@dlom
Copy link
Contributor Author

dlom commented Sep 10, 2025

/retest

Copy link
Contributor

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
hive-mce-210-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-26-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-27-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-28-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-29-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\"\n&& !body.pull_request.draft\n&& target_branch == \"master\"\n&& !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request

@jianping-shu
Copy link
Contributor

@dlom I tried the new commit, install vsphere cd with old format i.e. without platform.vsphere.vSphere still failed due to the same error. Pls. check the comments and hive controlller log attached on https://issues.redhat.com/browse/HIVE-2917.

@newtonheath
Copy link

@dlom can you pick up this again now private image work is in review - need to get this wrapped up

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2025
Copy link
Contributor

openshift-ci bot commented Sep 25, 2025

@dlom: The following test 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/prow/security 981416a link true /test security

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-sigs/prow repository. I understand the commands that are listed here.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants