mirror of
https://github.com/go-micro/go-micro.git
synced 2025-06-18 22:17:44 +02:00
Ignore "no such process" error (#1686)
* Cleanup how status is updated for service. Ignore "no such process" error as it could be that the pid died * add nice error log to record process error exit
This commit is contained in:
@ -167,11 +167,10 @@ func (k *kubernetes) getService(labels map[string]string, opts ...client.GetOpti
|
||||
|
||||
// parse out deployment status and inject into service metadata
|
||||
if len(kdep.Status.Conditions) > 0 {
|
||||
svc.Metadata["status"] = kdep.Status.Conditions[0].Type
|
||||
svc.Status(kdep.Status.Conditions[0].Type, nil)
|
||||
svc.Metadata["started"] = kdep.Status.Conditions[0].LastUpdateTime
|
||||
delete(svc.Metadata, "error")
|
||||
} else {
|
||||
svc.Metadata["status"] = "n/a"
|
||||
svc.Status("n/a", nil)
|
||||
}
|
||||
|
||||
// get the real status
|
||||
@ -214,8 +213,7 @@ func (k *kubernetes) getService(labels map[string]string, opts ...client.GetOpti
|
||||
}
|
||||
}
|
||||
// TODO: set from terminated
|
||||
|
||||
svc.Metadata["status"] = status
|
||||
svc.Status(status, nil)
|
||||
}
|
||||
|
||||
// save deployment
|
||||
|
Reference in New Issue
Block a user