Commit Graph

225 Commits (8cabbcbdcfa2bdf17c9ddc1db6754c862d6e08a2)

Author SHA1 Message Date
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
k8s-merge-robot 59b88d7ab6 Merge pull request #26925 from ZTE-PaaS/249043822-patch-1
Automatic merge from submit-queue

optimize deleteFromIndices method of thread_safe_store

As all methods of thread_safe_store are threadsafe, so i think, in deleteFromIndices method, if the index is nil, need not run the for structure below
2016-06-25 12:57:50 -07:00
Jan Safranek c9a60e2d2c Rephrase 'pv not found in cache' warnings.
When kubelet starts a pod that refers to non-existing PV, PVC or Node, it
should clearly show that the requested element does not exist.

Previous "PersistentVolumeClaim 'default/ceph-claim-wm' is not in cache"
looks like random kubelet hiccup, while "PersistentVolumeClaim
'default/ceph-claim-wm' not found" suggests that the object may not exist at
all and it might be an user error.

Fixes #27523
2016-06-21 14:56:11 +02:00
Wojciech Tyczynski ccd42e9236 Fix bugs in DeltaFIFO 2016-06-15 15:08:21 +02:00
Wojciech Tyczynski 5d702a32c1 Fix race in informer 2016-06-14 16:40:12 +02:00
Ke Zhang 5dbf21aa13 optimize deleteFromIndices method in thread_safe_store.go 2016-06-14 09:21:44 +08:00
Alex Mohr edda837142 Merge pull request #25599 from caesarxuchao/orphaning-finalizer
Add orphaning finalizer logic to GC
2016-05-26 13:19:19 -07:00
Matt Liggett 1fee311282 Refactor *Namespacer.List().
Refactor storePodsNamespacer.List() and
storeReplicationContollersNamespacer.List().  They are the same
function, just with different signatures.

This fixes a bug where, when we fell back on a brute force approach, we
were still returning an error.

Also change to explicit return without named return values.
2016-05-25 17:18:28 -07:00
Chao Xu 1665546d2d add finalizer logics to the API server and the garbage collector; handling DeleteOptions.OrphanDependents in the API server 2016-05-24 13:07:28 -07:00
Wojciech Tyczynski 051fca3c79 Fix govet error in reflect_resync test 2016-05-23 12:50:46 +02:00
Wojciech Tyczynski 71726a8ad0 Fix reflector test 2016-05-23 12:07:11 +02:00
Piotr Szczesniak d92c151fec Merge pull request #26013 from xiang90/fix_test
cache: fix flaky resync test
2016-05-23 09:23:26 +02:00
Xiang Li abbbd7c2f2 cache: reflector should never stop watching
A recent change tries to separate resync and relist. The motivation
was to avoid triggering relist when a resync is required.

However, the change is not effective since it stops the watcher. As hongchao
mentioned in the original comment, today's storage interface will not deliever
any progress notification to the watch chan. So any watcher that does not receive
events for the last few seconds will not be able to catch up from the previous
index after a hard close since the index of the last received event is out of
the cache window inside etcd2.

This pull request tries to fix this issue by not stoping watcher when a resync is
required.
2016-05-22 18:04:20 -07:00
Xiang Li f31ec95f05 cache: fix flaky resync test 2016-05-22 10:57:00 -07:00
Robert Rati e388c137bb Separate sync and list functionality in the reflector. #23394 2016-05-19 07:41:24 -04:00
Daniel Smith 6dc1437015 Merge pull request #25671 from deads2k/fix-add-indexer
make addIndexers safe for sharedInformer
2016-05-18 14:48:43 -07:00
deads2k 4a39cc9dd3 make addIndexers safe for sharedInformer 2016-05-16 10:15:05 -04:00
Chao Xu c73406bcfe the garbage collector controller 2016-05-15 16:04:19 -07:00
k8s-merge-robot 5988080396 Merge pull request #23795 from mqliang/rc-ns-index
Automatic merge from submit-queue

add namespace index for cache

@wojtek-t 

Implement in this approach make the change of lister.go small, but we should replace all `NewInformer()` to `NewIndexInformer()`, even when someone not want to filter by namespace(eg. gc_controller and scheduler). Any suggestion?
2016-05-08 12:09:01 -07:00
Robert Bailey 1df0dfdaa8 Merge pull request #25122 from nowprovision/reflector-loop-missing-errorhandler-fix
Handle possible error in client reflector run loops
2016-05-06 14:06:35 -07:00
Robert Bailey 64e1240180 Merge pull request #25141 from jsafrane/devel/fix-store-race
Make threadSafeMap.ListIndexFuncValues thread safe.
2016-05-06 13:50:36 -07:00
mqliang c10f43a2e5 implement AddIndexers for SharedIndexInformer 2016-05-06 21:23:18 +08:00
mqliang 9011207f18 add namespace index to rc and pod 2016-05-06 17:12:36 +08:00
Prashanth Balasubramanian 6bc3052551 PetSet alpha controller 2016-05-04 18:39:17 -07:00
Jan Safranek 42d940735b Make threadSafeMap.ListIndexFuncValues thread safe.
Surprisingly, this method does not lock and I get data race reports
in my persistent volume unit tests (which use this map).
2016-05-04 18:18:00 +02:00
Matt Freeman 89e5e81bea Handle possible error in client reflector run loops 2016-05-04 05:01:54 +00:00
k8s-merge-robot d0b887e4e0 Merge pull request #24595 from zhouhaibing089/httpserverclose
Automatic merge from submit-queue

