Default to closing file descriptors when excuting commands #1097
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#1097
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'd like to do and why
I backup from lvm snapshots and use hooks to manage these snapshots. I recently upgraded from Ubuntu 24.10 to 25.04, and so from borgmatic 1.8.9 to 1.9.14. Now I see warning messages like these in my logs:
I know work was done in #1068 and #1074 to address a similar issue for lvm commands, but rather than adding
close_fds=Truewhen running hooks, I think a better approach would be to have closed file descriptors be the default and explicitly keep them open only when necessary (i.e. when passing credentials to borg). Would this be acceptable?Other notes / implementation ideas
No response
You are correct that #1068 / #1074 should fix this issue, which means upgrading to borgmatic 2.0.6+ should address it for you. The reason though that
close_fds=Truewas added when running hooks instead of reversing that logic and closing unneeded file descriptors by default is simply because the former was easier / less invasive to implement. A quote from the PR:Having said that, reversing the logic would be fine with me. It'd just likely be a pain to implement.
Closing this since it sounds like it's already implemented and so an upgrade should solve it for you. If you find out that's not the case and/or you'd like to discuss further, please let me know!