add unregister container
This commit is contained in:
parent
f6e3fdd3c2
commit
b238c480ab
3 changed files with 12 additions and 2 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -2008,7 +2008,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "silserv"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "silserv"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2024"
|
||||
authors = ["pakin"]
|
||||
description = "Container manager service for testing"
|
||||
|
|
|
|||
|
|
@ -693,6 +693,10 @@ impl UpdateManager {
|
|||
"updater",
|
||||
format!("⚠️ Backup creation failed: {}", e)
|
||||
);
|
||||
|
||||
// unregister container
|
||||
let _ = self.storage.delete_container(&container.container_id);
|
||||
|
||||
// Don't fail the update for backup issues
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -730,6 +734,8 @@ impl UpdateManager {
|
|||
.await
|
||||
.context("Failed to remove container")?;
|
||||
|
||||
let _ = self.storage.delete_container(container_id);
|
||||
|
||||
info!("✅ Container stopped and removed");
|
||||
log_info!(
|
||||
self.log_manager,
|
||||
|
|
@ -951,6 +957,10 @@ impl UpdateManager {
|
|||
async fn attempt_rollback(&self, container: &ManagedContainer) -> Result<()> {
|
||||
warn!("🔄 Attempting rollback for container: {}", container.name);
|
||||
|
||||
warn!("Cleaning up ... ");
|
||||
|
||||
// let _ = self.storage.delete_container(&container.container_id);
|
||||
|
||||
// Implementation for rollback would go here
|
||||
// This could involve starting the backup image or the previous version
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue