-
Notifications
You must be signed in to change notification settings - Fork 93
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 some small problems in the live upgrade procedure #385
Conversation
We observe the following deadlock when live upgrade: - sc.upgradeDaemons - sc.manager.Lock() - manager.upgradeNydusDaemon - m.mu.Lock() Let's fix it. Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
By this we can use the new daemon to handle the upcomming mounts. Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
Send states to the new daemon to restore. Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
So we can get the correct state after umount. Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
Codecov ReportBase: 27.99% // Head: 28.03% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #385 +/- ##
==========================================
+ Coverage 27.99% 28.03% +0.03%
==========================================
Files 40 40
Lines 4086 4081 -5
==========================================
Hits 1144 1144
+ Misses 2803 2798 -5
Partials 139 139
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -316,6 +318,11 @@ func (sc *Controller) upgradeNydusDaemon(d *daemon.Daemon, c upgradeRequest) err | |||
return err | |||
} | |||
|
|||
su := manager.SupervisorSet.GetSupervisor(d.ID()) | |||
if err := su.SendStatesTimeout(time.Second * 10); err != nil { |
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.
Why do we have to receive the old nydusd's states before a takeover request to new nydusd ?
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.
It's a similar procedure to doDaemonFailover function. The snapshotter needs to send the old nydusd's state to new one when takeover.
Here send refers to from snapshotter to nydus, as opposed to sendfd process, which may be a little confusing.
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.
Thanks
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.
Thanks for the patches. Only a few questions are left. Overall looks good and tidy.
This is to prepare for the upcoming nydusd live upgrade function.