• k8s-merge-robot's avatar
    Merge pull request #27028 from mfanjie/fix_cluster_sync_loop · 3cc43eb0
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    federation service controller: fixing a bug so that existing services are created in newly registered clusters
    
    A defect on federation service controller.
    Steps to recreate:
    1. boot federation control plane
    2. create a service and then register a new cluster
    
    Root cause:
    the right sequence should be  
    ```
    servicesToUpdate = s.serviceCache.allServices()
    ```
    then
    ```
    s.updateAllServicesToCluster(servicesToUpdate, newCluster) 
    ```
    then
    ```
    servicesToUpdate = s.updateDNSRecords(servicesToUpdate, newClusters)
    ```
    Now the first two lines' sequence is on the contrary, so when updateDNSRecords return no error, the service will be removed from  servicesToUpdate, and updateAllServicesToCluster get nothing to update.
    
    This PR make the call sequence correct.
    
    [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
    3cc43eb0
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api/swagger-spec Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
contrib Loading commit data...
docs Loading commit data...
examples Loading commit data...
federation Loading commit data...
hack Loading commit data...
hooks Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
release Loading commit data...
test Loading commit data...
third_party Loading commit data...
vendor Loading commit data...
www Loading commit data...
.generated_docs Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIB.md Loading commit data...
CONTRIBUTING.md Loading commit data...
DESIGN.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
Vagrantfile Loading commit data...
code-of-conduct.md Loading commit data...