Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #52 from ibuildthecloud/fix-scale-0
Browse files Browse the repository at this point in the history
Fix setting target scale to zero on start
  • Loading branch information
ibuildthecloud committed Jul 27, 2015
2 parents 4fe55d6 + 09e5413 commit 459a978
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions upgrade/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ func Upgrade(p *project.Project, from, to string, opts UpgradeOpts) error {
return fmt.Errorf("%s is not a Rancher service", to)
}

if err := rToService.Create(); err != nil {
if service, err := rToService.RancherService(); err != nil {
return err
}
} else if service == nil {
if err := rToService.Create(); err != nil {
return err
}

if err := rToService.Scale(0); err != nil {
return err
if err := rToService.Scale(0); err != nil {
return err
}
}

if err := rToService.Up(); err != nil {
Expand Down

0 comments on commit 459a978

Please sign in to comment.