Merge pull request #2735 from hashicorp/f-no_host_uuid-true

Default no_host_uuid to true instead of false
This commit is contained in:
Michael Schurter 2017-07-03 13:18:25 -07:00 committed by GitHub
commit d9e032aabf
8 changed files with 9 additions and 13 deletions

View File

@ -210,6 +210,7 @@ func DefaultConfig() *Config {
GCDiskUsageThreshold: 80,
GCInodeUsageThreshold: 70,
GCMaxAllocs: 50,
NoHostUUID: true,
}
}

View File

@ -59,7 +59,7 @@ client {
gc_disk_usage_threshold = 82
gc_inode_usage_threshold = 91
gc_max_allocs = 50
no_host_uuid = true
no_host_uuid = false
}
server {
enabled = true

View File

@ -543,6 +543,7 @@ func DefaultConfig() *Config {
GCDiskUsageThreshold: 80,
GCInodeUsageThreshold: 70,
GCMaxAllocs: 50,
NoHostUUID: true,
},
Server: &ServerConfig{
Enabled: false,
@ -1003,7 +1004,8 @@ func (a *ClientConfig) Merge(b *ClientConfig) *ClientConfig {
if b.GCMaxAllocs != 0 {
result.GCMaxAllocs = b.GCMaxAllocs
}
if b.NoHostUUID {
// NoHostUUID defaults to true, merge if false
if !b.NoHostUUID {
result.NoHostUUID = b.NoHostUUID
}

View File

@ -78,7 +78,7 @@ func TestConfig_Parse(t *testing.T) {
GCDiskUsageThreshold: 82,
GCInodeUsageThreshold: 91,
GCMaxAllocs: 50,
NoHostUUID: true,
NoHostUUID: false,
},
Server: &ServerConfig{
Enabled: true,

View File

@ -23,7 +23,6 @@ client {
reserved {
cpu = 500
}
no_host_uuid = true
}
# Modify our port to avoid a collision with server1

View File

@ -7,7 +7,6 @@ data_dir = "/tmp/client2"
# Enable the client
client {
enabled = true
no_host_uuid = true
# For demo assume we are talking to server1. For production,
# this should be like "nomad.service.consul:4647" and a system
@ -18,7 +17,6 @@ client {
meta {
ssd = "true"
}
no_host_uuid = true
}
# Modify our port to avoid a collision with server1 and client1

View File

@ -110,8 +110,9 @@ client {
parallel destroys allowed by the garbage collector. This value should be
relatively low to avoid high resource usage during garbage collections.
- `no_host_uuid` `(bool: false)` - Force the UUID generated by the client to be
randomly generated and not be based on the host's UUID.
- `no_host_uuid` `(bool: true)` - By default a random node UUID will be
generated, but setting this to `false` will use the system's UUID. Before
Nomad 0.6 the default was to use the system UUID.
### `chroot_env` Parameters

View File

@ -98,11 +98,6 @@ client {
# this should be like "nomad.service.consul:4647" and a system
# like Consul used for service discovery.
servers = ["127.0.0.1:4647"]
# Since we are starting two clients on the same host, we need to set
# this in order to force nomad to generate client UUIDs randomly,
# instead of based on the host UUID.
no_host_uuid = true
}
# Modify our port to avoid a collision with server1