Uncomment the code that caused by #19254

Fix https://github.com/kubernetes/kubernetes/issues/24546.

@lavalamp
2016-04-28 01:41:16 -07:00
zhouhaibing089 bf1a3f99c0 Uncomment the code that cause by #19254 2016-04-25 23:21:31 +08:00
Maciej Szulik a3b4447305 Move internal types of job from pkg/apis/extensions to pkg/apis/batch 2016-04-25 11:03:54 +02:00
Vincent Behar efe7775578 fix typo 2016-04-04 14:40:01 +02:00
Clayton Coleman 206308ea14 Provide better log output and name for reflectors
Reflectors started from goroutines are broken because Go doesn't allow
runtime.Callers to see the spawning goroutine. Do a best effort parse of
the call stack for now.

Add logging so that we can easily see which reflectors processes launch,
and measure in logs the frequency of sync intervals.
2016-03-24 17:37:31 -04:00
Joshua Piccari f5f83b076a Improve go report card by fixing typos in comments 2016-03-04 18:30:59 -08:00
Kris e664ef922f Move restclient to its own package 2016-02-29 12:05:13 -08:00
Prashanth Balasubramanian 45eb835833 Lock across item expiration in the ttl store. 2016-02-24 14:06:18 -08:00
Janet Kuo cf2bbc0d6d Fix a bug when getting deployments for RS 2016-02-19 11:42:17 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Madhusudan.C.S 525d7a7732 Fix the label selector to selector conversion error string.
The message as it is framed right now does not make any sense for the
end users of our system. It might even lead to confusion. So this is
attempt to make the error message less confusing.
2016-02-10 09:43:30 -08:00
Madhusudan.C.S ed7ad6dcf3 Make deployments work. 2016-02-08 21:27:49 -08:00
Madhusudan.C.S 518f08aa7c Move Deployments to ReplicaSets and switch the Deployment selector to the new LabelSelector.
Update the Deployments' API types, defaulting code, conversions, helpers
and validation to use ReplicaSets instead of ReplicationControllers and
LabelSelector instead of map[string]string for selectors.

Also update the Deployment controller, registry, kubectl subcommands,
client listers package and e2e tests to use ReplicaSets and
LabelSelector for Deployments.
2016-02-08 21:27:38 -08:00
Jan Chaloupka 4389b3f0d6 Rewritte util.* -> wait.* wherever reasonable 2016-02-07 12:02:20 +01:00
Daniel Smith 9b68e8ec2b Merge pull request #20269 from mqliang/sync-delta-fifo
add a HasSynced() for DeltaFIFO and FIFO, method, which is very helpful for Informer
2016-02-05 15:51:50 -08:00
Eric Tune 6133cb1f21 Move extensions.LabelSelector to unversioned.
Move type LabelSelector and type LabelSelectorRequirement from pkg/apis/extensions
This avoids an import loop when Job (and later DaemonSet, Deployment, ReplicaSet)
are moved out of extensions to new api groups.

Also Move LabelSelectorAsSelector utility from pkg/apis/extensions/ to pkg/api/unversioned/
Also its test.
Also LabelSelectorOp* constants.
Also the pkg/apis/extensions/validation functions ValidateLabelSelectorRequirement and
ValidateLabelSelector move to pkg/api/unversioned

The related type in pkg/apis/extensions/v1beta1/ is staying there.  I might move
it in another PR if neccessary.
2016-02-04 13:46:34 -08:00
mqliang 8e615df000 fix the HasSynced() bug for Informer 2016-02-03 11:40:11 +08:00
Jeff Lowdermilk caa9433234 Merge pull request #20433 from lavalamp/fix-bad-rv
Add timeout, fix potential startup hang
2016-02-02 17:27:23 -08:00
Daniel Smith 4a7d70aef1 extend fake clock 2016-02-01 15:36:15 -08:00
harry 1032067ff9 Replace runtime reference by pkg 2016-02-01 21:06:44 +08:00
k8s-merge-robot 4ed43968e0 Merge pull request #19581 from janetkuo/deployment-version
Auto commit by PR queue bot
2016-01-30 13:34:59 -08:00
Janet Kuo 42f712467e Use ListOptions when listing RCs in deployment 2016-01-30 12:04:35 -08:00
Clayton Coleman 8692d260f8 Use Parameter codec in request.VersionedParams() 2016-01-30 14:14:20 -05:00
k8s-merge-robot 783d1d00d7 Merge pull request #20139 from janetkuo/rcList-namespace
Auto commit by PR queue bot
2016-01-30 09:42:35 -08:00