-
Notifications
You must be signed in to change notification settings - Fork 736
[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
[hyper-v] Invalidate cached mgmt IP address on update_state() #4207
Conversation
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4207 +/- ##
=======================================
Coverage 89.44% 89.44%
=======================================
Files 260 260
Lines 15818 15818
=======================================
Hits 14149 14149
Misses 1669 1669 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
5088e5b to
94212fa
Compare
|
This is important for hostname resolution, is it done simmering? |
@ricab ^^ WDYT? Should we include it in 1.17? |
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.
Yup, I am good with this, but I didn't test. @Sploder12 would you be willing to do that?
[Secondary review]
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! Confirmed that running reboot inside of the VM via the Hyper-V interface (used passwd over shell first to make that possible) worked. Multipass picked up the new IP (once it was available)
|
Great! @ricab, we already discussed this, but still want to confirm that you're on board with the idea of ignoring commit linter for older PR's and commits. If so, I'll go ahead and merge this. |
|
Yes, it's fine. It's a transition period. |
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