Cancel the listener context before closing it#74
Conversation
Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
roosterfish
left a comment
There was a problem hiding this comment.
Looks good to me.
I was wondering why MicroCloud starts up the servers again after the init process went through? Essentially I don't get who is calling Serve() again. Can you please elaborate on this?
It's an accommodation for MicroCloud, mostly. In order to fetch the disks/interfaces on each system, and also instruct the systems to actually join the cluster, we need to be able to talk to them remotely. So there is an option in microcluster to specify a port which will be used to open a listener on all addresses. Then when MicroCloud has determined which subnet it wants to use for the cluster, it tears down the wildcard listener on each system and replaces it with a proper address:port combo. |
|
Ah ok, and that is the reason why there is the |
Cancel the listener context before closing it (cherry picked from commit 1491142)
Cancel the listener context before closing it (cherry picked from commit 1491142) Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Cancel the listener context before closing it (cherry picked from commit 1491142) Signed-off-by: Max Asnaashari <max.asnaashari@canonical.com>
Fixes a misleading error log because we were closing the listeners but not closing their contexts.