Commit Graph

3343 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
5c877e9850
tests: mark NetworkManager in ProxyVM fail for debian-7
NM there expect some different options in configuration, and since it's
old stable, we won't implement it.
2016-03-03 23:47:50 +01:00
Marek Marczykowski-Górecki
4420b320e7
tests: add expectedFailureIfTemplate decorator
Some tests are expected to fail only on some templates (some feature not
available in older distribution, some feature not yet ported to
another).
2016-03-03 23:47:50 +01:00
Marek Marczykowski-Górecki
280a0743c2
core: typo fix in error handling cont
s/VIR_INTERNAL_ERROR/VIR_ERR_INTERNAL_ERROR/

Related to QubesOS/qubes-issues#1537
Fixes QubesOS/qubes-issues#1804
2016-03-03 23:47:38 +01:00
Marek Marczykowski-Górecki
3bef37f881
tests: PCI passthrough to HVM
A simple test which checks if the device is visible there at all.
Device set with QUBES_TEST_PCIDEV env variable is used - it should be
some unimportant device which can be freely detached from dom0.

QubesOS/qubes-issues#1659
2016-02-26 11:04:52 +01:00
Marek Marczykowski-Górecki
26443e1dd2
tests: add function to create minimal OS in HVM
SystemTestsMixin.prepare_hvm_system_linux creates minimal Linux
installation necessary to launch simple shell script. It installs:
 - grub2
 - kernel from dom0 (the same as the running one)
 - dracut based initramfs, with provided script set as pre-pivot hook

Done in preparation for QubesOS/qubes-issues#1659 test
2016-02-26 10:59:20 +01:00
Marek Marczykowski-Górecki
fa66fec684
version 3.1.13 2016-02-23 16:28:14 +01:00
Marek Marczykowski-Górecki
d3f83876eb
rpm: require new enough qubes-core-dom0-linux package
For qvm-sync-clock --force option.
2016-02-23 16:22:02 +01:00
Marek Marczykowski-Górecki
0fb69d39ca
tests: qvm-sync-clock is asynchronouse, take it into account 2016-02-23 16:20:18 +01:00
Marek Marczykowski-Górecki
3ece17a8cf
qvm-sync-clock: sync dom0 clock only when NTP sync succeeded, even with --force
Otherwise dom0 clock (initially almost ok) may be adjusted to totally
invalid timestamp of ClockVM (for example just after resume from S3
sleep).
2016-02-22 20:56:38 +01:00
Marek Marczykowski-Górecki
3f19157d2f
Merge remote-tracking branch 'qubesos/pr/16'
* qubesos/pr/16:
  new --force option for qvm-sync-clock to be able to bypass time sync errors
2016-02-22 20:44:30 +01:00
Marek Marczykowski-Górecki
4658967d09
Merge remote-tracking branch 'qubesos/pr/17'
* qubesos/pr/17:
  qvm-prefs: --get option was misspelled --gry
2016-02-22 20:44:00 +01:00
Marek Marczykowski-Górecki
0121cb2fd4
qmemman: make memory request handling more defensive
If getting memory for new VM fails for any reason, make sure that global
lock will be released. Otherwise qmemman will stop functioning at all.

QubesOS/qubes-issues#1636
2016-02-22 17:57:30 +01:00
Marek Marczykowski-Górecki
5546d679c0
dispvm: use try/finally to make sure that qubes.xml is unlocked
Even in case of some exception (in which case theoretically it should be
unlocked at qfile-daemon-dvm exit, but the script may wait for
something).

QubesOS/qubes-issues#1636
2016-02-21 12:41:13 +01:00
Jon Griffiths
9bd651faaa qvm-prefs: --get option was misspelled --gry 2016-02-18 16:01:08 +13:00
Zrubi
2fcd3c6832 new --force option for qvm-sync-clock to be able to bypass time sync errors 2016-02-10 14:55:11 +01:00
Marek Marczykowski-Górecki
ae848d5369
version 3.1.12 2016-02-08 05:02:30 +01:00
Marek Marczykowski-Górecki
0e273276d3
qvm-run: warn if --localcmd used without --pass-io 2016-02-08 05:01:50 +01:00
Marek Marczykowski-Górecki
6378e2bd20
qvm-run: allow --localcmd with --pass-io, even when --all is given
With --localcmd, stdin/out are connected to that local process (instead
of a terminal), so it doesn't conflict with --all.

