diff --git a/jobspec/parse_group.go b/jobspec/parse_group.go index 060af851f..e138d44e2 100644 --- a/jobspec/parse_group.go +++ b/jobspec/parse_group.go @@ -57,6 +57,7 @@ func parseGroups(result *api.Job, list *ast.ObjectList) error { "volume", "scaling", "stop_after_client_disconnect", + "max_client_disconnect", } if err := checkHCLKeys(listVal, valid); err != nil { return multierror.Prefix(err, fmt.Sprintf("'%s' ->", n)) diff --git a/jobspec/parse_test.go b/jobspec/parse_test.go index 9c6fc1755..d261b6388 100644 --- a/jobspec/parse_test.go +++ b/jobspec/parse_test.go @@ -201,6 +201,7 @@ func TestParse(t *testing.T) { }, }, StopAfterClientDisconnect: timeToPtr(120 * time.Second), + MaxClientDisconnect: timeToPtr(120 * time.Hour), ReschedulePolicy: &api.ReschedulePolicy{ Interval: timeToPtr(12 * time.Hour), Attempts: intToPtr(5), diff --git a/jobspec/test-fixtures/basic.hcl b/jobspec/test-fixtures/basic.hcl index 5b1fa4036..f7be15dd6 100644 --- a/jobspec/test-fixtures/basic.hcl +++ b/jobspec/test-fixtures/basic.hcl @@ -158,6 +158,7 @@ job "binstore-storagelocker" { } stop_after_client_disconnect = "120s" + max_client_disconnect = "120h" task "binstore" { driver = "docker"