Skip to content

fix(networking): cleanup service/endpoint if needed #3078

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

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

Vicente-Cheng
Copy link
Contributor

@Vicente-Cheng Vicente-Cheng commented Aug 21, 2024

Which issue(s) this PR fixes:

Issue longhorn/longhorn#9272

What this PR does / why we need it:

We meet a corner case that the service/endpoint would not be cleanup. That will cause the service keep the ClusterIP None. With this config, the endpoint of sharemanager would not be correct, so the CSI driver cannot perform the mountpoint well.

We would like to have a checking mechanism to know if the service/endpoint did not cleanup. Then we will cleanup the service/endpoint to ensure the correct endpoint.

Special notes for your reviewer:

Additional documentation or context

@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch from 37a000c to 6e6e488 Compare August 21, 2024 16:58
@Vicente-Cheng Vicente-Cheng changed the title sharemanager controller: cleanup service/endpoint if needed fix(networking): cleanup service/endpoint if needed Aug 21, 2024
@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch 2 times, most recently from b8e8bae to 2411a2e Compare August 22, 2024 08:38
@Vicente-Cheng
Copy link
Contributor Author

codeFactor checking failure is not related to this PR.

@Vicente-Cheng Vicente-Cheng marked this pull request as ready for review August 22, 2024 08:42
james-munson
james-munson previously approved these changes Aug 22, 2024
Copy link
Contributor

@james-munson james-munson left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me.

@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch 3 times, most recently from ce14bfc to 7e4a0a9 Compare August 23, 2024 01:46
@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch 2 times, most recently from 552adef to 072656f Compare August 23, 2024 02:11
@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch 2 times, most recently from ed2d224 to c3c1673 Compare August 23, 2024 05:38
@Vicente-Cheng Vicente-Cheng force-pushed the cleanup-service-endpoint branch from c3c1673 to ac704dd Compare August 23, 2024 06:43
@derekbit derekbit force-pushed the cleanup-service-endpoint branch from ac704dd to d5f67ad Compare August 23, 2024 07:09
derekbit
derekbit previously approved these changes Aug 23, 2024
Copy link
Member

@derekbit derekbit left a comment

Choose a reason for hiding this comment

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

LGTM.

@derekbit
Copy link
Member

Need @c3y1huang's final check and approval. Thank you.

derekbit
derekbit previously approved these changes Aug 23, 2024
Copy link
Member

@derekbit derekbit left a comment

Choose a reason for hiding this comment

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

LGTM

    We meet a corner case that the service/endpoint would not be
    cleanup. That will cause the service keep the ClusterIP `None`.
    With this config, the endpoint of sharemanager would not correct.
    So the CSI driver cannot perform the mountpoint well.

    We would like to have a checking mechanism to know if the service/
    endpoint did not cleanup. Then we will cleanup the service/endpoint
    to ensure the correct endpoint.

    Remove the cleanup function in the setting controller, we could do
    the cleanup on the sm controller

Signed-off-by: Vicente Cheng <[email protected]>
Co-authored-by: Chin-Ya Huang <[email protected]>
Co-authored-by: Derek Su <[email protected]>
Copy link
Contributor

@c3y1huang c3y1huang left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the fix.

@c3y1huang c3y1huang merged commit abb2235 into longhorn:master Aug 23, 2024
7 of 8 checks passed
@c3y1huang
Copy link
Contributor

@mergify backport v1.7.x

Copy link

mergify bot commented Aug 23, 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.

4 participants