Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
d867cbfa
Commit
d867cbfa
authored
6 years ago
by
Lang Martin
Browse files
Options
Download
Email Patches
Plain Diff
structs validate requires Canary for AutoPromote
parent
2772cc26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/structs/structs.go
+3
-0
nomad/structs/structs.go
with
3 additions
and
0 deletions
+3
-0
nomad/structs/structs.go
+
3
-
0
View file @
d867cbfa
...
...
@@ -3880,6 +3880,9 @@ func (u *UpdateStrategy) Validate() error {
if
u
.
Canary
<
0
{
multierror
.
Append
(
&
mErr
,
fmt
.
Errorf
(
"Canary count can not be less than zero: %d < 0"
,
u
.
Canary
))
}
if
u
.
Canary
==
0
&&
u
.
AutoPromote
{
multierror
.
Append
(
&
mErr
,
fmt
.
Errorf
(
"Auto Promote requires a Canary count greater than zero"
))
}
if
u
.
MinHealthyTime
<
0
{
multierror
.
Append
(
&
mErr
,
fmt
.
Errorf
(
"Minimum healthy time may not be less than zero: %v"
,
u
.
MinHealthyTime
))
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment