mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Define BootstrapExepct as an int32 so it can be manipulated atomically.
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/nomad/client"
|
||||
@@ -110,7 +111,7 @@ func (a *Agent) serverConfig() (*nomad.Config, error) {
|
||||
if a.config.Server.BootstrapExpect == 1 {
|
||||
conf.Bootstrap = true
|
||||
} else {
|
||||
conf.BootstrapExpect = a.config.Server.BootstrapExpect
|
||||
atomic.StoreInt32(&conf.BootstrapExpect, int32(a.config.Server.BootstrapExpect))
|
||||
}
|
||||
}
|
||||
if a.config.DataDir != "" {
|
||||
|
||||
Reference in New Issue
Block a user