Marek Marczykowski-Górecki
539a46ca9a
core/log: do not attach multiple handlers to the same logger
...
logging.getLogger when given the same name twice, will return the same
object. Do not attach handler there every time, it will really open new
file, leading to multiplicated log entries and depleting file
descriptors.
QubesOS/qubes-issues#1697
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
64260f5844
core: handle default template
...
Fixes QubesOS/qubes-issues#1559
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
15192ede42
core: allow not having clockvm/updatevm
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
f7f1038f57
core: add a stopgap detection for simultaneous qubes.xml access
...
For now simply throw an exception. Proper solution require some locking
QubesOS/qubes-issues#1729
2016-03-03 01:18:15 +01:00
Wojtek Porczyk
c531b0eac2
qubes: fix None serialisation for VMProperty
...
Note that None != default (no attribute in XML at all).
This is reworked
27eddcb WIP core: fix deserializing None for VMProperty
by Marek.
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
843cf68c1a
core: return QubesVMNotFoundError when setting non-existent VM to VMProperty
...
Not sure about this one. Maybe it should be rather
QubesPropertyValueError?
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
380ad74494
core: fix property.__eq__
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
ee1e836523
core: fix clone_properties(proplist=something)
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
929923164e
Move libvirt_conn.close to object destructor
...
Process exit is too late for long-running processes. Especially tests,
which create a lot of such objects which leads to depleting all
the file descriptors.
QubesOS/qubes-issues#1697
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
ab469e4473
vm: fix calling monitor layout notifier
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
4095f3c5eb
vm: disable uses_custom_config for now
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
db20581340
storage: few more merge fixes
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
926596cba7
Initialize vm.storage after loading all the properties
...
It needs at least vm.name to be set.
2016-03-03 01:18:15 +01:00
Marek Marczykowski-Górecki
3af71ab65d
storage: fix handling netvm and adminvm
...
@woju what was consensus on 'servicevms' dir? Since "being network
provider" is no longer separate type and can be changed during VM
lifetime, maybe we should abandon that idea? Or maybe just set it as VM
property (some storage pool config argument) - that way mgmt stack could
put all the sys-* VMs into separate directory, regardless of the type.
2016-03-03 01:18:06 +01:00
Marek Marczykowski-Górecki
d3f9c0b169
storage: fix loading default storage pool
...
qubes.config.defaults holds ['pool_drivers'] strings, not classes.
2016-03-03 01:14:54 +01:00
Wojtek Porczyk
c47e29ed50
Fix most errors from pylint
2016-03-03 01:14:54 +01:00
Wojtek Porczyk
9eafa57539
Merge remote-tracking branch 'marmarek/master' into core3-devel
...
The following list is bollocks. There were many, many more.
Conflicts:
core-modules/003QubesTemplateVm.py
core-modules/005QubesNetVm.py
core/qubes.py
core/storage/__init__.py
core/storage/xen.py
doc/qvm-tools/qvm-pci.rst
doc/qvm-tools/qvm-prefs.rst
qubes/tools/qmemmand.py
qvm-tools/qvm-create
qvm-tools/qvm-prefs
qvm-tools/qvm-start
tests/__init__.py
vm-config/xen-vm-template-hvm.xml
This commit took 2 days (26-27.01.2016) and put our friendship to test.
--Wojtek and Marek
2016-03-03 01:13:51 +01:00
Wojtek Porczyk
2d6ad3b60c
qubes/vm/qubesvm: remove prefixes from qubesdb keys
2016-03-03 00:46:05 +01:00
Wojtek Porczyk
e8bedcd7ba
qubes/vm: fix starting netvm
2016-03-03 00:46:05 +01:00
Wojtek Porczyk
6bc30b2e0b
qubes/tools/qvm_ls: fix getting columns from mixin
2016-03-03 00:46:05 +01:00
Wojtek Porczyk
21d6d51cbb
qubes/tools/qvm_ls: remove fmt= argument
...
Unneeded, added complexity.
2016-03-03 00:46:05 +01:00
Wojtek Porczyk
01319e391f
qubes: port netvm
...
From now, there are no separate NetVM and ProxyVM class, but property
"provides_network".
2016-03-03 00:46:05 +01:00
Wojtek Porczyk
638c31ce68
qubes/tests/vm/qubesvm: some more tests
2016-01-21 13:31:43 +01:00
Wojtek Porczyk
06cc064c8c
qubes/tests: split init to init1 and init2
...
This is to keep the correct order of the tests. The exact dependency
graph is somewhat complicated and contains several cycles.
2016-01-21 13:31:43 +01:00
Wojtek Porczyk
689dd64b0d
qubes: misc pylint fixes
2015-12-29 22:04:00 +01:00
Wojtek Porczyk
bf4dbe07d5
qubes/tests/vm/qubesvm: add basic tests for QubesVM
...
And already one fix to instantiation.
2015-12-29 20:35:04 +01:00
Wojtek Porczyk
66475e5ca7
qubes/tests/run: Fix running foregin TestCases
...
This is needed, because when tests fail to load, unittest module
generates artificial „LoadTestsFailure” class -- not based on our
QubesTestCase, so it does not have .log attribute.
2015-12-29 20:08:47 +01:00
Wojtek Porczyk
13b1a7201a
qubes/tests: fix tearing down QubesTestCase
2015-12-29 16:49:17 +01:00
Wojtek Porczyk
8d55bf9016
qubes/tools/qvm_run: do not colour autostart log messages
2015-12-29 14:47:37 +01:00
Wojtek Porczyk
69e0b94c74
Fix for UUID management
...
This fixes up 75c3f355db
"qubes/vm/qubesvm: fix domain's UUID management".
Previously 'domain-init' was never really fired.
fixes QubesOS/qubes-issues#1557
2015-12-29 03:50:35 +01:00
Wojtek Porczyk
ce0b927a98
qubes/tests/int/tools/qvm_run: add tests for qvm-run
...
Missing is test for --gui/--no-gui.
part of QubesOS/qubes-issues#1226
2015-12-29 03:50:35 +01:00
Wojtek Porczyk
f1a0b1af39
qubes/tools: add qvm-run, qvm-{,un}pause
...
Also change convention of calling main(): now command returns its
numeric value instead of bool.
Also fixed QSB#13
fixes QubesOS/qubes-issues#1226
2015-12-29 03:43:08 +01:00
Wojtek Porczyk
7b30361fa6
qubes/tools: add qubes-prefs
...
fixes QubesOS/qubes-issues#1209
2015-12-24 00:48:17 +01:00
Wojtek Porczyk
87f74a5ba8
qubes/storage: Fix template instantiation
...
rootcow image was somehow dropped
2015-12-24 00:14:28 +01:00
Wojtek Porczyk
ec50a411fe
qubes/tests/int/tools/qubes_create: fix wrong assert
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
5c57b4cda7
qubes/tests: fix regression in test setup
...
Regression was caused by 648fe213 "core3: test fixing"
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
e4a0cfc8c8
qubes: fix instantiating with no or empty qubes.xml
...
There is always dom0 (domid=0) added, but it has None as self.xml.
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
b54305bff1
qubes: fix qubes-create regression
...
Previous commit, which changed the handling of qubes.xml again, broke
bootstrapping.
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
58608864c1
qubes: fix saving qubes.xml
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
d693964ab9
qubes: fix deleting domain
2015-12-23 14:34:53 +01:00
Wojtek Porczyk
0dc0fd306f
core3: test fixing
...
part of QubesOS/qubes-issues#1248
2015-12-23 14:34:53 +01:00
Wojtek Porczyk
dc3fcc3141
qubes/tests: port again the backported test runner
...
part of QubesOS/qubes-issues#1248
2015-10-17 00:20:44 +02:00
Wojtek Porczyk
2e42a408e5
core3: Add documentation to qubes.exc
...
part of QubesOS/qubes-issues#1279
2015-10-17 00:20:44 +02:00
Wojtek Porczyk
96efb4568a
core3: add different exceptions
...
From now on there are different exceptions which can be raise on
different occasions.
fixes QubesOS/qubes-issues#1279
2015-10-17 00:17:12 +02:00
Wojtek Porczyk
ea44c0acf3
qubes: pylint fixes
...
Fix bunch of errors and warnings.
2015-10-05 23:49:39 +02:00
Wojtek Porczyk
15713cbf46
qubes/tools: rewrite qvm-kill
...
Also new function, `error_runtime` for common parser.
fixes QubesOS/qubes-issues#1222
2015-10-05 18:06:02 +02:00
Wojtek Porczyk
015b01fe46
qubes/tools: unify looking up the domain
...
This is common operation that is repeatable.
2015-10-05 17:34:13 +02:00
Wojtek Porczyk
55e4ddcd3d
qubes/tools: custom QubesArgumentParser
...
Common functions that revolve around running the tool (like
`dont_run_as_root`) will be methods of this class.
2015-10-05 14:03:11 +02:00
Wojtek Porczyk
c9cbf8ffe2
core3: fix mounting modules.img
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
15c59f938c
qubes/storage/xen: fix RO snapshot
2015-10-05 12:46:14 +02:00