Commit Graph

3175 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
31ad72aa70
tests: better handle templates with no 'createrepo' installed 2015-11-03 02:44:25 +01:00
Marek Marczykowski-Górecki
44c340c046
tests: add wait_for_window function to reduce code duplication 2015-11-03 02:43:46 +01:00
Marek Marczykowski-Górecki
cf110c74e2
tests: fix cleanup in dom0 updates tests
The only directory to cleanup is cls.tmpdir. So make it simple, without
class property cleanup_paths, which for some reason didn't wasn't
emptied in tearDownClass.
2015-11-03 02:40:53 +01:00
Marek Marczykowski-Górecki
5160423065
tests: perform dom0 update check using VMs of different templates
QubesOS/qubes-issues#1282
QubesOS/qubes-issues#1029
2015-10-30 14:58:23 +01:00
Marek Marczykowski-Górecki
33255964c7
tests: handle Whonix in simple GUI tests
Whonix VMs have always hostname of 'host', so handle that when searching
for a window based on its title.
2015-10-30 14:09:52 +01:00
Marek Marczykowski-Górecki
f064a4c6ea
tests: improve qvm-run of GUI apps tests, include qubes-desktop-run 2015-10-27 23:16:37 +01:00
Marek Marczykowski-Górecki
9cb62f8f4d
tests: VM updates (direct and through updates proxy) 2015-10-27 23:16:10 +01:00
Marek Marczykowski-Górecki
de295136ce
Fix "utils/QubesWatch: use timers to retry QubesDB watch registration" 2015-10-27 21:47:01 +01:00
Marek Marczykowski-Górecki
1c0ade6166
Fix race condition in QubesVm.get_cputime/get_mem
When domain is destroyed after isActive check, but before getting
actuall info, it would fail. So handle this situation.
2015-10-27 21:35:02 +01:00
Marek Marczykowski-Górecki
e475e291a9
tests: more qrexec tests, this time for deadlocks
Tests for recently discovered deadlocks on write(2).

QubesOS/qubes-issues#1347
2015-10-25 15:23:12 +01:00
Marek Marczykowski-Górecki
75168c8aef
core: improve handling QubesDB startup errors
Kill the VM when QubesDB initialization fails, in any way, not only
QubesDB daemon itself.
2015-10-13 23:49:32 +02:00
Marek Marczykowski-Górecki
5c549e1134
core: Provide more meaningful error when failed to kill old QubesDB instance
This process may be running as root in case of default NetVM. But do not
kill it forcibly (through sudo or so), because it may also be stale
pid file. After all, QubesDB should automatically terminate when its VM
is terminated, so this code is already some error handling.

Fixes QubesOS/qubes-issues#1331
2015-10-13 23:46:59 +02:00
Marek Marczykowski-Górecki
2b7bd1f1f5
Merge remote-tracking branch 'qubesos/pr/7'
* qubesos/pr/7:
  Don't send screen layout to the VM if we haven't received it from xrandr because this breaks proper initial screen layout set by gui-agent Fixes QubesOS/qubes-issues#1305 QubesOS/qubes-issues#998
2015-10-11 02:56:25 +02:00
Marek Marczykowski-Górecki
b9fedb622e
version 3.1.1 2015-10-11 02:52:51 +02:00
Marek Marczykowski-Górecki
350e279f4f
Fix handling /etc/localtime hardlink
If /etc/localtime in dom0 is a hardlink to zoneinfo file (instead of
symlink) and more than one zoneinfo file is hardlinked to this inode,
appVMs will get invalid timezone, e.g. "Europe/Warsaw\x0aPoland".

Reported by @yaqu, fix provided by @yaqu
Fixes QubesOS/qubes-issues#1315
2015-10-10 17:30:40 +02:00
Marek Marczykowski-Górecki
18edf4946c
dispvm: get rid of obsolete symlinks to dvm.conf
Separate config file is no longer created for DispVM - the configuration
is passed directly to libvirt.

Fixes QubesOS/qubes-issues#1314
2015-10-10 05:22:44 +02:00
Marek Marczykowski-Górecki
820e5c0e69
Update stubdom memory allocation to 44MB
Since 677a79b "hvm: change default graphics to std vga ('xen')",
stubdomain uses 44MB RAM

