018877a19c
While libvirt handle locking itself, there is also Qubes-specific startup part. Especially starting qrexec-daemon and waiting until qrexec-agent connect to it. When someone will attempt to start VM the second time (or simply assume it's already running) - qrexec will not be connected yet and the operation will fail. Solve the problem by wrapping the whole vm.start() function with a lock, including a check if VM is running and waiting for qrexec. Also, do not throw exception if VM is already running. This way, after a call to vm.start(), VM will be started with qrexec connected - regardless of who really started it. Note that, it will not solve the situation when someone check if VM is running manually, like: if not vm.is_running(): yield from vm.start() Such code should be changed to simply: yield from vm.start() Fixes QubesOS/qubes-issues#2001 Fixes QubesOS/qubes-issues#2666 |
||
---|---|---|
ci | ||
contrib | ||
doc | ||
etc | ||
linux | ||
qubes | ||
qubes-rpc | ||
qubes-rpc-policy | ||
qubespolicy | ||
qvm-tools | ||
relaxng | ||
rpm_spec | ||
templates | ||
test-packages | ||
tests | ||
.coveragerc | ||
.gitignore | ||
.pylintrc | ||
.travis.yml | ||
installer.wxs | ||
LICENSE | ||
Makefile | ||
Makefile.builder | ||
README.md | ||
run-tests | ||
setup.cfg | ||
setup.py | ||
version |
Qubes core, version 3
This is development branch of the Qubes OS core. This branch is subject to rebase without warning until further notice.
API documentation is available: https://qubes-core-admin.readthedocs.org/en/latest/.