Skip to content

Conversation

xmkg
Copy link
Member

@xmkg xmkg commented Jul 2, 2025

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

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]>
@xmkg xmkg requested review from ricab and Sploder12 July 2, 2025 11:56
Copy link
Collaborator

@ricab ricab left a 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.

Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.31%. Comparing base (b7a35a3) to head (5088e5b).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xmkg xmkg force-pushed the bugfix/hyperv-invalidate-cached-mgmt-ip-on-state-change branch from 732bf14 to 5088e5b Compare July 3, 2025 11:28
@xmkg xmkg requested a review from ricab July 3, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hyperv] multipass ls shows stale IP address after instance restart
2 participants