hotfix deploy first container
@@ -9,24 +9,24 @@ import (
"github.com/coreos/etcd/clientv3"
"github.com/projecteru2/core/types"
+ log "github.com/sirupsen/logrus"
)
// MakeDeployStatus get deploy status from store
func (m *Mercury) MakeDeployStatus(ctx context.Context, opts *types.DeployOptions, nodesInfo []types.NodeInfo) ([]types.NodeInfo, error) {
key := filepath.Join(containerDeployPrefix, opts.Name, opts.Entrypoint.Name)
resp, err := m.Get(ctx, key, clientv3.WithPrefix(), clientv3.WithKeysOnly())
- if err != nil || resp.Count == 0 {
- if resp != nil && resp.Count == 0 {
- err = types.ErrKeyNotExists
- }
+ if err != nil {
return nil, err
}
-
+ if resp.Count != 0 {
nodesInfo, err = m.doGetDeployStatus(ctx, resp, nodesInfo)
if err != nil {
return nil, err
}
-
+ } else {
+ log.Warnf("[MakeDeployStatus] Deploy status not found %s", opts.Name)
+ }
return m.loadProcessing(ctx, opts, nodesInfo)
}
