Commit d6777557 authored by Daniel Smith's avatar Daniel Smith

Merge pull request #2305 from ddysher/rm-create-check

Remove health check when creating node.
parents 7cab32b4 c83ee59e
......@@ -60,21 +60,14 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
minion.CreationTimestamp = util.Now()
return apiserver.MakeAsync(func() (runtime.Object, error) {
// TODO: Need to fill in any server-set fields (uid, timestamp, etc) before
// returning minion. Can't do it properly at the moment because the registry
// healthchecking, which might cause it to not return the minion at all. Fix
// this after we move the healthchecking out of the minion registry.
err := rs.registry.CreateMinion(ctx, minion)
if err != nil {
return nil, err
}
minionName := minion.Name
minion, err := rs.registry.GetMinion(ctx, minionName)
if err == ErrNotHealty {
return rs.toApiMinion(minionName), nil
}
if minion == nil {
return nil, ErrDoesNotExist
}
if err != nil {
return nil, err
}
return minion, nil
}), nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment