Revert "Merge pull request #10246 from nikhiljindal"

This reverts commit a902a2f014, reversing
changes made to 7df8d76a93.
This commit is contained in:
nikhiljindal
2015-07-01 11:07:18 -07:00
parent 09df440b79
commit d82d5d11a7
8 changed files with 22 additions and 59 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package etcd
import (
"errors"
"fmt"
"sync"
@@ -30,8 +31,7 @@ import (
)
var (
// Placeholder error that should not be surfaced to the user.
errorUnableToAllocate = k8serr.NewInternalError(fmt.Errorf("unable to allocate"))
errorUnableToAllocate = errors.New("unable to allocate")
)
// Etcd exposes a service.Allocator that is backed by etcd.
@@ -121,9 +121,6 @@ func (e *Etcd) AllocateNext() (int, bool, error) {
}
return nil
})
if err != nil && err.Error() == errorUnableToAllocate.Error() {
err = nil
}
return offset, ok, err
}
@@ -164,10 +161,7 @@ func (e *Etcd) tryUpdate(fn func() error) error {
return existing, nil
}),
)
if err != nil {
err = etcderr.InterpretUpdateError(err, e.kind, "")
}
return err
return etcderr.InterpretUpdateError(err, e.kind, "")
}
// Refresh reloads the RangeAllocation from etcd.