Skip to content

Commit

Permalink
hotfix deploy first container
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Nov 16, 2018
1 parent 275e6f2 commit 02a48b5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions store/etcdv3/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
return nil, err
}

nodesInfo, err = m.doGetDeployStatus(ctx, resp, nodesInfo)
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)
}

Expand Down

0 comments on commit 02a48b5

Please sign in to comment.