mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-09 09:05:26 +00:00
Fix podman agent container in v2 (#2897)
Add additional string matching to determine when container is not found or running when invoked via podman compatibility socket Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
This commit is contained in:
parent
621eed6205
commit
bc95443853
1 changed files with 2 additions and 1 deletions
|
@ -361,8 +361,9 @@ var (
|
|||
func isErrContainerNotFoundOrNotRunning(err error) bool {
|
||||
// Error response from daemon: Cannot kill container: ...: No such container: ...
|
||||
// Error response from daemon: Cannot kill container: ...: Container ... is not running"
|
||||
// Error response from podman daemon: can only kill running containers. ... is in state exited
|
||||
// Error: No such container: ...
|
||||
return err != nil && (strings.Contains(err.Error(), "No such container") || strings.Contains(err.Error(), "is not running"))
|
||||
return err != nil && (strings.Contains(err.Error(), "No such container") || strings.Contains(err.Error(), "is not running") || strings.Contains(err.Error(), "can only kill running containers"))
|
||||
}
|
||||
|
||||
// normalizeArchType converts the arch type reported by docker info into
|
||||
|
|
Loading…
Reference in a new issue