Fix runc state
error handling.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
parent
7e66292555
commit
7a4e0806c2
@ -228,7 +228,7 @@ func (p *Init) Status(ctx context.Context) (string, error) {
|
||||
defer p.mu.Unlock()
|
||||
c, err := p.runtime.State(ctx, p.id)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if strings.Contains(err.Error(), "does not exist") {
|
||||
return "stopped", nil
|
||||
}
|
||||
return "", p.runtimeError(err, "OCI runtime state failed")
|
||||
|
Loading…
Reference in New Issue
Block a user