kubernetes/pkg/controller
Kubernetes Submit Queue 0a4316f11e Merge pull request #32807 from jingxu97/stateupdateNeeded-9-15
Automatic merge from submit-queue

Fix race condition in setting node statusUpdateNeeded flag

This PR fixes the race condition in setting node statusUpdateNeeded flag
in master's attachdetach controller. This flag is used to indicate
whether a node status has been updated by the node_status_updater or
not. When updater finishes update a node status, it is set to false.
When the node status is changed such as volume is detached or new volume
is attached to the node, the flag is set to true so that updater can
update the status again. The previous workflow has a race condition as
follows
1. updater gets the currently attached volume list from the node which needs to be
updated.
2. A new volume A is attached to the same node right after 1 and set the
flag to TRUE
3. updater updates the node attached volume list (which does not include volume A) and then set the flag to FALSE.
The result is that volume A will be never added to the attached volume
list so at node side, this volume is never attached.

So in this PR, the flag is set to FALSE when updater tries to get the
attached volume list (as in an atomic operation). So in the above
example, after step 2, the flag will be TRUE again, in step 3, updater
does not set the flag if updates is sucessful. So after that, flag is
still TRUE and in next round of update, the node status will be updated.
2016-09-23 11:25:16 -07:00
..
certificates Merge pull request #32876 from errordeveloper/more-cert-utils 2016-09-22 01:29:46 -07:00
daemon Merge pull request #32877 from deads2k/client-09-fixup-lister 2016-09-16 22:39:37 -07:00
deployment controller: enhance timeout error message for Recreate deployments 2016-09-20 15:53:24 +02:00
disruption Merge pull request #33103 from deads2k/controller-03-kill-non-generatedclient 2016-09-22 11:37:01 -07:00
endpoint Merge pull request #33269 from deads2k/client-15-svc-lister 2016-09-23 03:10:57 -07:00
garbagecollector Avoid unnecessary API calls from GC 2016-09-18 07:09:11 +02:00
informers convert daemonset controller to shared informers 2016-09-16 10:40:46 -04:00
job fix job controller hot loop 2016-09-20 22:25:11 +08:00
namespace move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
node Merge pull request #32655 from dshulyak/fix_node_fake_update 2016-09-22 07:43:18 -07:00
petset switch controller manager to generated clientset 2016-09-20 12:53:47 -04:00
podautoscaler move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
podgc move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
replicaset change factorization of listers to make them easier to add 2016-09-16 14:49:00 -04:00
replication Revert "simplify RC and SVC listers" 2016-09-21 15:49:38 -07:00
resourcequota move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
route Don't update NodeNetworkUnavailable condition if it's already set correctly 2016-09-16 21:03:20 +02:00
scheduledjob Move ScheduledJob controller to use generated clientset 2016-09-14 11:27:29 +02:00
service fix up service lister 2016-09-22 09:12:37 -04:00
serviceaccount move core resource registry packages 2016-09-21 10:11:50 -04:00
volume Merge pull request #32807 from jingxu97/stateupdateNeeded-9-15 2016-09-23 11:25:16 -07:00
controller_ref_manager.go fix tests; convert IsPodActive to operate on *Pod 2016-08-17 13:05:37 -07:00
controller_utils_test.go fix tests; convert IsPodActive to operate on *Pod 2016-08-17 13:05:37 -07:00
controller_utils.go move informer and controller to pkg/client/cache 2016-09-15 12:50:08 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
lookup_cache.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
OWNERS Remove myself from a bunch of OWNERS files, as I am too overloaded 2016-05-11 13:34:51 -07:00