qmsk / clusterf

Clustered IPVS load balancer control plane with Docker integration
MIT License
35 stars 4 forks source link

Add ConfigSource #8

Closed akurniko closed 8 years ago

akurniko commented 8 years ago

Add tags for all objects on where they were configured from (currently file or etcd). Only apply DelConfig to routes that have the matching configuration source.

SpComb commented 8 years ago

Hmm, reading the code I suppose this fixes the recursive DelConfig handling, but I'm not entirely sure if it actually fixes the NewConfig issue described in #7. Have you tested that case? :)

SpComb commented 8 years ago

I added a TestNewConfigRoute in a1639a1 for #7, see if you can get that to pass.

Adding a test-case for the recursive DelConfig is slightly more complicated since it will require mocking out the IPVSDriver, so that's not there yet.

akurniko commented 8 years ago

Only tested NewConfig issue by running once :) But lets split, this one now only adds ConfigSource to all configuration objects.

SpComb commented 8 years ago

Added the Node.Source to all the TestSync cases, and merged with passing tests.