Build problem: ganeti-cleaner missing in time for bash completions
See original GitHub issueI’m trying to package ganeti for NixOS and I’m pretty far along, but now running into issues during bash completion generation. The build process can’t find the ganeti-cleaner daemon. I attached the complete build log below and I’m looking for advice.
PYTHONPATH=. ./autotools/run-in-tempdir \
/build/ganeti-f3f033a/./autotools/build-bash-completion --compact > doc/examples/bash_completion
PYTHONPATH=. ./autotools/run-in-tempdir \
/build/ganeti-f3f033a/./autotools/build-bash-completion > doc/examples/bash_completion-debug
Traceback (most recent call last):
File "/build/gntbuild.EO1XnhqH/ganeti/utils/process.py", line 227, in RunCmd
out, err, status, timeout_action = _RunCmdPipe(cmd, cmd_env, shell, cwd,
File "/build/gntbuild.EO1XnhqH/ganeti/utils/process.py", line 556, in _RunCmdPipe
child = subprocess.Popen(cmd, shell=via_shell,
File "/nix/store/bs03sg8b0gq2zr4v252hh9psp780qj5q-python3-3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/bs03sg8b0gq2zr4v252hh9psp780qj5q-python3-3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './daemons/ganeti-cleaner'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 917, in <module>
main()
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 894, in main
WriteHaskellCompletion(sw, "daemons/ganeti-cleaner", htools=False,
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 820, in WriteHaskellCompletion
output = utils.RunCmd([cmd, "--help-completion"], env=env, cwd=".").output
File "/build/gntbuild.EO1XnhqH/ganeti/utils/process.py", line 241, in RunCmd
raise errors.OpExecError("Can't execute '%s': not found (%s)" %
ganeti.errors.OpExecError: Can't execute './daemons/ganeti-cleaner --help-completion': not found ([Errno 2] No such file or directory: './daemons/ganeti-cleaner')
Traceback (most recent call last):
File "/build/gntbuild.WjkumsyP/ganeti/utils/process.py", line 227, in RunCmd
out, err, status, timeout_action = _RunCmdPipe(cmd, cmd_env, shell, cwd,
File "/build/gntbuild.WjkumsyP/ganeti/utils/process.py", line 556, in _RunCmdPipe
child = subprocess.Popen(cmd, shell=via_shell,
File "/nix/store/bs03sg8b0gq2zr4v252hh9psp780qj5q-python3-3.8.5/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/bs03sg8b0gq2zr4v252hh9psp780qj5q-python3-3.8.5/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './daemons/ganeti-cleaner'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 917, in <module>
main()
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 894, in main
WriteHaskellCompletion(sw, "daemons/ganeti-cleaner", htools=False,
File "/build/ganeti-f3f033a/./autotools/build-bash-completion", line 820, in WriteHaskellCompletion
output = utils.RunCmd([cmd, "--help-completion"], env=env, cwd=".").output
File "/build/gntbuild.WjkumsyP/ganeti/utils/process.py", line 241, in RunCmd
raise errors.OpExecError("Can't execute '%s': not found (%s)" %
ganeti.errors.OpExecError: Can't execute './daemons/ganeti-cleaner --help-completion': not found ([Errno 2] No such file or directory: './daemons/ganeti-cleaner')
make: *** [Makefile:4506: doc/examples/bash_completion] Error 1
make: *** Deleting file 'doc/examples/bash_completion'
make: *** Waiting for unfinished jobs....
make: *** [Makefile:4506: doc/examples/bash_completion-debug] Error 1
make: *** Deleting file 'doc/examples/bash_completion-debug'
touch doc/html/index.html
builder for '/nix/store/srlbz4xwq2b4hgf0inbm82wqx1hnbg95-ganeti-v3.0.0beta1-40-gf3f033a62.drv' failed with exit code 2
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Missing Bash Completion · Issue #2691 · postmanlabs/newman
Issue newman is missing bash completion. This can lead to some initial problems for newcomers. One might not be able to understand or ......
Read more >Bash completion not working at all - what am I missing? - snap
Hi, I was trying to get an upstream bash completion binary usable in a snap I'm ... it in from the snapd snap,...
Read more >Particular bash completion files not working when in /usr ...
I have 20 other bash completion files that work fine. What is it about these specific bash completion files that make them work...
Read more >How to configure git bash command line completion?
1. Most *nix boxes (especially Ubuntu) already have that file, so just sourcing it to my user fixed my problem. · 6. ubuntu...
Read more >bash-completion not working by default, until sqlite is installed
even if /usr/share/bash-completion/completions/dnf is present, DNF version 2.0 lost auto-completion in my system - probably due to new version breakage?
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Great. I see you found the disable-version-symlinks patch. It comes with a big caveat that
gnt-cluster upgradeis untested and might break! Not a big deal until Ganeti 3.1 is approaching though…I will submit it as a draft PR in the coming days to get some discussion about it. Note that it is actually patch 2/2 in a series that includes this mostly harmless ganeti-haskell-pythondir.patch.
No you are right - as I said, I did not check the code. It does expect 2 (as
hkrSuccess), but note that this is not the exit code of the script, but rather an internal constant, see:https://github.com/ganeti/ganeti/blob/4d8c16a0739c93400471023b3cf9adf73a037b8f/lib/backend.py#L5983-L5996
And the code in
utils/process.py:https://github.com/ganeti/ganeti/blob/4d8c16a0739c93400471023b3cf9adf73a037b8f/lib/utils/process.py#L738-L751
To me, this looks like a bona-fide failure in the script, which is then represented via the numerical value ‘2’, which is quite confusing, indeed.