QubesOS/qubes-issues#1136
2015-10-10 05:22:44 +02:00
HW42
912d4c1447
qubes-random-seed: feed kernel rng with randomness from dom0 2015-10-10 05:22:43 +02:00
Marek Marczykowski-Górecki
063b436b03
notify-updates: ignore chown error
If running as normal user, chown will fail. This isn't a problem,
because the file is probably already owned by the correct user. The
whole point about this chown is to give access to the file for normal
user, so if the write succeeded, it isn't needed.
2015-10-10 05:22:43 +02:00
Marek Marczykowski-Górecki
88b4a84cce
Merge remote-tracking branch 'origin/pr/7' into HEAD
* origin/pr/7:
  Properly account for Xen memory overhead to fix large VMs

QubesOS/qubes-issues#1136
2015-10-10 05:22:13 +02:00
qubesuser
540f4f7294 Properly account for Xen memory overhead to fix large VMs 2015-10-10 01:08:56 +02:00
Ivan Konov
78c3f40f89 Don't send screen layout to the VM if we haven't received it from xrandr
because this breaks proper initial screen layout set by gui-agent
Fixes QubesOS/qubes-issues#1305 QubesOS/qubes-issues#998
2015-10-09 22:56:41 +03:00
Marek Marczykowski-Górecki
2d8a8094ed
qmemman: add some comments about new condition for failing request
QubesOS/qubes-issues#1136
2015-10-09 19:29:15 +02:00
Marek Marczykowski-Górecki
f6fdec08f2
Merge remote-tracking branch 'origin/pr/6'
* origin/pr/6:
  Support large VMs by removing the fixed balloon iteration limit

QubesOS/qubes-issues#1136
2015-10-09 18:30:02 +02:00
qubesuser
a55172d63e Support large VMs by removing the fixed balloon iteration limit 2015-10-09 13:50:34 +02:00
Marek Marczykowski-Górecki
28cc933c4c
qvm-prefs: fix validation of 'timezone' property
This should be done in QubesVm class (property setter). But since we're
going to rewrite both qvm-prefs and QubesVm, settle on smaller change
for now.

QubesOS/qubes-issues#1184
2015-10-05 05:56:16 +02:00
Marek Marczykowski-Górecki
d2617917be
qvm-prefs: refuse negative 'qrexec_timeout' value
This should be done in QubesVm class (property setter). But since we're
going to rewrite both qvm-prefs and QubesVm, settle on smaller change
for now.

Fixes QubesOS/qubes-issues#1273
2015-10-05 05:54:21 +02:00
Marek Marczykowski-Górecki
0e37ac617a
qvm-prefs: unify 'seamless_gui_mode' with other true/false properties 2015-10-05 05:53:48 +02:00
Marek Marczykowski-Górecki
7be7cf2c5e
qvm-prefs: fix setting dispvm_netvm to none
Fixes QubesOS/qubes-issues#1272
2015-10-05 05:53:04 +02:00
Marek Marczykowski-Górecki
16b8fa011b
qvm-prefs: fix display format of 'label' property
Fixes QubesOS/qubes-issues#1274
2015-10-05 05:52:35 +02:00
Marek Marczykowski-Górecki
9ea81c50ae
tests: add tests for 'qvm-prefs'
QubesOS/qubes-issues#1184
QubesOS/qubes-issues#1274
QubesOS/qubes-issues#1273
QubesOS/qubes-issues#1272
2015-10-05 05:52:21 +02:00
Marek Marczykowski-Górecki
958b59cc00
core: Show the right kernel version for DispVMs
Fixes QubesOS/qubes-issues#948
2015-10-03 01:50:15 +02:00
Marek Marczykowski-Górecki
4f04c62f36
Merge branch 'bug1241'
Fixes QubesOS/qubes-issues#1241
2015-10-02 01:59:17 +02:00
Marek Marczykowski-Górecki
fa3325a2b2
Merge branch 'bug1198'
Fixes QubesOS/qubes-issues#1198
2015-10-02 01:59:05 +02:00
Marek Marczykowski-Górecki
64590423fd
Merge branch 'bug1110'
Fixes QubesOS/qubes-issues#1110
2015-10-02 01:58:46 +02:00
Marek Marczykowski-Górecki
3cdae85254
core: preserve 'autostart' setting during VM rename
Systemd unit name needs to be renamed.