QubesOS/qubes-issues#1728
2016-02-08 04:50:05 +01:00
Marek Marczykowski-Górecki
9fa090b422
core: prevent VM renaming over already existing VM
Fixes QubesOS/qubes-issues#1723
2016-02-08 04:38:26 +01:00
Marek Marczykowski-Górecki
be231421de
tests: try to change name to conflicting value
QubesOS/qubes-issues#1723
2016-02-07 02:17:59 +01:00
Marek Marczykowski-Górecki
f13abc2ace
tests: rename domain when it is't defined libvirt
Regression test for QubesOS/qubes-issues#1632
2016-02-06 05:36:53 +01:00
Marek Marczykowski-Górecki
0b5bd060bb
Fix domain renaming when it wasn't defined in libvirt
Fixes QubesOS/qubes-issues#1632
2016-02-06 05:36:07 +01:00
Marek Marczykowski-Górecki
8ee909f08c
Caught unknown libvirt errors on getting runtime VM info
In some cases libvirt doesn't report error code at all. This probably
happens in some stage of domain startup/shutdown. Threat this the same
as domain not running.

Fixes QubesOS/qubes-issues#1537
2016-02-06 05:34:22 +01:00
Marek Marczykowski-Górecki
0d31306b90
tests: clearing 'updates pending' flag
QubesOS/qubes-issues#1685
2016-02-03 17:22:15 +01:00
Marek Marczykowski-Górecki
0d2e03389f
tests: qvm-open-in-vm and qvm-open-in-dvm tests for different file types
QubesOS/qubes-issues#1621
2016-01-29 21:31:49 +01:00
Marek Marczykowski-Górecki
be00d15d99
tests: do not crash when trying to log class setup/teardown fail
QubesOS/qubes-issues#1691
2016-01-29 21:30:11 +01:00
Marek Marczykowski-Górecki
84af7386f5
tests: support VMs cleaned up in tearDownClass, instead of tearDown
Usage: VMs with name created by self.make_vm_name(name,
class_teardown=True) will be cleaned up in tearDownClass. It should be
used only in setUpClass.

Fixes QubesOS/qubes-issues#1691
2016-01-26 03:34:27 +01:00
Marek Marczykowski-Górecki
31a3796ed3
dispvm: do not remove innocent files when cleaning up DispVM
Fixes QubesOS/qubes-issues#1662
2016-01-20 02:51:57 +01:00
Marek Marczykowski-Górecki
689df4afd3
dispvm: cleanup DispVM even if was already destroyed
dispvm.force_shutdown() throw an exception if the VM is already dead.

Fixes QubesOS/qubes-issues#1660
2016-01-20 02:50:47 +01:00
Marek Marczykowski-Górecki
176755d9e2
tests: DispVM cleanup
QubesOS/qubes-issues#1660
2016-01-20 02:48:46 +01:00
Marek Marczykowski-Górecki
873706428e
dispvm: fix firewall propagation when the calling VM has no rules set
Fixes QubesOS/qubes-issues#1608
2016-01-18 02:19:19 +01:00
Marek Marczykowski-Górecki
ce75ba411f
tests: "empty" firewall propagation
Check if "empty" firewall is also properly propagated.

QubesOS/qubes-issues#1608
2016-01-18 02:09:17 +01:00
Marek Marczykowski-Górecki
04415e13fe
version 3.1.11 2016-01-15 17:35:25 +01:00
Marek Marczykowski-Górecki
5d36923170
qmemman: fix race condition on starting new VM
Force refreshing domain list after starting new VM, even if the
triggering watch wasn't about domain list change. Otherwise (with
outdated domain list) memory allocated to a new VM, but not yet used may
be redistributed (leaving to little to the Xen itself).

