aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2025-10-17 17:35:38 +0100
committerdiogo464 <[email protected]>2025-10-17 17:35:38 +0100
commit8f60ce71eddb39c6580f7cc58a83c99a0c53418f (patch)
treee7a62992149e0f00b4e9ab6ae04f1b92f9ad4d57
parent19fd633b879ddc4574615b78814613dba8246777 (diff)
remove docker networks and leave swarm on setup
some docker networks and the swarm can create routing rules that conflict with the ones we create leading to errors such as: 59:2025-10-15T15:07:33.745853Z WARN Failed to connect to 10.0.1.243:4000: No route to host (os error 113) 89:2025-10-15T15:08:30.197646Z WARN Failed to connect to 10.0.1.32:4000: No route to host (os error 113) 92:2025-10-15T15:08:30.837360Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 95:2025-10-15T15:08:33.905356Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 98:2025-10-15T15:08:36.981419Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 101:2025-10-15T15:08:40.049335Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 104:2025-10-15T15:08:43.121680Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 107:2025-10-15T15:08:46.197394Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 110:2025-10-15T15:08:49.265514Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 113:2025-10-15T15:08:52.337454Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 116:2025-10-15T15:08:55.409444Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 119:2025-10-15T15:08:58.481471Z WARN Failed to connect to 10.0.1.91:4000: No route to host (os error 113) 1
-rw-r--r--src/main.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 830fba0..da113c1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -953,6 +953,10 @@ fn machine_configuration_script(config: &MachineConfig) -> String {
953 // tcp max orphan limit 953 // tcp max orphan limit
954 script.push_str("echo 524288 > /proc/sys/net/ipv4/tcp_max_orphans\n"); 954 script.push_str("echo 524288 > /proc/sys/net/ipv4/tcp_max_orphans\n");
955 955
956 // exit docker swarm and remove all networks
957 script.push_str("docker swarm leave || true\n");
958 script.push_str("docker network ls -q | xargs docker network rm -f || true\n");
959
956 // ip configuration 960 // ip configuration
957 script.push_str("cat << EOF | ip -b -\n"); 961 script.push_str("cat << EOF | ip -b -\n");
958 for command in config.ip_commands.iter() { 962 for command in config.ip_commands.iter() {