-
Notifications
You must be signed in to change notification settings - Fork 725
[hyper-v] Invalidate cached mgmt IP address on update_state() #4207
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
base: main
Are you sure you want to change the base?
[hyper-v] Invalidate cached mgmt IP address on update_state() #4207
Conversation
The cached management IP address becomes stale on some operations when it happens out-of-band, like "multipass restart", where it's a SSH-induced guest reboot. This patch fixes that by invalidating the cached IP address on every update_state() invocation. Fixes: #3354 Signed-off-by: Mustafa Kemal Gilor <[email protected]>
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.
Many thanks for (re-)spotting and fixing this @xmkg!
The general idea makes sense to me, although in the long run I hope we can find a way to be alerted to ACPI events in the guest. I suspect it would be possible to subscribe over a VSOCK/SSH connection, otherwise we might use a heartbeat based approach.
I have a few requests inline, but I think we should let this one simmer in main for a while either way. It's been like this forever and the fix could have effects that we're not anticipating, so I wouldn't rush to release it now.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4207 +/- ##
=======================================
Coverage 89.31% 89.31%
=======================================
Files 259 259
Lines 15684 15684
=======================================
Hits 14008 14008
Misses 1676 1676 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Mustafa Kemal Gilor <[email protected]>
Signed-off-by: Mustafa Kemal Gilor <[email protected]>
Signed-off-by: Mustafa Kemal Gilor <[email protected]>
732bf14
to
5088e5b
Compare
The cached management IP address becomes stale on some operations when it happens out-of-band, like "multipass restart", where it's a SSH-induced guest reboot.
This patch fixes that by invalidating the cached IP address on every update_state() invocation.
Fixes: #3354
MULTI-2068