只锁治理库 scope 挡不住 WeKnora 直连和后台写入。把封存链路的 维护机制接到发布路径:持久化 owner/目标身份/原服务状态,关入口、 停写入者、验证排空与入口不可达,再写目标;写完先恢复原运行状态 与入口才释放占用。内容风险一旦落盘,重启恢复不再自动启动写入者。 新增 000071 迁移记录 level/指纹/服务/入口状态;未接线的目标直接 拒绝写,不用库级锁冒充系统维护。
This commit is contained in:
@@ -78,6 +78,7 @@ type dockerInspection struct {
|
||||
Restarting bool
|
||||
Dead bool
|
||||
Status string
|
||||
ExitCode int
|
||||
Health *struct{ Status string }
|
||||
} `json:"State"`
|
||||
}
|
||||
@@ -104,7 +105,14 @@ func (d *DockerController) inspect(ctx context.Context, id string) (Service, err
|
||||
return Service{}, errors.New("contradictory test writer state")
|
||||
}
|
||||
healthy := data.State.Running && data.State.Health != nil && data.State.Health.Status == "healthy"
|
||||
return Service{ID: id, Running: data.State.Running, Healthy: healthy}, nil
|
||||
// 退出码只在"已经停下"时才有意义:它证明服务是自己收尾退出的(0),
|
||||
// 还是被信号切断的(143/137)。运行中的服务不提供这项证据。
|
||||
var exit *int
|
||||
if !data.State.Running {
|
||||
code := data.State.ExitCode
|
||||
exit = &code
|
||||
}
|
||||
return Service{ID: id, Running: data.State.Running, Healthy: healthy, ExitCode: exit}, nil
|
||||
}
|
||||
func (d *DockerController) Inventory(ctx context.Context) ([]Service, error) {
|
||||
filters, _ := json.Marshal(map[string][]string{"label": {sourceLabel + "=" + d.source}})
|
||||
|
||||
Reference in New Issue
Block a user