Skip to content

Conversation

@danmanor
Copy link
Contributor

@danmanor danmanor commented Nov 25, 2024

This PR continues #6917:

  • Adds DB migrations for existing records (therefore avoiding setting default value)
  • Fix typos
  • Verifies clean query when counting host roles
  • Add feature support mechanism: disable ODF and non-baremetal platforms with the new feature
  • Change the feature name from 'stretched clusters' to 'non-standard HA OCP Control Plane'

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 25, 2024
@openshift-ci-robot
Copy link

@danmanor: This pull request explicitly references no jira issue.

Details

In response to this:

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. api-review Categorizes an issue or PR as actively needing an API review. labels Nov 25, 2024
@openshift-ci
Copy link

openshift-ci bot commented Nov 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor

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

The pull request process is described here

Details 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 Nov 25, 2024
@danmanor
Copy link
Contributor Author

/test

@openshift-ci
Copy link

openshift-ci bot commented Nov 25, 2024

@danmanor: The /test command needs one or more targets.
The following commands are available to trigger required jobs:

/test e2e-agent-compact-ipv4
/test edge-assisted-operator-catalog-publish-verify
/test edge-ci-index
/test edge-e2e-ai-operator-ztp
/test edge-e2e-ai-operator-ztp-sno-day2-workers
/test edge-e2e-ai-operator-ztp-sno-day2-workers-late-binding
/test edge-e2e-metal-assisted
/test edge-e2e-metal-assisted-4-12
/test edge-e2e-metal-assisted-4-control-planes-4-18
/test edge-e2e-metal-assisted-5-control-planes-4-18
/test edge-e2e-metal-assisted-cnv-4-16
/test edge-e2e-metal-assisted-cnv-4-17
/test edge-e2e-metal-assisted-lvm
/test edge-e2e-metal-assisted-mtv-4-17
/test edge-e2e-metal-assisted-odf-4-16
/test edge-e2e-metal-assisted-odf-4-17
/test edge-images
/test edge-lint
/test edge-operator-publish-verify
/test edge-subsystem-aws
/test edge-subsystem-kubeapi-aws
/test edge-unit-test
/test edge-verify-generated-code
/test images
/test mce-images

The following commands are available to trigger optional jobs:

/test e2e-agent-4control-ipv4
/test e2e-agent-5control-ipv4
/test e2e-agent-ha-dualstack
/test e2e-agent-sno-ipv6
/test edge-e2e-ai-operator-disconnected-capi
/test edge-e2e-ai-operator-ztp-3masters
/test edge-e2e-ai-operator-ztp-4masters
/test edge-e2e-ai-operator-ztp-5masters
/test edge-e2e-ai-operator-ztp-capi
/test edge-e2e-ai-operator-ztp-compact-day2-masters
/test edge-e2e-ai-operator-ztp-compact-day2-workers
/test edge-e2e-ai-operator-ztp-disconnected
/test edge-e2e-ai-operator-ztp-hypershift-zero-nodes
/test edge-e2e-ai-operator-ztp-multiarch-3masters-ocp
/test edge-e2e-ai-operator-ztp-multiarch-sno-ocp
/test edge-e2e-ai-operator-ztp-node-labels
/test edge-e2e-ai-operator-ztp-remove-node
/test edge-e2e-ai-operator-ztp-sno-day2-masters
/test edge-e2e-ai-operator-ztp-sno-day2-workers-ignitionoverride
/test edge-e2e-metal-assisted-4-13
/test edge-e2e-metal-assisted-4-14
/test edge-e2e-metal-assisted-4-15
/test edge-e2e-metal-assisted-4-16
/test edge-e2e-metal-assisted-4-17
/test edge-e2e-metal-assisted-bond
/test edge-e2e-metal-assisted-bond-4-14
/test edge-e2e-metal-assisted-day2
/test edge-e2e-metal-assisted-day2-arm-workers
/test edge-e2e-metal-assisted-day2-single-node
/test edge-e2e-metal-assisted-external
/test edge-e2e-metal-assisted-external-4-14
/test edge-e2e-metal-assisted-ipv4v6
/test edge-e2e-metal-assisted-ipv6
/test edge-e2e-metal-assisted-ipxe-static-ip-suite
/test edge-e2e-metal-assisted-kube-api-late-binding-single-node
/test edge-e2e-metal-assisted-kube-api-late-unbinding-ipv4-single-node
/test edge-e2e-metal-assisted-kube-api-net-suite
/test edge-e2e-metal-assisted-mce-4-16
/test edge-e2e-metal-assisted-mce-sno-4-16
/test edge-e2e-metal-assisted-metallb
/test edge-e2e-metal-assisted-none
/test edge-e2e-metal-assisted-onprem
/test edge-e2e-metal-assisted-single-node
/test edge-e2e-metal-assisted-static-ip-suite
/test edge-e2e-metal-assisted-static-ip-suite-4-14
/test edge-e2e-metal-assisted-tang
/test edge-e2e-metal-assisted-tpmv2
/test edge-e2e-metal-assisted-upgrade-agent
/test edge-e2e-nutanix-assisted
/test edge-e2e-nutanix-assisted-2workers
/test edge-e2e-nutanix-assisted-4-14
/test edge-e2e-oci-assisted
/test edge-e2e-oci-assisted-4-14
/test edge-e2e-oci-assisted-iscsi
/test edge-e2e-vsphere-assisted
/test edge-e2e-vsphere-assisted-4-14
/test edge-e2e-vsphere-assisted-4-15
/test edge-e2e-vsphere-assisted-4-16
/test edge-e2e-vsphere-assisted-umn
/test okd-scos-e2e-aws-ovn
/test okd-scos-images
/test push-pr-image

