Skip to content
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-prefs --set vmname qrexec_timeout does not allow value 0, and has misleading error message #5005

Closed
yomimono opened this issue Apr 29, 2019 · 8 comments
Labels
C: core C: doc P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. ux User experience

Comments

@yomimono
Copy link

Qubes OS version

R4.0

Affected component(s) or functionality
qvm-prefs command in dom0

Brief summary
I want to disable the behavior of QubesOS where VMs will be terminated if they do not respond to qrexec within a certain amount of time. I can't figure out how to do this.

To Reproduce
Steps to reproduce the behavior:
_1. in dom0, attempt to set the qrexec_timeout parameter of a vm to 0 with qvm-prefs --set vmname qrexec_timeout 0. _
_2. Result is usage information for qvm-prefs and the error message qvm-prefs: error: no such property: 'qrexec_timeout'. This is inconsistent as I can see qrexec_timeout with qvm-prefs --get and can set it to a positive nonzero value.

Expected behavior
Successful update of the qrexec_timeout parameter to 0, disabling the shutdown of VMs that don't respond within n seconds.

Actual behavior
qrexec_timeout remains at the original value.

@yomimono yomimono added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug labels Apr 29, 2019
@yomimono
Copy link
Author

/cc @linse

@marmarek
Copy link
Member

marmarek commented Apr 29, 2019

If your VM do not have qrexec installed, to avoid killing it on qrexec timet you can disable qrexec feature. I guess you create TemplateBasedVM, but given alternative kernel, you actually do not use any of the os from its template. If you create StandaloneVM instead, you'll avoid this issue (as qrexec feature is not there by default). Otherwise, you can do that manually with qvm-features tool - set qrexec to empty string to override 1 set on template.

@yomimono
Copy link
Author

Ah, OK. So what I want is instead qvm-features appname qrexec "".

@andrewdavidwong
Copy link
Member

I guess this should be a doc improvement issue.

@yomimono
Copy link
Author

I think the result of qvm-prefs --set vmname qrexec_timeout 0 is rather confusing; there should probably be an error message indicating that 0 is an invalid value, rather than qrexec_timeout.

@andrewdavidwong andrewdavidwong added C: core ux User experience labels May 1, 2019
@andrewdavidwong andrewdavidwong removed this from the Non-release milestone Aug 13, 2023
HW42 added a commit to HW42/qubes-core-admin-client that referenced this issue Dec 11, 2023
Previously we printed a 'no such property' error for all exceptions that
are an instance of AttributeError which includes
QubesPropertyAccessError and therefore generated confusing error
messages. Print them only in case of QubesNoSuchPropertyError.

Fixes QubesOS/qubes-issues#8666
Related to QubesOS/qubes-issues#5005
HW42 added a commit to HW42/qubes-core-admin-client that referenced this issue Dec 11, 2023
Previously we printed a 'no such property' error for all exceptions that
are an instance of AttributeError which includes
QubesPropertyAccessError and therefore generated confusing error
messages. Print them only in case of QubesNoSuchPropertyError.

Fixes QubesOS/qubes-issues#8666
Related to QubesOS/qubes-issues#5005
HW42 added a commit to HW42/qubes-core-admin that referenced this issue Dec 11, 2023
The property setter helpers for (non-zero) positive integer values
previously raised a ValueError for out of range values, which is
interpreted later as internal error. But in such cases the user supplied
an invalid value so raise a QubesPropertyValueError. The message will
then be displayed by qvm-prefs.

Related to QubesOS/qubes-issues#5005
@HW42
Copy link

HW42 commented Dec 11, 2023

The technical part should be fixed by QubesOS/qubes-core-admin-client#268 and QubesOS/qubes-core-admin#570. Leaving this open for the documentation part.

HW42 added a commit to HW42/qubes-core-admin-client that referenced this issue Dec 11, 2023
Previously we printed a 'no such property' error for all exceptions that
are an instance of AttributeError which includes
QubesPropertyAccessError and therefore generated confusing error
messages. Print them only in case of QubesNoSuchPropertyError.

Fixes QubesOS/qubes-issues#8666
Related to QubesOS/qubes-issues#5005
marmarek pushed a commit to QubesOS/qubes-core-admin that referenced this issue Jan 20, 2024
The property setter helpers for (non-zero) positive integer values
previously raised a ValueError for out of range values, which is
interpreted later as internal error. But in such cases the user supplied
an invalid value so raise a QubesPropertyValueError. The message will
then be displayed by qvm-prefs.

Related to QubesOS/qubes-issues#5005

(cherry picked from commit d1c740a)
@neoniobium
Copy link

This appears the be fixed.

@andrewdavidwong
Copy link
Member

Closing as completed. If anyone believes this issue is not yet completed, or if anyone is still affected by this issue, please leave a comment saying so, and we'll be happy to reopen it. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: core C: doc P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. ux User experience
Projects
None yet
Development

No branches or pull requests

5 participants