Fixes QubesOS/qubes-issues#1256
2015-10-02 01:57:00 +02:00
Marek Marczykowski-Górecki
d900b21dd8
tests: add test for #1256
QubesOS/qubes-issues#1256
2015-10-02 01:56:45 +02:00
Marek Marczykowski-Górecki
5043d17197
tests: fix misuse of self.assertNotRaises (#1163)
Fixes QubesOS/qubes-issues#1163
2015-09-30 22:34:12 +02:00
Marek Marczykowski-Górecki
7b9247efc5
version 3.1.0 2015-09-29 16:50:21 +02:00
Marek Marczykowski-Górecki
b9e6b0a076
core/hvm: fix error message when creating HVM while not supported by the hardware
libvirt reports such errors at domain definition, not startup (as was in
libxl).

QubesOS/qubes-issues#1198
2015-09-25 22:21:10 +02:00
Marek Marczykowski-Górecki
dd1bea98e1
core/start: ensure that the previous QubesDB daemon isn't running
When restarting VM (starting it just after it was shut down), it may
happen that previous `qubesdb-daemon` instance is still running - if VM
doesn't properly terminate the connection, dom0 part will not terminate
immediately, but at next alive check (every 10s). Such `qubesdb-daemon`,
when terminating, will remove pid file and socket file. In case of new
daemon already running it would be those of the new daemon, making the
whole QubesDB of this VM inaccessible for dom0 (`qubesdb-daemon` is
running, but its socket is removed).

To prevent this race, ensure that previous instance is terminated before
starting the new one.
There is no need to manually removing socket file, because if some stale
socket exists, it will be replaced by the new one when new
`qubesdb-daemon` starts up.

QubesOS/qubes-issues#1241
2015-09-25 22:06:14 +02:00
Marek Marczykowski-Górecki
ef6095662e
utils/QubesWatch: register domain watches on VIR_DOMAIN_EVENT_RESUMED
QubesVM.start() first creates domain as paused, completes its setup
(including starting qubesdb-daemon and creating appropriate entries),
then resumes the domain. So wait for that resume to be sure that
`qubesdb-daemon` is already running and populated.

QubesOS/qubes-issues#1110
2015-09-25 22:02:53 +02:00
Marek Marczykowski-Górecki
5f0d564051
utils/QubesWatch: use timers to retry QubesDB watch registration
QubesWatch._register_watches is called from libvirt event callback,
asynchronously to qvm-start. This means that `qubesdb-daemon` may
not be running or populated yet.

If first QubesDB connection (or watch registration) fails, schedule next
try using timers in libvirt event API (as it is base of QubesWatch
mainloop), instead of some sleep loop. This way other events will be
processed in the meantime.

QubesOS/qubes-issues#1110
2015-09-25 20:37:44 +02:00
Marek Marczykowski-Górecki
9205fbb336 backup: fix R2B3 and older backup restore (#1124)
Similar issue to qubesos/qubes-issues#1124
2015-09-06 00:06:09 +02:00
Marek Marczykowski-Górecki
4a4d16feb9 version 3.0.22 2015-09-05 00:28:45 +02:00
Marek Marczykowski-Górecki
c2cd84952e tests: backup compatibility with R2 (#1124)
QubesOS/qubes-issues#1124
2015-09-05 00:04:04 +02:00
Marek Marczykowski-Górecki
496a74f873 tests: add DispVM to backup compatibility test (r2b2)
Test for qubesos/qubes-issues#1124
2015-09-05 00:03:03 +02:00
Marek Marczykowski-Górecki
76bddaa280 core: use vm.absolute_path to parse paths in qubes.xml
This makes easier to handle some corner cases. One of them is having
entry without `dir_path` defined. This may happen when migrating from R2
(using backup+restore or in-place) while some DisposableVM was running
(even if not included in the backup itself).

Fixes qubesos/qubes-issues#1124
Reported by @doncohen, thanks @wyory for providing more details.
2015-09-04 01:58:53 +02:00
Marek Marczykowski-Górecki
226a144285 core: fix vm-persistence info for DispVM
(reported by @adrelanos)
qubesos/qubes-issues#1101
2015-09-03 21:11:43 +02:00
Marek Marczykowski-Górecki
4ba7d5a3cc version 3.0.21 2015-09-03 02:44:49 +02:00