-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qvm-check's output and retcode kind of buggy #3496
Comments
@taradiddles It looks like most Qubes tools return @marmarek What GH repository is this tool in? I checked here but the opt parsing doesn't have |
@esote this is the right place, generic options (like |
From my point of view more relevant is this one:
The message says something about |
Fix QubesOS/qubes-issues#3496 (cherry picked from commit 7d93377)
FYI so if using |
Presumably still an issue in R4.1. Validating qube names during command line option parsing is a misdesign IMO, and causes other problems as well. For instance, |
Yes:
Temporary workaround: |
Is this the last remaining bug of qvm-check which is discussed in this issue and remains unsolved:
In that case, the above PR would hopefully solve it. p.s.: As always, PR reviews are highly appreciated |
fixes: QubesOS/qubes-issues#3496 (cherry picked from commit 06bfde3)
Qubes OS version:
R4.0 rc3
Steps to reproduce the behavior:
I'm scripting some stuff in dom0 and need to check if a VM exists ; qvm-check seems to be the way to go rather than grepping the output of qvm-ls.
Let's assume that a VM named "work" exists and that a VM named "work1" doesn't.
Case 1: checking if VM "work" is running: works as expected
Case 2: adding the --quiet arg: the output isn't suppressed
Case 3: finding out what the retcode for a wrong syntax is (to compare with case 4 below)
Case 4: checking if a non existent VM exists: usage() is displayed and usage()'s retcode is returned despite the syntax being right; one would expect the retcode "1"
I looked at /usr/lib/python3.5/site-packages/qubesadmin/tests/tools/qvm_check.py to try to fix it and send a PR, but it was a bit too cryptic for me.
Very minor issue BTW.
The text was updated successfully, but these errors were encountered: