Skip to content

Commit 5117591

Browse files
committed
Fix: Removed rules regeneration, now maintains the existing ones on the database, but needs more testing.
1 parent 7281bd5 commit 5117591

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/aleph/vm/pool.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,7 @@ async def load_persistent_executions(self):
292292

293293
mapped_ports = saved_execution.mapped_ports if saved_execution.mapped_ports else {}
294294
execution.mapped_ports = {int(key): value for key, value in mapped_ports.items()}
295-
logger.info("Loading existing mapped_ports", execution.mapped_ports)
296-
# Clean any existing firewall chain for that vm_id
297-
teardown_nftables_for_vm(vm_id)
295+
logger.info("Loading existing mapped_ports %s", execution.mapped_ports)
298296

299297
# Load and instantiate the rest of resources and already assigned GPUs
300298
await execution.prepare()
@@ -332,9 +330,7 @@ async def load_persistent_executions(self):
332330
if vm.support_snapshot and self.snapshot_manager:
333331
await self.snapshot_manager.start_for(vm=execution.vm)
334332

335-
# Force to refresh redirect firewall rules from scratch
336-
await execution.removed_all_ports_redirection()
337-
# Add again all port redirections
333+
# Refresh port redirection changes
338334
await execution.fetch_port_redirect_config_and_setup()
339335

340336
self.executions[vm_hash] = execution

0 commit comments

Comments
 (0)