Skip to content
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

Restore controller in memory corrution #4297

Merged
merged 1 commit into from Oct 4, 2020

Conversation

mhenriks
Copy link
Member

@mhenriks mhenriks commented Oct 1, 2020

make sure to deep copy resources in informer caches

was mistakenly overwriting VirtualMachineSnapshotContent

kept us from restoring from the same snapshot twice

Signed-off-by: Michael Henriksen mhenriks@redhat.com

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Release note:

NONE

@kubevirt-bot kubevirt-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/L labels Oct 1, 2020
Signed-off-by: Michael Henriksen <mhenriks@redhat.com>
@@ -343,8 +349,13 @@ func (t *vmRestoreTarget) Reconcile() (bool, error) {
var deletedDataVolumes []string
updatedStatus := false

copy(newTemplates, snapshotVM.Spec.DataVolumeTemplates)
copy(newVolumes, snapshotVM.Spec.Template.Spec.Volumes)
for i, t := range snapshotVM.Spec.DataVolumeTemplates {
Copy link
Member Author

Choose a reason for hiding this comment

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

this was actually the problematic block. snapshotVM.Spec.Template.Spec.Volumes was getting overwritten

Copy link
Member

@awels awels left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2020
@mhenriks
Copy link
Member Author

mhenriks commented Oct 3, 2020

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mhenriks

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

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 3, 2020
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

1 similar comment
@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit 5503318 into kubevirt:master Oct 4, 2020
@mhenriks
Copy link
Member Author

mhenriks commented Oct 4, 2020

/cherry-pick release-0.34

@kubevirt-bot
Copy link
Contributor

@mhenriks: new pull request created: #4308

In response to this:

/cherry-pick release-0.34

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/test-infra repository.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants