Commit 8566056d authored by Chao Xu's avatar Chao Xu

revert 20202

parent 577eb94c
...@@ -674,7 +674,7 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, setFn SetFunc, ...@@ -674,7 +674,7 @@ func (t *Tester) testDeleteGracefulImmediate(obj runtime.Object, setFn SetFunc,
} }
objectMeta = t.getObjectMetaOrFail(out) objectMeta = t.getObjectMetaOrFail(out)
// the second delete shouldn't update the object, so the objectMeta.DeletionGracePeriodSeconds should eqaul to the value set in the first delete. // the second delete shouldn't update the object, so the objectMeta.DeletionGracePeriodSeconds should eqaul to the value set in the first delete.
if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != expectedGrace { if objectMeta.DeletionTimestamp == nil || objectMeta.DeletionGracePeriodSeconds == nil || *objectMeta.DeletionGracePeriodSeconds != 0 {
t.Errorf("unexpected deleted meta: %#v", objectMeta) t.Errorf("unexpected deleted meta: %#v", objectMeta)
} }
} }
......
...@@ -402,7 +402,7 @@ func (e *Etcd) Delete(ctx api.Context, name string, options *api.DeleteOptions) ...@@ -402,7 +402,7 @@ func (e *Etcd) Delete(ctx api.Context, name string, options *api.DeleteOptions)
if pendingGraceful { if pendingGraceful {
return e.finalizeDelete(obj, false) return e.finalizeDelete(obj, false)
} }
if graceful && *options.GracePeriodSeconds > 0 { if graceful {
out := e.NewFunc() out := e.NewFunc()
lastGraceful := int64(0) lastGraceful := int64(0)
err := e.Storage.GuaranteedUpdate( err := e.Storage.GuaranteedUpdate(
......
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