Commit Graph

26 Commits (afd7d77a247d197d255307163c14e6b36d6269e3)

Author SHA1 Message Date
Clayton Coleman aee73d6729 Do not log "event already exists" errors
When the server rejects an event because it has already been created, log it
at a very high level (debug) instead of the default level. Duplicate events
typically only occur due to programmer error or failure conditions, so they
can safely be ignored in production environments.
2015-04-04 11:35:56 -04:00
Federico Simoncelli 8849cf21d3 event: fallback to creation when update fails
Updating may fail because the item was removed from apiserver. This
patch makes sure to retry using creation instead of update.

Fixes #6289

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-04-02 09:15:01 -04:00
Federico Simoncelli b276132e21 event: improve logging on recording failure
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2015-04-02 09:07:32 -04:00
saadali e0f71cb21f Make each new instance of kubelet generate a new event channel (instead of reusing existing). 2015-03-30 14:22:16 -07:00
Paul Morie a373b234e9 Fix event recorder not to log events without a reference 2015-03-10 11:36:43 -04:00
Paul Morie 02b18edac6 Allow multiple sources to be used with record package 2015-03-05 13:54:29 -05:00
saadali 2735e6a495 Switch events history to use LRU cache instead of map 2015-02-17 11:40:40 -08:00
saadali 033577efa2 Optimize etcd storage by compressing recurring events in to a single event 2015-02-11 22:57:44 -08:00
saadali 79cbcf918e Modify Event struct to allow compressing multiple recurring events in to a single event.
# *** ERROR: *** Some API files are missing the required field descriptions
# Add description tags to all non-inline fields in the following files:
#   pkg/api/v1beta1/types.go
#   pkg/api/v1beta2/types.go
#
# Your commit will be aborted unless you fix these.
#   COMMIT_BLOCKED_ON_DESCRIPTION
2015-02-05 21:50:29 -08:00
Daniel Smith 2bee4ac572 Merge pull request #3381 from a-robinson/events2
Improve client recording of events such that clients are
2015-01-14 15:21:16 -08:00
saadali 90dfdcecd5 Remove CONDITION from event object completely
# *** ERROR: *** Some files have not been gofmt'd.  To fix these
# errors, run gofmt -s -w <file>, or cut and paste the following:
#   gofmt -s -w pkg/kubecfg/resource_printer.go pkg/proxy/config/config.go pkg/runtime/types.go
#
# Your commit will be aborted unless you override this warning. To
# commit in spite of these format errors, delete the following line:
#   COMMIT_BLOCKED_ON_GOFMT
2015-01-14 14:17:16 -08:00
Alex Robinson 90e1d58fa6 Add a unit test for watch.Broadcaster DropIfChannelFull and a couple small fixes 2015-01-14 04:36:29 +00:00
Alex Robinson 3eaf362f8e Switch the client event recorder from exponential backoff to one random
sleep on the first failed request followed by a constant amount on all
subsequent consecutive failed requests.
2015-01-13 19:48:41 +00:00
Alex Robinson be6b1cf0e2 Push the full channel logic into the implementation of the broadcaster
in watch/mux.go rather than being in the client event recording code.
2015-01-13 02:22:30 +00:00
Alex Robinson 702a6f96b4 Improve client recording of events such that clients are
(1) less likely to drop events if the master is unavailable
(2) less likely to have goroutines block while trying to record an
event.

Done as part of #3163 to ensure that minions operate well even while the
master is down.
2015-01-13 02:22:30 +00:00
Clayton Coleman cacd2ac40b Shorten client/record test by changing default value
Also add opinionated comment about using singletons in code
2015-01-09 13:16:30 -05:00
Dawn Chen e3c019128e Add EventSource to api to have both Component and Host information. 2015-01-06 16:08:20 -08:00
Clayton Coleman 88715cc6ef Rename Event.Status to Event.Condition to match v1beta3 agreement
Question - should this be a phase?  Seems like no, since phase implies
defined lifecycle and this field is explicitly not defined.
2014-12-16 09:43:10 -05:00
Eric Tune 3f285269cc Rename watch.Mux -> watch.Broadcaster
A few reasons:
- Mux is already widely used in the codebase to refer to a http handler mux.
- Original meaning of Mux was something which sent a chose one of several inputs to
  and output.  This sends one output to all outputs.  Broadcast captures that idea
  better.
- Aligns with similar class config.Broadcaster (see #2747)
2014-12-04 00:30:51 -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 25bd151d86 Make fieldPath part of getting a reference rather than part of making an event. 2014-11-05 15:09:14 -08:00
Daniel Smith a7cc25f7ff Add namespaces to event creation path. 2014-10-29 18:03:14 -07:00
derekwaynecarr 580cb5ea4f Rework client.Interface 2014-10-24 11:47:30 -04:00
Daniel Smith ad1212b9af Add client time to events 2014-10-22 11:12:17 -07:00
deads2k 2c35c06727 report originating error for GetReference failure 2014-10-17 12:52:41 -04:00
Daniel Smith 95b855b8e6 Add event client and easy creation library 2014-10-15 11:42:05 -07:00