Do service creation/update/deletion work in a pool of goroutines, protecting

each service with a lock to ensure that no two goroutines will process a
service at the same time. This is needed to avoid weird race conditions.
This commit is contained in:
Alex Robinson
2015-04-09 20:48:27 +00:00
parent 9a351e3670
commit fc08a0a71b
4 changed files with 107 additions and 72 deletions

View File

@@ -50,7 +50,6 @@ type CMServer struct {
ClientConfig client.Config
CloudProvider string
CloudConfigFile string
ClusterName string
MinionRegexp string
NodeSyncPeriod time.Duration
ResourceQuotaSyncPeriod time.Duration
@@ -102,7 +101,6 @@ func (s *CMServer) AddFlags(fs *pflag.FlagSet) {
client.BindClientConfigFlags(fs, &s.ClientConfig)
fs.StringVar(&s.CloudProvider, "cloud_provider", s.CloudProvider, "The provider for cloud services. Empty string for no provider.")
fs.StringVar(&s.CloudConfigFile, "cloud_config", s.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.")
fs.StringVar(&s.ClusterName, "cluster_name", s.ClusterName, "The instance prefix for the cluster")
fs.StringVar(&s.MinionRegexp, "minion_regexp", s.MinionRegexp, "If non empty, and --cloud_provider is specified, a regular expression for matching minion VMs.")
fs.DurationVar(&s.NodeSyncPeriod, "node_sync_period", s.NodeSyncPeriod, ""+
"The period for syncing nodes from cloudprovider. Longer periods will result in "+