Prior to this commit, there have been occasional issues with the usage
of the Qubes Manager's VM restart button where the restart procedure
is interrupted due to an exception thrown after the VM in question is
shut down. The exception has the following backtrace:
----
line: assert not vm.is_running()
func: start_vm
line no.: 1198
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py
----
line: self.caller.start_vm(vm)
func: check_if_vm_has_shutdown
line no.: 308
file: /usr/lib64/python2.7/site-packages/qubesmanager/main.py
Upon investigation, the root cause of the issue appears to be
inconsistent information provided by Xen regarding a recently-shut-down
VM's start-up timestamp and its state (i.e., running or shut down).
In some cases Xen would report that the VM is running whereas the
start-up timestamp would be returned as None, due to unknown reasons.
This inconsistency would then cause the code modified by this commit to
call the Qubes Manager's "start_vm" method, which would attempt to
assert that a VM is shut down, which would raise the aforementioned
exception.
This commit aims to resolve this issue by checking whether the VM has
fully shut down according to Xen and by calling "start_vm" only if the
VM has fully shut down.
This commit also slightly refactors the affected code.
Fixes: QubesOS/qubes-issues#2438
This reverts commit 4a3240bf1a.
VM names never contain any unicode characters, so this fix only
propagates the possibility of an encoding error to further down
the line, rather than removing it.
A proper fix would involve filtering the input to the search box
as we do with creating & renaming VMs.
* i18n:
i18n: update translations
i18n: add configuration for transifex client
i18n: add 'en' translation file as a source template
Translated some strings to test the process
i18n: add skeleton translation file for spanish
i18n: wrap strings with self.tr
i18n: add basic support for translations
It is too easy to accidentally delete the wrong VM if you use lots
of short-term (but longer than disposable) VMs and have built
muscle memory of just clicking "Ok" in the deletion confirmation box.
This patch requires you to type the full name of the VM, inspired by
repo deletion confirmation on GitHub.
If the clipboard file doesn't exist (and it doesn't at system startup),
pyinotify will output an error to stderr. This situation is already
handled by also monitoring the directory itself for CREATE event. But
prevent error message.
non-GUI thread can't open new window in PyQt. So as a band aid print the
message to stderr in such case.
And while at it, fix filename in error message (it was clobbered later
while constructing stack trace).
QubesOS/qubes-issues#1266
This was broken since 8a91c90 "Fix block attach/detach", which changed
rows_with_blk list to contain VM qid, not name. One place was left not
updated.
Additionally document VmRowInTable.update parameters, as some of them
may be not obvious (blk_visible=None).
FixesQubesOS/qubes-issues#1291
xterm closes itself immediatelly when the specified command ends, so
wait for user reaction to give a chance to read the message (potentially
some error info). Also add some more meaningful window title.
QubesOS/qubes-issues#982