-
Notifications
You must be signed in to change notification settings - Fork 244
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
base: release-4.16
Are you sure you want to change the base?
Conversation
@pliurh: This pull request references Jira Issue OCPBUGS-56195, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/jira refresh |
@pliurh: This pull request references Jira Issue OCPBUGS-56195, which is invalid:
Comment In response to this:
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. |
/jira refresh |
@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
Requesting review from QA contact: In response to this:
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. |
/cc @kyrtapz |
8c490ba
to
bc8333b
Compare
pkg/network/render.go
Outdated
@@ -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 != "" && |
There was a problem hiding this comment.
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"?
There was a problem hiding this comment.
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.
pkg/network/render_test.go
Outdated
errMsg: "cannot change migration network type after migration has started", | ||
}, | ||
{ | ||
name: "changing network type during live migration should be valid", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]>
/retest-required |
2 similar comments
/retest-required |
/retest-required |
/lgtm |
[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 |
/retest-required |
/override ci/prow/e2e-gcp-ovn-upgrade |
@kyrtapz: Overrode contexts on behalf of kyrtapz: ci/prow/e2e-gcp-ovn-upgrade In response to this:
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. |
@pliurh: The following tests failed, say
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. |
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.