mirror of
https://github.com/rancher/rke.git
synced 2025-08-31 14:36:32 +00:00
Merge pull request #62 from galal-hussein/fix_rolling_update
Fix rolling update bug for multi master Nginx
This commit is contained in:
@@ -52,6 +52,9 @@ func (c *Cluster) GetClusterState() (*Cluster, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to Get Kubernetes certificates: %v", err)
|
||||
}
|
||||
// setting cluster defaults for the fetched cluster as well
|
||||
currentCluster.setClusterDefaults()
|
||||
|
||||
if err := currentCluster.InvertIndexHosts(); err != nil {
|
||||
return nil, fmt.Errorf("Failed to classify hosts from fetched cluster: %v", err)
|
||||
}
|
||||
|
@@ -17,7 +17,9 @@ func RollingUpdateNginxProxy(cpHosts []hosts.Host, workerHosts []hosts.Host) err
|
||||
nginxProxyEnv := buildProxyEnv(cpHosts)
|
||||
for _, host := range workerHosts {
|
||||
imageCfg, hostCfg := buildNginxProxyConfig(host, nginxProxyEnv)
|
||||
return docker.DoRollingUpdateContainer(host.DClient, imageCfg, hostCfg, NginxProxyContainerName, host.Address, WorkerRole)
|
||||
if err := docker.DoRollingUpdateContainer(host.DClient, imageCfg, hostCfg, NginxProxyContainerName, host.Address, WorkerRole); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user