From c83ee59e1584dab694240e395cce1c28a832b1db Mon Sep 17 00:00:00 2001 From: Deyuan Deng Date: Tue, 11 Nov 2014 16:38:22 -0500 Subject: [PATCH] Remove health check when creating node. --- pkg/registry/minion/rest.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pkg/registry/minion/rest.go b/pkg/registry/minion/rest.go index 7f668ba7187..eb56360a299 100644 --- a/pkg/registry/minion/rest.go +++ b/pkg/registry/minion/rest.go @@ -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 }