Skip to content

Commit

Permalink
Fix zero downtime when app fails to run
Browse files Browse the repository at this point in the history
- don't need to restart again as we use --strategy=rolling which handles
recovery for us

Co-authored-by: David Alvarado <[email protected]>
Co-authored-by: Michael Oleske <[email protected]>
  • Loading branch information
dalvarado and moleske committed Feb 1, 2023
1 parent c96b4fc commit acf2fac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion changer/changer.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (c *Changer) recoverRestart(appName, appGUID, oldStack, packageGUID, oldDro

fmt.Printf(RestagingMsg, oldStack)

return c.restartNonZDT(appName, appGUID)
return nil
}

func parsePackageFromDroplet(curDropletResp []string) (string, error) {
Expand Down
3 changes: 2 additions & 1 deletion integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func testIntegration(t *testing.T, when spec.G, it spec.S) {
//TODO: understand why we can't confirm zero down
breaker := make(chan bool)
go confirmZeroDowntime(app, breaker, "when the cannot run on the target stack it restarts itself on the old stack")
defer cleanUpRoutines(breaker)
// defer cleanUpRoutines(breaker)

cmd := exec.Command("cf", "change-stack", app.Name, newStack)
out, err := cmd.CombinedOutput()
Expand All @@ -156,6 +156,7 @@ func testIntegration(t *testing.T, when spec.G, it spec.S) {
fmt.Println("eventually")
return app.GetBody("/")
}, 3*time.Minute).Should(ContainSubstring(appBody))
close(breaker)
})
})
})
Expand Down

0 comments on commit acf2fac

Please sign in to comment.