Commit Graph

2753 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
77da00e3ca backups: fix handling incomplete restore
We do not cancel the whole restore at first error.
2014-09-28 03:20:40 +02:00
Marek Marczykowski-Górecki
b6e60f9aa4 tests: no longer mark "encrypted and compressed backup" test as expected failure 2014-09-26 14:42:58 +02:00
Marek Marczykowski-Górecki
3f66d99f7f tests: silence unneeded messages (requires qubes-core-dom0-linux-2.0.24) 2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
d5c63786d9 tests: improve error reporting in backup tests 2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
6d3ff57466 tests: add more tests for backups system 2014-09-26 14:42:26 +02:00
Marek Marczykowski-Górecki
96d5b47cce qvm-tools/qvm-backup: add --debug option 2014-09-26 14:42:25 +02:00
Marek Marczykowski-Górecki
0cd8281ac1 backups: implement compression in backup format 3 (#775)
Since tar multi-archive no longer used, we can simply instruct tar to
pipe output through gzip (or whatever compressor we want). Include used
compressor command in backup header.
2014-09-26 14:42:07 +02:00
Marek Marczykowski-Górecki
fc0c0adff8 backups: do not use tar multi-volume feature, backup format 3 (#902)
Tar multi-volume support is broken when used with sparse files[1], so do
not use it. Instead simply cut the archive manually and concatenate at
restore time. This change require a little modification in restore
process, so make this new backup format ("3"). Also add backup format
version to the header, instead of some guessing code.
For now only cleartext and encrypted backups implemented, compression
will come as a separate commit.
2014-09-26 14:29:20 +02:00
Marek Marczykowski-Górecki
2c3159c7f9 backups: remove trailing semicolon 2014-09-26 03:19:21 +02:00
Marek Marczykowski-Górecki
58128a574a backups: force ASCII when writing backup header 2014-09-26 02:18:47 +02:00
Marek Marczykowski-Górecki
68460fb272 qvm-tools/qvm-shutdown: handle domains with xl daemon killed (#903)
When system is going down, systemd kills all the users processes,
including 'xl' daemons waiting for domain shutdown. This results in
zombie domains not cleaned up. The proper fix would be somehow extract
those processes from user session scope (most likely by starting them as
a service).

But because it applies only to system shutdown (qvm-shutdown
call there), it is simpler to add appropriate handling code to
qvm-shutdown.

In R3 the problem will vanish, because of use libvirtd deamon, so no
user processes required to track domains state.
2014-09-26 02:18:42 +02:00
Marek Marczykowski-Górecki
fc7d686b2e qvm-tools/qvm-shutdown: do not kill already dead VM
When VM stop just when the timeout expires, qvm-shutdown should not try
to kill it - this would result in QubesException("VM already stopped!").
2014-09-25 05:47:35 +02:00
Marek Marczykowski-Górecki
ec45308f1c backups: better handle quiet mode (for tests) 2014-09-25 05:47:35 +02:00
Marek Marczykowski-Górecki
e36488e8ec tests: add initial backup test 2014-09-25 05:47:35 +02:00
Marek Marczykowski-Górecki
715963c7c9 version 2.1.63 2014-09-19 11:01:07 +02:00
Victor Lopez
99315fd02c support partitions on loop devices
loop device parsing should have "dXpY_style = True" in order to
correctly parse partitions on loop devices.

Reasoning:
==========
Using losetup to create a virtual SD card disk into a loop device and
creating partitions for it results in new devices within an AppVM that
look like: /dev/loop0p1 /dev/loop0p2 and so on.

However as soon as they are created, Qubes Manager rises an exception
and becomes blocked with the following message (redacted):
"QubesException: Invalid device name: loop0p1
at line 639 of file /usr/lib64/python2.7/site-
packages/qubesmanager/main.py

Details:
line: raise QubesException....
func: block_name_to_majorminor
line no.: 181
file: ....../qubes/qubesutils.py
2014-09-19 11:00:56 +02:00
Marek Marczykowski-Górecki
9515300544 version 2.1.62 2014-09-18 08:36:03 +02:00
Marek Marczykowski-Górecki
dba6798a60 backups: change default HMAC algorithm to SHA512
Backups should be safe also for long-term, so change HMAC to SHA512,
which should be usable much longer than SHA1.

See this thread for discussion:
https://groups.google.com/d/msg/qubes-devel/5X-WjdP9VqQ/4zI8-QWd0S4J

Additionally save guessed HMAC in artificial header data (when no real
header exists).
2014-09-18 08:35:09 +02:00
Marek Marczykowski-Górecki
603384b4c6 tests: add initial backup test 2014-09-18 08:25:56 +02:00
Marek Marczykowski-Górecki
a12cf158da backups: handle empty tar output 2014-09-18 07:39:19 +02:00
Marek Marczykowski-Górecki
a40e946a3f backups: add qvm-backup-restore --debug option 2014-09-17 23:12:27 +02:00
Marek Marczykowski-Górecki
b506a0cc15 backups: make the restore more defensive
Continue restore even if some fails failed to extract
2014-09-17 23:12:27 +02:00
Marek Marczykowski-Górecki
2c7fbd88e2 backups: include tar error message when reporting problem with inner tar archive
Previously this message goes to /dev/null (unless BACKUP_DEBUG enabled),
so the user got cryptic "Restore failed" message without any clue about
the cause.
2014-09-17 23:12:27 +02:00
Marek Marczykowski-Górecki
ec74ebdc32 backups: fix handling of unicode in error messages, clean up "ERROR:" prefix usage
When non-english language is set, some processes can output non-ASCII
characters in error messages. Handle them nicely.

Also make error messages more consistent about "ERROR:" prefix. Do not
use this prefix in QubesException message, add it just before showing
the message to the user.
2014-09-17 23:12:19 +02:00
Marek Marczykowski-Górecki
228ae07543 backups: improve errors handling
Report nice error message (not a traceback), interrupt the process on
non-recoverable error (when extraction process is already dead).
2014-09-17 14:43:41 +02:00
Marek Marczykowski-Górecki
f0bbb28398 backups: implement verify-only option (#863) 2014-09-17 14:43:27 +02:00
Marek Marczykowski-Górecki
9ad4e15c66 core: inherit default_user from template 2014-09-16 01:46:41 +02:00
Marek Marczykowski-Górecki
17cf9f7a9b Remove duplicated line 2014-09-16 01:33:40 +02:00
Marek Marczykowski-Górecki
591826daa2 qvm-tools: fix error message for setting vcpus using qvm-prefs
Simple typo, but results in exception.
2014-09-16 01:21:21 +02:00
Marek Marczykowski-Górecki
4913fc4fbc qvm-tools: improve messages for qvm-create --root-{move,copy}
There was no separate message, so it looked like registering appmenus
takes a long time.
2014-09-16 01:20:06 +02:00
Marek Marczykowski-Górecki
355ed640b2 hvm: reserve memory for stubdom
Previously it was allocated from 50MB memory margin left by qmemman.
Which wasn't reliable enough.
2014-09-16 01:18:55 +02:00
Marek Marczykowski-Górecki
7b8e6283d5 version 2.1.61 2014-09-09 22:28:42 +02:00
Marek Marczykowski-Górecki
cd0118f7a6 Merge branch 'master' of http://git.woju.eu/qubes/core-admin 2014-09-09 22:27:58 +02:00
Marek Marczykowski-Górecki
6dbaede3d0 qvm-tools/qubes-prefs: report empty setting as empty string instead of "none" (#894) 2014-09-04 23:58:32 +02:00
Hakisho Nukama
be8d807624 removed duplicated comment tag 2014-09-04 23:31:38 +02:00
Marek Marczykowski-Górecki
d23f79d693 doc: update qvm-create man page 2014-08-12 00:17:45 +02:00
Wojciech Zygmunt Porczyk
d7958625c6 core+modules: provide meaingful repr()s for some classes 2014-08-11 16:34:33 +02:00
Marek Marczykowski-Górecki
76a82a7d47 doc: update qvm-ls man page 2014-08-02 23:22:34 +02:00
Marek Marczykowski-Górecki
5f92b0c86b version 2.1.60 2014-07-31 01:39:17 +02:00
Marek Marczykowski-Górecki
279dc78a02 core: do not reject already existing VMs with invalid name
It would break the system when the rules for names change. Warn instead.
2014-07-28 01:07:02 +02:00
Marek Marczykowski-Górecki
98540ac513 core: reject VM names longer than 31 chars 2014-07-28 01:00:51 +02:00
Marek Marczykowski-Górecki
7a5fc1357b version 2.1.59 2014-07-22 20:43:06 +02:00
Marek Marczykowski-Górecki
2f9247c39d notify: missing import 2014-07-20 13:39:02 +02:00
Marek Marczykowski-Górecki
b6b9f9d2f9 version 2.1.58 2014-07-17 11:39:25 +02:00
Marek Marczykowski-Górecki
913dac7b09 core: change default icon size
GUI daemon accepts up to 128x128 icons, so use that size by default.
2014-07-16 02:55:42 +02:00
Joanna Rutkowska
48bab870f6 version 2.1.57 2014-07-12 14:01:02 +02:00
Joanna Rutkowska
461c496833 Merge branch 'master' of http://git.woju.eu/qubes/core-admin 2014-07-12 13:59:52 +02:00
Wojciech Zygmunt Porczyk
f55fc1655d core/qubes.py: migrate to new label icons 2014-07-10 16:17:58 +02:00
Joanna Rutkowska
881c250bac version 2.1.56 2014-07-06 13:44:23 +02:00
Marek Marczykowski-Górecki
c10909e9f9 dispvm: use tray notification for "Updating default DispVM savefile" msg (#877) 2014-07-04 04:33:16 +02:00