Use /test all to run the following jobs that were automatically triggered:

pull-ci-openshift-assisted-service-master-e2e-agent-compact-ipv4
pull-ci-openshift-assisted-service-master-edge-ci-index
pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-disconnected-capi
pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-ztp
pull-ci-openshift-assisted-service-master-edge-e2e-ai-operator-ztp-capi
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-cnv-4-17
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-lvm
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-mtv-4-17
pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-odf-4-17
pull-ci-openshift-assisted-service-master-edge-images
pull-ci-openshift-assisted-service-master-edge-lint
pull-ci-openshift-assisted-service-master-edge-subsystem-aws
pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
pull-ci-openshift-assisted-service-master-edge-unit-test
pull-ci-openshift-assisted-service-master-edge-verify-generated-code
pull-ci-openshift-assisted-service-master-images
pull-ci-openshift-assisted-service-master-mce-images
pull-ci-openshift-assisted-service-master-okd-scos-e2e-aws-ovn
Details

In response to this:

/test

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.

@danmanor
Copy link
Contributor Author

/test edge-e2e-ai-operator-ztp-4masters

@danmanor
Copy link
Contributor Author

/test e2e-agent-4control-ipv4

@danmanor
Copy link
Contributor Author

/test edge-e2e-metal-assisted-4-control-planes-4-18

@danmanor danmanor changed the title MGMT-19338, NO-ISSUE: Patches for non-standard HA OCP Control Plane PR MGMT-19338, MGMT-19080, MGMT-18590, NO-ISSUE: Patches for non-standard HA OCP Control Plane PR Nov 25, 2024
@codecov
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 87.01299% with 10 lines in your changes missing coverage. Please review.

Project coverage is 68.27%. Comparing base (1d3b484) to head (1db54cb).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
..._plane_count_value_for_existing_cluster_records.go 72.72% 3 Missing and 3 partials ⚠️
internal/featuresupport/features_misc.go 85.18% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7023      +/-   ##
==========================================
+ Coverage   68.21%   68.27%   +0.06%     
==========================================
  Files         273      274       +1     
  Lines       39075    39127      +52     
==========================================
+ Hits        26655    26715      +60     
+ Misses      10006     9995      -11     
- Partials     2414     2417       +3     
Files with missing lines Coverage Δ
internal/bminventory/inventory.go 70.97% <100.00%> (+0.09%) ⬆️
internal/cluster/validator.go 95.35% <ø> (-0.05%) ⬇️
internal/common/common.go 28.57% <ø> (+1.38%) ⬆️
internal/common/db.go 10.52% <ø> (ø)
...oller/controllers/clusterdeployments_controller.go 72.46% <100.00%> (ø)
internal/featuresupport/feature_support_level.go 96.49% <ø> (ø)
internal/featuresupport/features_olm_operators.go 81.63% <100.00%> (+0.74%) ⬆️
internal/featuresupport/features_platforms.go 92.93% <100.00%> (+0.19%) ⬆️
internal/host/monitor.go 81.36% <100.00%> (-0.35%) ⬇️
internal/migrations/migrations.go 90.62% <100.00%> (+0.30%) ⬆️
... and 4 more

... and 4 files with indirect coverage changes

@eifrach
Copy link
Contributor

eifrach commented Nov 25, 2024

I'm missing tests for SNO
/test edge-e2e-ai-operator-ztp-sno-day2-workers

Copy link
Contributor

@eifrach eifrach left a comment

Choose a reason for hiding this comment

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

