mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fix: Docker stopping will include a timeout (#2540)
* fix sdk build script * fix: Docker stopping will include a timeoute So the timeout that was included in the original is not working therefore we move to a doublinig with a timeout * fix: Adding in the missing suggestions that Aiden has poinited out * Update install-sdk.sh * Update install-sdk.sh --------- Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -29,7 +29,15 @@ impl ManagerSeed {
|
||||
)
|
||||
.await
|
||||
{
|
||||
Err(e) if e.kind == ErrorKind::NotFound => (), // Already stopped
|
||||
Err(e) if e.kind == ErrorKind::NotFound => {
|
||||
tracing::info!(
|
||||
"Command for package {command_id} should already be stopped",
|
||||
command_id = &self.manifest.id
|
||||
);
|
||||
} // Already stopped
|
||||
Err(e) if e.kind == ErrorKind::Timeout => {
|
||||
tracing::warn!("Command for package {command_id} had to be timed out, but we have dropped which means it should be killed", command_id = &self.manifest.id);
|
||||
} // Already stopped In theory
|
||||
a => a?,
|
||||
}
|
||||
Ok(())
|
||||
|
||||
@@ -113,6 +113,7 @@ pub async fn stop_container(
|
||||
signal: Option<Signal>,
|
||||
) -> Result<(), Error> {
|
||||
let mut cmd = Command::new(CONTAINER_TOOL);
|
||||
let mut cmd = cmd.timeout(timeout);
|
||||
cmd.arg("stop");
|
||||
if let Some(dur) = timeout {
|
||||
cmd.arg("-t").arg(dur.as_secs().to_string());
|
||||
|
||||
Reference in New Issue
Block a user