Make garbage collection ownership-aware #71
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
geomind_code/my_hypervisor!71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_owned_gc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#45
can u resolve conflicts
Make garbage collection ownership-awareto WIP: Make garbage collection ownership-awareWIP: Make garbage collection ownership-awareto Make garbage collection ownership-aware@ -140,0 +140,4 @@gc_cleanup_heuristic().await?;} else {gc_cleanup(args.dry_run).await?;}are these flags mutually exclusive? because something like that
--gc --force-heuristic --dry-runwill ignore the dry run, if this is the behaviour needed u can use https://docs.rs/clap/latest/clap/struct.Arg.html#method.conflicts_withif it is not then we should expect dry run for the heuristic gc as well
as well as
my_hypervisor doctor --force-heuristicwithout --gc ignores force heuristic the same case will be for --dry run u can use this https://docs.rs/clap/latest/clap/struct.Arg.html#method.required
@ -146,0 +180,4 @@prefix,result.actions.len());}should we print here crashed vms cleaned? if it is not used can we remove it?
@ -1175,0 +1261,4 @@.cloned().collect()};instead of duplicated filtering logic
@ -1175,0 +1270,4 @@if state.vm_config.network.mode != NetworkMode::None&& !state.vm_config.network.port_forwards.is_empty(){warnings.push(GcWarning {the vm may have tap device configured with no port forwarding configs so in this case there is no warning is it intended behaviour?
@ -1175,0 +1311,4 @@});}Ok(o) => {let stderr = String::from_utf8_lossy(&o.stderr);we can have helper function gc_delete_resource() that run the delete command with passing args and check whether it succeeded or not for taps and iptables
@ -1175,0 +1329,4 @@// iptables rulesfor rule_str in &ownership.iptables_rules {let reason = format!("VM {} ({})", state.name, state.status);if dry_run {reason can be formatted once for a vm since it using vm name and status no need to redo with each rule