Closed treed closed 2 years ago
As this "feature" is intended to use the correct python executable (and nix already handles this properly), i propose to patch de file command_wrapper.py:1012 and remove the sys.executable from the command line.
Yeah, I figured the fix would involve something like that. Sounds reasonable to me.
On Aug 22, 2021, at 08:05, freezeboy @.***> wrote:
As this "feature" is intended to use the correct python executable (and nix already handles this properly), i propose to patch de file command_wrapper.py:1012 and remove the sys.executable from the command line.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Hi do you guys want to check out #142098 and let me know what might need to be patched with the update. i can update the PR
I marked this as stale due to inactivity. → More info
Describe the bug
The
barman cron
command is supposed to run minutely to launch various barman-related commands. However, it is hard-coded to prepend the command with a python interpreter. It is getting a real python interpreter, but thebarman
which is in the path is not Python, but a shell wrapper script.Steps To Reproduce
Steps to reproduce the behavior:
The cron config in question:
Expected behavior
barman cron
is able to execute its various subprocessesScreenshots
Aug 22 02:21:07 neta barman-cron[2578]: SyntaxError: invalid syntax Aug 22 02:21:07 neta barman-cron[2577]: File "/nix/store/a731yhifww58ixxbafrgkmraal1wcv0f-barman-2.12/bin/barman", line 2 Aug 22 02:21:07 neta barman-cron[2577]: export PATH='/nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/bin:/nix/store/a731yhifww58ixxbafrgkmraal1wcv0f-barman-2.12/bin:/nix/store/22l1yckhf52hyyjnz14b77zbcqffph8j-python3.8-jmespath-0.10.0/bin:/nix/store/74hn6s7fa8k0qf20hj9f9vm92j6r4npf-python3.8-docutils-0.16/bin:/nix/store/i3lcb8bsy3vailhmnn9lwa9kaw9f3fdg-python3.8-argcomplete-1.12.2/bin:/nix/store/8hw5xh692ihfdzrv64rj3afxkj2fsi5r-python3.8-chardet-4.0.0/bin'${PATH:+':'}$PATH
You can see the execve call from strace here:
[pid 2560] execve("/nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/bin/python3.8", ["/nix/store/4s0h5aawbap3xhldxhcijvl26751qrjr-python3-3.8.9/bin/python3.8", "/nix/store/a731yhifww58ixxbafrgkmraal1wcv0f-barman-2.12/bin/barman", "-c", "/etc/barman.conf", "-q", "receive-wal", "zenithia"], 0x7ffcbd6fa408 / 30 vars / <unfinished ...>
Notify maintainers
@freezeboy
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information: