Skip to content

Conversation

@phip1611
Copy link
Member

No description provided.

@phip1611 phip1611 self-assigned this Nov 25, 2025
@phip1611 phip1611 force-pushed the poc-migration-statistics branch from e29356d to 4101b11 Compare November 28, 2025 08:46
/// The final memory transmission info.
memory_info: MemoryTransmissionInfo,
},
Failed {
Copy link
Member Author

@phip1611 phip1611 Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently I don't like that this phase is part of this enum. Instead, on the top level we should have

Ongoing(InnerStateA), Cancelled(InnerStateB), Failed(InnerStateC)

pub memory_bytes_transmitted: u64,
pub memory_pages_4k_transmitted: u64,
pub memory_bytes_remaining_iteration: u64,
pub memory_bytes_remaining_total: u64,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qemu also reports the dirty rate. Do we want to report this too?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's also missing is some sort of status (migration in-progess, migration-finished, ...)

Copy link
Member Author

@phip1611 phip1611 Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emu also reports the dirty rate. Do we want to report this too?

100%, sure. I just forgot it here

migration in-progess, migration-finished

I have it already, but I want to refactor it to make it more promiment. See my comment #43 (review)

@phip1611 phip1611 force-pushed the poc-migration-statistics branch 5 times, most recently from f49e577 to fdf5858 Compare December 9, 2025 11:42
let clear = matches
.subcommand_matches("migration-progress")
.unwrap()
.get_one::<bool>("clear")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can completely nuke that clear complexity - there is no problem with keeping the old state around. As soon as a new migration starts, the state is overwritten anyway

}

#[derive(Clone, Deserialize, Serialize, Debug)]
pub struct VmMigrationProgressData {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can completely nuke that clear complexity - there is no problem with keeping the old state around. As soon as a new migration starts, the state is overwritten anyway

@phip1611 phip1611 force-pushed the poc-migration-statistics branch from f612cf6 to e9a3321 Compare December 15, 2025 14:24
@phip1611 phip1611 force-pushed the poc-migration-statistics branch from e9a3321 to ecb5f45 Compare January 8, 2026 14:31
@phip1611 phip1611 changed the base branch from gardenlinux-v48 to gardenlinux January 8, 2026 14:32
@phip1611 phip1611 force-pushed the poc-migration-statistics branch from ecb5f45 to 6038623 Compare January 8, 2026 16:31
Signed-off-by: Philipp Schuster <[email protected]>
On-behalf-of: SAP [email protected]
This prepares the HTTP endpoint to export ongoing VM live-migration
progress.

This works because of the following fundamental prerequisites:
- internal API was made async
- http thread was made async

This way, one can send requests to fetch the latest state without
blocking anywhere.

Signed-off-by: Philipp Schuster <[email protected]>
On-behalf-of: SAP [email protected]
The first version has the limitation that we populate the latest
snapshot once per memory iteration, although this is the most
interesting part by far. In a follow-up, we can make this more
fine-grained.

Signed-off-by: Philipp Schuster <[email protected]>
On-behalf-of: SAP [email protected]
Signed-off-by: Philipp Schuster <[email protected]>
On-behalf-of: SAP [email protected]
@phip1611 phip1611 force-pushed the poc-migration-statistics branch from 6038623 to e6c80dd Compare January 8, 2026 16:36
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.

2 participants