mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-01 08:56:32 +00:00
Merge pull request #4684 from quanweiZhou/fix-ctr-exit-error
runtime-rs: fix ctr exit failed
This commit is contained in:
@@ -193,7 +193,13 @@ impl ContainerInner {
|
||||
) -> Result<()> {
|
||||
let logger = logger_with_process(process);
|
||||
info!(logger, "begin to stop process");
|
||||
|
||||
// do not stop again when state stopped, may cause multi cleanup resource
|
||||
let state = self.init_process.get_status().await;
|
||||
if state == ProcessStatus::Stopped {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
self.check_state(vec![ProcessStatus::Running])
|
||||
.await
|
||||
.context("check state")?;
|
||||
|
Reference in New Issue
Block a user