Skip to content

Commit

Permalink
Update canary-auto-promote feature addition based on feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasell committed Oct 19, 2017
1 parent 7a151d5 commit 87df1ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Levant supports a number of command line arguments which provide control over th

* **-address** (string: "http://localhost:4646") The HTTP API endpoint for Nomad where all calls will be made.

* **-canary-auto-promote** (int: 0)
* **-canary-auto-promote** (int: 0) The time period in seconds that Levant should wait for before attempting to promote a canary deployment.

* **-log-level** (string: "INFO") The level at which Levant will log to. Valid values are DEBUG, INFO, WARNING, ERROR and FATAL.

Expand Down
4 changes: 2 additions & 2 deletions levant/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (c *nomadClient) canaryAutoPromote(depID string, waitTime int, shutdownChan
waitTime, depID)

// Check the deployment is healthy before promoting.
if healthly := c.checkCanaryDeploymentHealth(depID); !healthly {
if healthy := c.checkCanaryDeploymentHealth(depID); !healthy {
logging.Error("levant/deploy: the canary deployment %s has unhealthy allocations, unable to promote", depID)
close(deploymentChan)
return
Expand Down Expand Up @@ -213,7 +213,7 @@ func (c *nomadClient) checkCanaryDeploymentHealth(depID string) (healthy bool) {

// If zero unhealthy tasks were found, continue with the auto promotion.
if unhealthy == 0 {
logging.Info("levant/deploy: deployment %s has 0 unhealthy allocations", depID)
logging.Debug("levant/deploy: deployment %s has 0 unhealthy allocations", depID)
healthy = true
}

Expand Down

0 comments on commit 87df1ed

Please sign in to comment.