Fixes QubesOS/qubes-issues#1389
2016-01-14 04:37:02 +01:00
Marek Marczykowski-Górecki
411e8b5323
qmemman: refresh domain list holding global_lock
Retrieve a domain list only after obtaining global lock. Otherwise an
outdated list may be used, when a domain was introduced in the meantime
(starting a new domain is done with global lock held), leading to #1389.

QubesOS/qubes-issues#1389
2016-01-14 04:34:53 +01:00
Marek Marczykowski-Górecki
caa75cbc18
tests: regression test for #1389
QubesOS/qubes-issues#1389
2016-01-14 04:28:17 +01:00
Marek Marczykowski-Górecki
3eccc3a633
qmemman: use try/finally to really release the lock
Currently not needed in practice, but a preparation for the next
commit(s).

QubesOS/qubes-issues#1389
2016-01-14 03:32:18 +01:00
Marek Marczykowski-Górecki
6a99b0b2ba
qmemman: add some useful logging for #1389
QubesOS/qubes-issues#1389
2016-01-14 03:15:38 +01:00
Marek Marczykowski-Górecki
f4d46c7855
tests: add a test for proper saving of DispVM firewall rules
Test if DispVM firewall rules are:
 - inherited from a calling VM
 - saved properly (so will be effective after firewall reload)
 - saved only for that DispVM (#1608)

QubesOS/qubes-issues#1608
2016-01-14 01:14:41 +01:00
Marek Marczykowski-Górecki
46a338d087
version 3.1.10 2016-01-12 12:05:19 +01:00
Marek Marczykowski-Górecki
8b9049d8c6
core/hvm: create root-cow.img if it's missing
It should be created at VM creation time (or template changes commit).
But for example for HVM templates created before implementing
QubesOS/qubes-issues#1573, there would be no such image. So create it
when needed, just before VM startup

Fixes QubesOS/qubes-issues#1602
2016-01-11 21:53:33 +01:00
Marek Marczykowski-Górecki
78b63eb21a
qmemman: fix crash when VM fails to start
In this case, qmemman would not manage to get any memory state for such
VM, so memory_current would be 'None'. But later it would perform
arithmetics on it, which would result in qmemman crash (TypeError
exception).

Fixes QubesOS/qubes-issues#1601
2016-01-11 21:50:57 +01:00
Marek Marczykowski-Górecki
301eed55b3
version 3.1.9 2016-01-07 06:38:06 +01:00
Marek Marczykowski-Górecki
db136674a9
tests: workaround libvirt bug - domain ID desynchronization 2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
baffef0ef0
tests: fix qvm-move-to-vm error code checking
Currently error code is 28 (ENOSPC). But generally any non-zero is
expected result here.

Fix test for QubesOS/qubes-issues#1355
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
24ad20cfe6
tests: add a simple dom0 backup test
Regression test for:
QubesOS/qubes-issues#1515

It assumes existing broken symlink in user dom0 home. Thanks for systemd
it is the case (`~/.local/share/systemd/user`).
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
ba3b908b73
backup: do not dereference symlinks in dom0 user home backup
Symlinks there should be preserved. Additionally broken symlink would
cause the backup to fail.

Fixes QubesOS/qubes-issues#1515
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
530a79417f
Add some logging to ease debugging libvirt errors
Temporary add some more logging to ease debugging libvirt errors.
Unfortunatelly stack trace doesn't contain actual error.

QubesOS/qubes-issues#1537
2016-01-07 05:48:33 +01:00
Marek Marczykowski-Górecki
4af5a0503d
tests: qvm-revert-template-changes
Regression test for:
QubesOS/qubes-issues#1573
2016-01-07 05:48:32 +01:00
Marek Marczykowski-Górecki
f977858610
minor: add missing coding declaration 2016-01-07 05:48:32 +01:00