Repository navigation
fix(dgw): ignore bad agent_tunnel.db when tunnel is off - #2071
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 1 commit into
Conversation
With the agent tunnel off, a 2026.3 agent_tunnel.db that can't be imported no longer stops the Gateway from starting; the failure is logged as a warning. The import still runs when the tunnel is off, so turning the tunnel back on later keeps the enrolled Agents. With the tunnel on, a failed import still stops the start.
|
Why not just skip the import when the tunnel is off: Ran the debug build locally with a broken and a valid
Note LLM-assisted content (no human feedback). |
Let maintainers know that an action is required on their side
|
There was a problem hiding this comment.
🟡 Changes recommended
Creating gateway.db after an ignored failure prevents future import retries when the tunnel is re-enabled.
1 open finding
What changed in this PR
Allows Gateway startup to continue when a legacy Agent Tunnel database import fails while tunneling is disabled.
Changes:
- Makes import failures conditional on Agent Tunnel state.
- Logs ignored failures as warnings.
| File | Description |
|---|---|
devolutions-gateway/src/service.rs |
Handles legacy database import failures during startup. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| Err(error) if conf.agent_tunnel.enabled => return Err(error), | ||
| // The agent tunnel is off, so a bad old file must not stop the Gateway. | ||
| Err(error) => warn!( | ||
| error = format!("{error:#}"), | ||
| "Failed to import the 2026.3.0 agent tunnel database, continuing because the agent tunnel is disabled" |

With the agent tunnel off, a 2026.3
agent_tunnel.dbthat can't be imported no longer stops the Gateway from starting; the failure is logged as a warning. The import still runs when the tunnel is off, so turning the tunnel back on later keeps the enrolled Agents. With the tunnel on, a failed import still stops the start.Follow-up to this review on #2039.