-
Notifications
You must be signed in to change notification settings - Fork 143
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 bug: we should start conversion webhook before initiating Longhorn datastore #2812
Conversation
Putting this PR in draft until doing some more testing and have better code style |
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.
LGTM
16c858b
to
8b6d4de
Compare
@derekbit Can you review the PR again? It actually still needs a k8s client. Just do not need the Longhorn datastore. The new modification will create 2 clients:
I think it should not create a high memory usage issue since the one without Longhorn datastore doesn't have any cache. However, we should still double-check the test related to multiple clients in Longhorn manager. I forgot the ticket number, do you remember it? |
longhorn#6866? |
LGTM |
Yes, it is the test plan at longhorn/longhorn#6936 (comment) Thank you @ChanYiLin and @derekbit ! |
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.
The separate clients LGTM.
I think there is no memory usage issue as @PhanLe1010 said.
Looks like there is an new race condition arise after this PR. Please hold on merging |
@PhanLe1010 is this still draft? |
datastore longhorn-8578 Signed-off-by: Phan Le <phan.le@suse.com>
longhorn-manager This is needed because after Longhorn manager daemonset was deleted (aka conversion webhook is not running), we cannot delete CRs in older API version in deleteRecreatedCRs(). Signed-off-by: Phan Le <phan.le@suse.com>
It turned out that we not only have problem with upgrade stuck but also the problem with uninstall stuck because we delete the longhorn-manager daemonset (AKA the conversion webhook server) then list and the the BackupTarget which is still in v1beta1 version. This flow will fail. To solve this problem:
Due to time pressure, I think we can go with the first approach for now and do the 2nd approach later . WYDT cc @derekbit @innobead @ChanYiLin @ejweber |
Sounds good to me. |
@mergify backport v1.6.x v1.5.x |
✅ Backports have been created
|
longhorn/longhorn#8578
More details are at longhorn/longhorn#8578 (comment)