Clayton Coleman
3da15535b6
Provide backpressure to clients when etcd goes down
...
When etcd is down today we don't specifically handle the error involved,
which means clients get a generic 500 error. This commit adds a formal
error type internally for both WatchExpired and EtcdUnreachable, and
then converts them to api/errors before returning to the client. It also
upgrades the client to retry on any 429 or 5xx error that has a
Retry-After header, instead of just 429.
In combination, this allows the apiserver to exert backpressure on
controllers that are hotlooping. Picked 2 seconds by default, but we
could potentially ramp that up even further in a future iteration.
2015-11-04 16:05:12 -05:00
eulerzgy
f8f9afb874
alias local packagename for pkg/util/errors
2015-10-18 09:37:46 +08:00
Kris
f4ad00d9ae
Moving Status object to a common package
2015-09-17 14:09:53 -07:00
Veres Lajos
9f77e49109
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 22:31:48 +01:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
Wojciech Tyczynski
3cbbe72f9f
Move etcd storage to pkg/storage/etcd
2015-07-30 15:42:06 +02:00
Mike Danese
db179e4cf4
Merge pull request #10346 from jhadvig/comment_fix
...
Fix NewNotFound method name in comments
2015-07-24 08:08:57 -07:00
nikhiljindal
1517b66001
Updating an error to apierror
2015-07-15 16:43:59 -07:00
jhadvig
7df1d33204
Fix NewNotFound method name in comments
2015-07-02 12:41:12 +02:00
nikhiljindal
d82d5d11a7
Revert "Merge pull request #10246 from nikhiljindal"
...
This reverts commit a902a2f014
, reversing
changes made to 7df8d76a93
.
2015-07-01 11:07:18 -07:00
CJ Cullen
12553c9b91
Fix errors test
2015-06-30 16:43:33 -07:00
Zach Loafman
a902a2f014
Merge pull request #10246 from nikhiljindal/minionPrefix
...
Return api/errors instead of raw etcd errors
2015-06-30 15:47:58 -07:00
Tim Hockin
15766bfbbc
Don't repeat field name in errors
2015-06-30 11:58:21 -07:00
nikhiljindal
4b7f7ce535
Dont return raw etcd errors
2015-06-29 16:18:46 -07:00
nikhiljindal
3b3ee0ed77
Improving an error message
2015-06-25 13:08:09 -07:00
nikhiljindal
7cc50448e3
Updating StatusDetails.ID to Name in internal API
2015-06-05 07:17:02 -07:00
Eric Paris
6b3a6e6b98
Make copyright ownership statement generic
...
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
nikhiljindal
f9132dc572
Registering serviceErrorHandler with go-restful
2015-04-16 14:59:44 -07:00
Jordan Liggitt
dde8c7156b
Add a more descriptive message for 405 errors
2015-04-15 11:28:12 -04:00
Clayton Coleman
323a44e54a
Make kubectl errors even more user-friendly
...
Omit glog prefix when v < 2, show multiline errors for configuration
problems, add new generic messages for server errors that hide some
complexity that is not relevant for users.
2015-04-02 01:40:15 -04:00
Clayton Coleman
1233843a1d
Add a new generic error that can indicate a server response was underspecified
...
Allows clients to distinguish between a server that returns us an error we
recognize, and errors that are generic HTTP (due to an intervening proxy)
2015-04-02 01:39:57 -04:00
Clayton Coleman
aa44d29d10
Updated documentation and adjusted field names
2015-03-27 17:08:59 -04:00
Clayton Coleman
30358e8b04
Add more specific error handling and handle generic errors more effectively
...
The client library should type more generic errors from the server.
2015-03-26 17:30:13 -04:00
Clayton Coleman
65425f690c
Move field errors to pkg/util/fielderrors
...
Allows pkg/api to take a reference to labels.Selector and fields.Selector
2015-03-22 17:43:34 -04:00
gmarek
a3b137ce8e
Cleanup of validation.go
2015-03-18 08:59:35 +01:00
Brendan Burns
f505a33998
Differentiate between server error messages and client error messages in kubectl
2015-03-07 11:39:23 +01:00
gmarek
726a5af075
Loosen label and annotation validation and related tests
2015-03-06 08:23:22 +01:00
Clayton Coleman
619f3a6804
Allow ValidationErrorList to be filtered
...
Expose basic filters on an error list to ignore certain error types.
This can be used by client code to ignore errors on common schema
types like "metadata.name" or the NotFound error type.
2015-02-16 17:45:54 -05:00
Clayton Coleman
c24f4a24b4
Rename TryAgainLater status code to ServerTimeout
2015-02-12 15:01:12 -05:00
Clayton Coleman
d167c11b59
Remove layers of indirection between apiinstaller and resthandler
...
Make the RESTHandler feel more go-restful, set the stage for adding
new types of subresource collections.
2015-02-11 16:26:06 -05:00
saadali
a41f520bf0
Add "Update Event" to Kubernetes API
2015-02-05 00:07:51 -08:00
Clayton Coleman
1588970ec4
Turn 409 into 500 Try Again Later when using generateName
...
If a client says they want the name to be generated, a 409 is
not appropriate (since they didn't specify a name). Instead, we
should return the next most appropriate error, which is a 5xx
error indicating the request failed but the client *should* try
again. Since there is no 5xx error that exactly fits this purpose,
use 500 with StatusReasonTryAgainLater set.
This commit does not implement client retry on TryAgainLater, but
clients should retry up to a certain number of times.
2015-02-02 14:46:25 -05:00
Tim Hockin
d01ea11a6e
Merge pull request #3856 from smarterclayton/validation_logic_needs_cleanup
...
Validation of ObjectMeta is inconsistently applied
2015-01-29 14:12:44 -08:00
Clayton Coleman
a0356bca96
Unify validation logic for create and update paths
...
Ensure ObjectMeta is consistently validated on both create and update
Make PortalIP uncleareable
2015-01-28 13:10:37 -05:00
Satnam Singh
3a9e6d8f29
Switch to use Too Many Requests response code
...
Name the 429 status code
2015-01-27 14:54:30 -08:00
Clayton Coleman
72cc17b41c
Omit empty quotes in message when required value field error type
2015-01-27 17:04:59 -05:00
Clayton Coleman
c6a2e574c2
Structure of BadRequest error should have Message set
2015-01-27 17:04:59 -05:00
derekwaynecarr
e5b550576c
Forbidden should not swallow the underlying error
2015-01-15 11:22:15 -05:00
Clayton Coleman
a52b216324
Add MethodNotSupported error
2015-01-12 12:05:04 -05:00
Daniel Smith
c81dda5d61
improve validation error message printing
2015-01-09 13:06:24 -08:00
Tim Hockin
4fcd496d59
change everything to use new util/errors
2015-01-08 22:10:03 -08:00
derekwaynecarr
a56087cdf8
Remove client from attributes, remove admission control interface, fix-up error codes
2015-01-07 14:42:31 -05:00
George Kuan
5e1fc1f4e0
Fixes #1605 : make ErrorList introspectable by replacing ErrorList and
...
ErrorList#ToError with []error and util.SliceToError() respectively
2014-12-12 10:56:31 -08:00
Tim Hockin
ff8c5f9415
Add a Detail field to Validation Error
2014-11-24 17:28:42 -08:00
Tim Hockin
b08e5b24b0
Change ValidationError to a pointer
...
In Prep for adding at leats one more field, make this operate more list
StatusError.
2014-11-24 17:28:42 -08:00
Tim Hockin
ea960711ff
Clean up error logs.
...
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines). Just accumulated nits.
2014-11-21 09:45:26 +08:00
Daniel Smith
4437f03dbf
Don't hold up the entire event queue for a single bad event. Also, don't retry forever.
2014-11-20 16:01:42 -08:00
Daniel Smith
9430bb38b8
Merge pull request #2282 from bgrant0607/docgen
...
Automatic API generation via go-restful
2014-11-14 13:12:25 -08:00
Brian Grant
7583e1a643
Automatic API generation by adopting go-restful
2014-11-14 16:49:19 +00:00
Yuki Yugui Sonoda
864bfb65da
Fixes golint errors in pkg/api.
2014-11-14 13:14:23 +09:00