Skip to content

OCPBUGS-56195: Fix live migration with feature migration configured explicitly #2710

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

Open
wants to merge 1 commit into
base: release-4.16
Choose a base branch
from

Conversation

pliurh
Copy link
Contributor

@pliurh pliurh commented May 19, 2025

The function isMigrationChangeSafe reports error when feature migration configured explicitly. It prevent the live migration from being completed at the last step, when the clusterconfig controller remove the flags spec.migration.networkType and spec.migration.mode.

@openshift-ci openshift-ci bot requested review from abhat and danwinship May 19, 2025 09:40
@pliurh pliurh changed the title Fix live migration with feature migration configured explicitly OCPBUGS-56195: Fix live migration with feature migration configured explicitly May 19, 2025
@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 19, 2025
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Jira Issue OCPBUGS-56195, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-56195 to depend on a bug targeting a version in 4.17.0, 4.17.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

The function isMigrationChangeSafe reports error when feature migration configured explicitly. It prevent the live migration from being completed at the last step, when the clusterconfig controller remove the flags spec.migration.networkType and spec.migration.mode.

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.

@pliurh
Copy link
Contributor Author

pliurh commented May 19, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Jira Issue OCPBUGS-56195, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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.

@pliurh
Copy link
Contributor Author

pliurh commented May 19, 2025

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 19, 2025
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Jira Issue OCPBUGS-56195, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.z) matches configured target version for branch (4.16.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-56426 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-56426 targets the "4.17.z" version, which is one of the valid target versions: 4.17.0, 4.17.z
  • bug has dependents

Requesting review from QA contact:
/cc @anuragthehatter

In response to this:

/jira refresh

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 requested a review from anuragthehatter May 19, 2025 09:46
@pliurh
Copy link
Contributor Author

pliurh commented May 19, 2025

/cc @kyrtapz

@openshift-ci openshift-ci bot requested a review from kyrtapz May 19, 2025 09:48
@pliurh pliurh force-pushed the release-4.16 branch 2 times, most recently from 8c490ba to bc8333b Compare May 19, 2025 09:58
@@ -689,7 +689,9 @@ func isMigrationChangeSafe(prev, next *operv1.NetworkSpec, infraStatus *bootstra
if next.Migration != nil && next.Migration.Mode == operv1.LiveNetworkMigrationMode && infraStatus.HostedControlPlane != nil {
return []error{errors.Errorf("live migration is unsupported in a HyperShift environment")}
}
if prev.Migration != nil && next.Migration != nil && prev.Migration.NetworkType != next.Migration.NetworkType && next.Migration.Mode != operv1.LiveNetworkMigrationMode {
if prev.Migration != nil && next.Migration != nil && next.Migration.NetworkType != "" &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This now allows changing the NetworkType anytime during the live migration.
Should we at least limit it to going from "set" to "unset"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This patch is actually to allow it to go from "set" to "unset". This happens at the last step of the live migration. When no migration.featureMigration is configured, the migration field will be removed; therefore, it won't report an error here. However, when the user configures migration.featureMigration manually, the migration field will not be removed by the server-side apply. Instead, only the migration.networkType and migration.mode will be unset.

errMsg: "cannot change migration network type after migration has started",
},
{
name: "changing network type during live migration should be valid",
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't support such scenario do we?

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 don't.

The function isMigrationChangeSafe reports error when feature
migration configured explicitly. It prevent the live migration
from being completed at the last step, when the clusterconfig
controller remove the flags spec.migration.networkType and
spec.migration.mode.

Signed-off-by: Peng Liu <[email protected]>
@pliurh
Copy link
Contributor Author

pliurh commented May 20, 2025

/retest-required

2 similar comments
@pliurh
Copy link
Contributor Author

pliurh commented May 21, 2025

/retest-required

@pliurh
Copy link
Contributor Author

pliurh commented May 21, 2025

/retest-required

@kyrtapz
Copy link
Contributor

kyrtapz commented May 21, 2025

/lgtm
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label May 21, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2025
Copy link
Contributor

openshift-ci bot commented May 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyrtapz, pliurh

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 May 21, 2025
@pliurh
Copy link
Contributor Author

pliurh commented May 22, 2025

/retest-required

@kyrtapz
Copy link
Contributor

kyrtapz commented May 22, 2025

/override ci/prow/e2e-gcp-ovn-upgrade
https://issues.redhat.com/browse/TRT-2133

Copy link
Contributor

openshift-ci bot commented May 22, 2025

@kyrtapz: Overrode contexts on behalf of kyrtapz: ci/prow/e2e-gcp-ovn-upgrade

In response to this:

/override ci/prow/e2e-gcp-ovn-upgrade
https://issues.redhat.com/browse/TRT-2133

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.

Copy link
Contributor

openshift-ci bot commented May 22, 2025

@pliurh: 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/prow/e2e-vsphere-ovn-dualstack-primaryv6 80b7be1 link false /test e2e-vsphere-ovn-dualstack-primaryv6
ci/prow/e2e-network-mtu-migration-ovn-ipv4 80b7be1 link false /test e2e-network-mtu-migration-ovn-ipv4
ci/prow/e2e-aws-hypershift-ovn-kubevirt 80b7be1 link false /test e2e-aws-hypershift-ovn-kubevirt
ci/prow/4.16-upgrade-from-stable-4.15-e2e-gcp-ovn-upgrade 80b7be1 link false /test 4.16-upgrade-from-stable-4.15-e2e-gcp-ovn-upgrade
ci/prow/security 80b7be1 link false /test security
ci/prow/e2e-gcp-ovn-upgrade 80b7be1 link true /test e2e-gcp-ovn-upgrade

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.