Skip to content

Commit

Permalink
Merge pull request #435 from rramkumar1/master
Browse files Browse the repository at this point in the history
BackendPool Update() should set backend service version
  • Loading branch information
MrHohn authored Aug 15, 2018
2 parents 3ec7acf + a727f62 commit 274a1e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pkg/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ func (b *Backends) Create(sp utils.ServicePort, hcLink string) (*composite.Backe

// Update implements Pool.
func (b *Backends) Update(be *composite.BackendService) error {
// Ensure the backend service has the proper version before updating.
be.Version = features.VersionFromDescription(be.Description)
if err := composite.UpdateBackendService(be, b.cloud); err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/backends/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ func (s *backendSyncer) ensureBackendService(sp utils.ServicePort) error {
return err
}
}
// Set composite backend service to the version required by current service port.
be.Version = version

needUpdate := ensureProtocol(be, sp)
needUpdate = ensureHealthCheckLink(be, hcLink) || needUpdate
needUpdate = ensureDescription(be, &sp) || needUpdate
Expand Down

0 comments on commit 274a1e5

Please sign in to comment.