File tree 1 file changed +19
-1
lines changed
modules/nomad-clients/scripts
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,21 @@ modify_nomad_systemd_config() {
94
94
fi
95
95
}
96
96
97
+ # Function to check and load the bridge module
98
+ load_bridge () {
99
+ if ! lsmod | grep -q " ^bridge" ; then
100
+ log " INFO" " Bridge module not loaded. Attempting to load..."
101
+ if ! modprobe bridge; then
102
+ log " ERROR" " Failed to load bridge module. This might affect network functionality."
103
+ else
104
+ log " INFO" " Bridge module loaded successfully."
105
+ fi
106
+ else
107
+ log " INFO" " Bridge module is already loaded."
108
+ fi
109
+ }
110
+
111
+
97
112
# Enables nomad systemd service
98
113
start_nomad () {
99
114
sudo systemctl daemon-reload
@@ -133,7 +148,7 @@ $(for tag in "$${AWS_TAGS[@]}"; do
133
148
"/lib64" = "/lib64"
134
149
"/sbin" = "/sbin"
135
150
"/usr" = "/usr"
136
-
151
+
137
152
"/etc/ld.so.cache" = "/etc/ld.so.cache"
138
153
"/etc/ld.so.conf" = "/etc/ld.so.conf"
139
154
"/etc/ld.so.conf.d" = "/etc/ld.so.conf.d"
@@ -219,6 +234,9 @@ set_hostname
219
234
log " INFO" " Prepare DNS config for exec tasks"
220
235
prepare_dns_config
221
236
237
+ log " INFO" " Checking and loading bridge module"
238
+ load_bridge
239
+
222
240
log " INFO" " Rendering client config for nomad"
223
241
prepare_nomad_client_config
224
242
You can’t perform that action at this time.
0 commit comments