mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-06 11:20:17 +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<()> {
|
) -> Result<()> {
|
||||||
let logger = logger_with_process(process);
|
let logger = logger_with_process(process);
|
||||||
info!(logger, "begin to stop process");
|
info!(logger, "begin to stop process");
|
||||||
|
|
||||||
// do not stop again when state stopped, may cause multi cleanup resource
|
// 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])
|
self.check_state(vec![ProcessStatus::Running])
|
||||||
.await
|
.await
|
||||||
.context("check state")?;
|
.context("check state")?;
|
||||||
|
Reference in New Issue
Block a user