3e50f72fad
Fixes #13505 This fixes #13505 by treating reserved_ports like we treat a lot of jobspec settings: merging settings from more global stanzas (client.reserved.reserved_ports) "down" into more specific stanzas (client.host_networks[].reserved_ports). As discussed in #13505 there are other options, and since it's totally broken right now we have some flexibility: Treat overlapping reserved_ports on addresses as invalid and refuse to start agents. However, I'm not sure there's a cohesive model we want to publish right now since so much 0.9-0.12 compat code still exists! We would have to explain to folks that if their -network-interface and host_network addresses overlapped, they could only specify reserved_ports in one place or the other?! It gets ugly. Use the global client.reserved.reserved_ports value as the default and treat host_network[].reserverd_ports as overrides. My first suggestion in the issue, but @groggemans made me realize the addresses on the agent's interface (as configured by -network-interface) may overlap with host_networks, so you'd need to remove the global reserved_ports from addresses shared with a shared network?! This seemed really confusing and subtle for users to me. So I think "merging down" creates the most expressive yet understandable approach. I've played around with it a bit, and it doesn't seem too surprising. The only frustrating part is how difficult it is to observe the available addresses and ports on a node! However that's a job for another PR. |
||
---|---|---|
.. | ||
config | ||
alloc.go | ||
alloc_test.go | ||
batch_future.go | ||
batch_future_test.go | ||
bitmap.go | ||
bitmap_test.go | ||
connect.go | ||
connect_test.go | ||
consul.go | ||
consul_oss.go | ||
consul_oss_test.go | ||
consul_test.go | ||
csi.go | ||
csi_test.go | ||
devices.go | ||
devices_test.go | ||
diff.go | ||
diff_test.go | ||
encoding.go | ||
errors.go | ||
errors_test.go | ||
eval.go | ||
event.go | ||
extensions.go | ||
funcs.go | ||
funcs_test.go | ||
generate.sh | ||
handlers.go | ||
job.go | ||
job_test.go | ||
network.go | ||
network_test.go | ||
node.go | ||
node_class.go | ||
node_class_test.go | ||
node_test.go | ||
operator.go | ||
search.go | ||
secure_variables.go | ||
secure_variables_test.go | ||
service_identities.go | ||
service_registration.go | ||
service_registration_test.go | ||
services.go | ||
services_test.go | ||
streaming_rpc.go | ||
structs.go | ||
structs_codegen.go | ||
structs_oss.go | ||
structs_periodic_test.go | ||
structs_test.go | ||
testing.go | ||
uuid.go | ||
vault.go | ||
volume_test.go | ||
volumes.go |