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

fix(manager): fix logic for when RWX workload is restarted after node… #3077

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

james-munson
Copy link
Contributor

@james-munson james-munson commented Aug 19, 2024

… failure

Which issue(s) this PR fixes:

longhorn/longhorn#9095

What this PR does / why we need it:

Special notes for your reviewer:

Additional documentation or context

Copy link
Contributor

@ejweber ejweber left a comment

Choose a reason for hiding this comment

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

Should we remove the code at

// kill the workload pods, when the share manager goes into error state
// easiest approach is to set the RemountRequestedAt variable,
// since that is already responsible for killing the workload pods
if sm.Status.State == longhorn.ShareManagerStateError || sm.Status.State == longhorn.ShareManagerStateUnknown {
volume.Status.RemountRequestedAt = c.nowHandler()
msg := fmt.Sprintf("Volume %v requested remount at %v", volume.Name, volume.Status.RemountRequestedAt)
c.eventRecorder.Eventf(volume, corev1.EventTypeNormal, constant.EventReasonRemount, msg)
}
? If no, should we modify the comment?

controller/kubernetes_pod_controller.go Outdated Show resolved Hide resolved
controller/kubernetes_pod_controller.go Show resolved Hide resolved
@james-munson
Copy link
Contributor Author

I thought about removing the kick from volume_controller, but it is still necessary in some cases. Comment revised to be more accurate, though.

ejweber
ejweber previously approved these changes Sep 6, 2024
Copy link
Contributor

@ejweber ejweber left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@james-munson james-munson force-pushed the 9095-rwx-restart branch 2 times, most recently from 58505f4 to 78e6299 Compare September 16, 2024 21:20
Copy link

mergify bot commented Sep 18, 2024

This pull request is now in conflict. Could you fix it @james-munson? 🙏

PhanLe1010
PhanLe1010 previously approved these changes Sep 18, 2024
Copy link
Contributor

@PhanLe1010 PhanLe1010 left a comment

Choose a reason for hiding this comment

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

LGTM

Could you please help to resolve the conflict for merging @james-munson ?

… failure

Signed-off-by: James Munson <james.munson@suse.com>
@PhanLe1010 PhanLe1010 merged commit a376849 into longhorn:master Sep 18, 2024
6 checks passed
@james-munson
Copy link
Contributor Author

@mergify backport v1.7.x

Copy link

mergify bot commented Sep 18, 2024

backport v1.7.x

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants