Merge branch 'master' of github.com:hashicorp/nomad

This commit is contained in:
Alex Dadgar
2016-06-16 13:12:42 -07:00
2 changed files with 13 additions and 2 deletions

View File

@@ -146,7 +146,13 @@ func (r *TaskRunner) RestoreState() error {
}
// Restore fields
r.task = snap.Task
if snap.Task == nil {
err := fmt.Errorf("task runner snapshot include nil Task")
r.logger.Printf("[ERR] client: %v", err)
return err
} else {
r.task = snap.Task
}
r.artifactsDownloaded = snap.ArtifactDownloaded
if err := r.setTaskEnv(); err != nil {

View File

@@ -209,7 +209,12 @@ If you prefer to use the traditional port-mapping method, you can specify the
task "redis" {
driver = "docker"
port "redis" {}
resources {
network {
mbits = 20
port "redis" {}
}
}
config {
image = "redis"