Fix the proxier when a service with the same port is re-created, actually restart the proxy.

This commit is contained in:
Brendan Burns
2014-08-19 12:24:10 -07:00
parent 6c9fda472d
commit da74625ac6
2 changed files with 70 additions and 2 deletions

View File

@@ -199,10 +199,10 @@ func (proxier *Proxier) OnUpdate(services []api.Service) {
for _, service := range services {
activeServices.Insert(service.ID)
info, exists := proxier.getServiceInfo(service.ID)
if exists && info.port == service.Port {
if exists && info.active && info.port == service.Port {
continue
}
if exists {
if exists && info.port != service.Port {
proxier.StopProxy(service.ID)
}
glog.Infof("Adding a new service %s on port %d", service.ID, service.Port)