please confirm that we have at least one SNO test green

@openshift-ci openshift-ci bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 25, 2024
@openshift-ci openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 25, 2024
@danmanor
Copy link
Contributor Author

/test edge-e2e-ai-operator-ztp-4masters /test e2e-agent-4control-ipv4 edge-e2e-metal-assisted-4-control-planes-4-18 edge-e2e-ai-operator-ztp-sno-day2-workers

@danmanor
Copy link
Contributor Author

@eifrach Worked in integration

@danmanor
Copy link
Contributor Author

/test edge-unit-test

@danmanor danmanor force-pushed the migration branch 2 times, most recently from b8539b4 to a7e9631 Compare November 25, 2024 14:28
@danmanor
Copy link
Contributor Author

/test edge-e2e-ai-operator-ztp-4masters /test e2e-agent-4control-ipv4 edge-e2e-metal-assisted-4-control-planes-4-18 edge-e2e-ai-operator-ztp-sno-day2-workers

@danmanor
Copy link
Contributor Author

/retest

@danmanor
Copy link
Contributor Author

/override ci/prow/okd-scos-e2e-aws-ovn ci/prow/edge-e2e-ai-operator-disconnected-capi

@openshift-ci
Copy link

openshift-ci bot commented Nov 26, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/edge-e2e-ai-operator-disconnected-capi, ci/prow/okd-scos-e2e-aws-ovn

Details

In response to this:

/override ci/prow/okd-scos-e2e-aws-ovn ci/prow/edge-e2e-ai-operator-disconnected-capi

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.

@danmanor
Copy link
Contributor Author

/cc @tsorya

@openshift-ci openshift-ci bot requested a review from tsorya November 26, 2024 07:49
@danmanor
Copy link
Contributor Author

disconnected-capi is broken

// control_plane_count value in existing records can be NULL or 0 (default). We want to set the value in both cases
Where(cleanQuery.Where("control_plane_count IS NULL").Or("control_plane_count = ?", 0)).
Where("high_availability_mode = ?", models.ClusterCreateParamsHighAvailabilityModeFull).
Update("control_plane_count", "3").Error
Copy link
Contributor

Choose a reason for hiding this comment

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

What will happen if we have a cluster without hosts and the high availability is full? Do we still want to update it to 3, or should it be 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want it to be 3 as it represents the desired amount of hosts

Copy link
Contributor

@tsorya tsorya Nov 26, 2024

Choose a reason for hiding this comment

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

Why we need need to migrate installed clusters? I mean this field is not relevant for them, no?
How it will influence ACM or we don't run migration in ACM flow?


func GetHostCountByRole(db *gorm.DB, clusterID strfmt.UUID, role models.HostRole, suggested bool) (*int64, error) {
// Start from empty query
cleanQuery := db.Session(&gorm.Session{NewDB: true})
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why session or why NewDB: true ?

return models.SupportLevelUnavailable
}

if filters.PlatformType != nil && *filters.PlatformType != models.PlatformTypeBaremetal {
Copy link
Contributor

@tsorya tsorya Nov 26, 2024

Choose a reason for hiding this comment

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

not supported in None? Why only Baremetal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably can work with none as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just not nutanix, vspere, etc

@danmanor
Copy link
Contributor Author

/test edge-e2e-ai-operator-ztp-4masters /test e2e-agent-4control-ipv4 edge-e2e-metal-assisted-4-control-planes-4-18 edge-e2e-ai-operator-ztp-sno-day2-workers

@danmanor danmanor force-pushed the migration branch 2 times, most recently from 295a533 to c3c74f8 Compare November 26, 2024 16:58
@danmanor
Copy link
Contributor Author

/test edge-e2e-ai-operator-ztp-4masters /test e2e-agent-4control-ipv4 edge-e2e-metal-assisted-4-control-planes-4-18 edge-e2e-ai-operator-ztp-sno-day2-workers

@tsorya
Copy link
Contributor

tsorya commented Nov 26, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2024
@openshift-ci
Copy link

openshift-ci bot commented Nov 26, 2024

@danmanor: 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/edge-e2e-ai-operator-disconnected-capi 1db54cb link false /test edge-e2e-ai-operator-disconnected-capi

Full PR test history. Your PR dashboard.

Details

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.

@openshift-merge-bot openshift-merge-bot bot merged commit f9683ac into openshift:master Nov 26, 2024
1 check passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-api-server
This PR has been included in build ose-agent-installer-api-server-container-v4.19.0-202411262308.p0.gf9683ac.assembly.stream.el9.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review Categorizes an issue or PR as actively needing an API review. 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. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants