Skip to content

Commit

Permalink
Merge pull request #62 from galal-hussein/fix_rolling_update
Browse files Browse the repository at this point in the history
Fix rolling update bug for multi master Nginx
  • Loading branch information
galal-hussein authored Nov 28, 2017
2 parents 5842cd8 + 7af9ffb commit 5876560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cluster/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 3 additions & 1 deletion services/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 5876560

Please sign in to comment.