Marek Marczykowski-Górecki
b8b2733114
core: fix un-setting global VMs (default netvm, clockvm etc)
2014-05-05 05:24:04 +02:00
Wojciech Zygmunt Porczyk
624ab67e86
qubesutils.py: don't fail on broken symlinks
2014-05-02 17:03:50 +02:00
Wojciech Zygmunt Porczyk
1840420331
qubesutils.py: fix get_disk_usage hidden exception
2014-04-30 15:43:35 +02:00
Wojciech Zygmunt Porczyk
4b15838009
qubesutils.py: remove imported but unused classes
...
This is needed to remove circular dependency with modules.
This commit is part of #822 fix.
2014-04-28 12:19:52 +02:00
Wojciech Zygmunt Porczyk
ee059df63e
qubesutils.py: get_disk_usage
...
get_disk_usage is moved from code-modules and backup.py and rewritten not to
call external du
This commit is part of #822 fix.
2014-04-24 21:50:12 +02:00
Marek Marczykowski-Górecki
f324f4eef8
core: verify template compatibility when adding new VM
...
It is done in Qubes Manager, but do it at lower level - especially for
qvm-create tool.
2014-04-18 01:35:12 +02:00
Marek Marczykowski-Górecki
ef09f2ed2a
Disable PAT in linux VMs
...
Apparently kernel patch "x86/cpa: Use pte_attrs instead of pte_flags on
CPA/set_p.._wb/wc operations" (in out repo) doesn't fully solve the
problem and sometimes qubes-gui agent crashes with message like
"qubes-gui:664 map pfn expected mapping type write-back for [mem
0x00093000-0x00093fff], got uncached-minus".
Because PAT we really need only in dom0 (lack of it dramatically
decrease performance of some graphics drivers), we can simply disable it
in VM - as it is currently done in upstream kernel.
2014-04-16 16:44:42 +02:00
Marek Marczykowski-Górecki
5cbfb64a57
qubesutils: enable/disable updates check on all the VMs and dom0 ( #800 )
2014-04-11 07:06:12 +02:00
Marek Marczykowski-Górecki
bc70581bd3
qubesutils: Add meminfo watching to QubesWatch class ( #788 )
2014-03-31 03:45:21 +02:00
Marek Marczykowski-Górecki
9e7b8a63bc
qubesutils: reduce code duplication in QubesWatch class
2014-03-30 22:53:34 +02:00
Marek Marczykowski-Górecki
5d7688a2fe
backups: allow provide full path for the backup (instead of directory) ( #801 )
...
This will allow the user to choose custom filename, instead of
auto generated 'qubes-backup-XXX'.
2014-03-17 21:15:39 +01:00
Marek Marczykowski-Górecki
b298110d5f
backups: list VMs not selected for backup ( #801 )
2014-03-14 16:31:04 +01:00
Marek Marczykowski-Górecki
09652cb0f8
core: store date of last backup for each VM
2014-03-10 04:29:14 +01:00
Marek Marczykowski-Górecki
1d4a26f3a8
add convenient symlinks simulating target python files layout
2014-03-10 01:05:01 +01:00
Marek Marczykowski-Górecki
f4194c9d08
backups: implement async backup/restore cancel method ( #793 )
...
The backup_cancel() method kills processes registered by main thread and
set "running_backup_operation.canceled" to True. Then main thread get an
error because of killed processes and check if that was because of
cancel request.
Introduce BackupCanceledError, which can report temporary dir to remove.
2014-03-08 03:55:47 +01:00
Marek Marczykowski-Górecki
b52d1a4379
backups: remove unused variables
2014-03-08 03:55:23 +01:00
Marek Marczykowski-Górecki
7e507cba6a
backups: fix header handling when restoring from VM
...
Do wait for nest reported filename only when restoring directly from
dom0. In VM case it isn't necessary and will cause false error report
(because filename will be set to nextfile at the end of restore process,
so will be treated as spurious file without hmac).
2014-03-08 03:52:21 +01:00
Marek Marczykowski-Górecki
4a56b65b59
backups: fix error reporting, do not report EOF as an error
...
Do not report main thread error (notified as "ERROR" file) as
ExtractWorker error.
2014-03-08 03:50:08 +01:00
Marek Marczykowski-Górecki
c430355a5b
backups: correctly mark if dom0 is present in the backup
...
Reset dom0 "backup_content" flag to False, then possibly set it to True.
2014-03-08 03:46:41 +01:00
Marek Marczykowski-Górecki
11961cbbff
qvm-block: fix handling unusual devices attached to dom0
...
Simply get device major-minor from /dev/ device file.
This is only partial solution, because this will work only for dom0
devices, but the same problem can apply to VM.
2014-03-05 00:49:28 +01:00
Marek Marczykowski-Górecki
62457da085
Merge branch 'appicons'
2014-02-07 05:52:36 +01:00
Danny Fullerton
8dbc417642
backups: Fix backup's passphrase unicode encoding issue
2014-02-05 06:51:47 +01:00
Marek Marczykowski-Górecki
7278102aef
backups: fix VM size calculation
...
Count only files included in the backup, not all of them (so ignore
temporary files etc).
2014-02-05 05:48:55 +01:00
Marek Marczykowski-Górecki
f461c09d89
backups: improve error message
2014-02-05 04:34:30 +01:00
Marek Marczykowski-Górecki
f2f9f568cd
backups: enforce estimated upper limit on extracted files count
...
Do not allow (compromised) source VM to use all inodes.
2014-02-05 02:48:00 +01:00
Marek Marczykowski-Górecki
038877d35d
backups: fix tar output handling
...
Tar print the filename right _before_ processing the file, so wait for
the next filename before processing actual file.
2014-02-01 14:03:26 +01:00
Marek Marczykowski-Górecki
75c0e775a4
backups: simplify EOL markers handling
...
Let the python do it right.
2014-02-01 14:02:38 +01:00
Marek Marczykowski-Górecki
a17b7f584d
backups: improve exception reporting during extract
...
Report original exception location, not the wrapper function.
2014-02-01 14:01:21 +01:00
Marek Marczykowski-Górecki
f1bb17a3e1
backups: improve error reporting for invalid backup directory
2014-01-19 04:51:46 +01:00
Marek Marczykowski-Górecki
a6740610e3
backups: fix handling new format without backup header
...
Tar will report error when 'backup-header' file wasn't found. Ignore
this particular error.
2014-01-19 04:50:56 +01:00
Marek Marczykowski-Górecki
49259dacf6
backup: minor fix in function arguments
2014-01-19 04:50:23 +01:00
Marek Marczykowski-Górecki
849cfbf826
Merge remote-tracking branch 'woju/master' into appicons
2014-01-16 05:13:05 +01:00
Marek Marczykowski-Górecki
26b32ca51e
backups: refuse to create encrypted and compressed backup ( #775 )
2014-01-15 05:00:13 +01:00
Marek Marczykowski-Górecki
357fe37ed2
backups: change data/time delimiter in filename according to ISO 8601
2014-01-15 04:34:51 +01:00
Marek Marczykowski-Górecki
50c00e555e
backups: make cleanup code more defensive
...
If we are killing remaining processes in cause of exception, ignore
failure here (OSError is raised in case of non existing process).
2014-01-15 03:57:59 +01:00
Marek Marczykowski-Górecki
7b1e9f3bfb
backups: implement backup header
...
It stores basic backup information like used hmac/crypto algorithm,
whether backup is encrypted/compressed and possibly more. The header
file is parsed only after successful HMAC verification. Because we do
not know which HMAC algorithm was used before reading the header, try to
guess trying all supported (starting with the default one).
Backup header is stored as the first file, which is always not encrypted
and not compressed. Then qubes.xml follows.
2014-01-15 03:53:45 +01:00
Marek Marczykowski-Górecki
4c29d743c8
backups: introduce configurable HMAC/encryption algo
...
For now always set it to default values (no frontend application uses
those parameters), but be prepared for further improvements.
2014-01-15 03:50:29 +01:00
Marek Marczykowski-Górecki
4b493b6d9a
backups: unify compress/encrypt parameter names
2014-01-15 03:45:12 +01:00
Marek Marczykowski-Górecki
a2037a4985
backups: do not hardcode limit values in the code ( #771 )
...
Also introduce limit for stderr read from VM (anti DoS protection).
2014-01-15 03:36:16 +01:00
Marek Marczykowski-Górecki
b85cd0448f
backups: minor fixes, mostly formatting
2014-01-15 01:05:54 +01:00
Marek Marczykowski-Górecki
40953176f4
backups: reorganise restore API
...
Call backup_restore_header from backup_restore_prepare, there is no
sense in requiring the user to call them separately. Also store all
parameters in restore_info object as special '$OPTIONS$' VM to not
require passing them twice (with all the chances for the errors).
2014-01-13 04:45:02 +01:00
Marek Marczykowski-Górecki
338fc74ea2
backups: misc minor fixes
2014-01-13 04:37:54 +01:00
Marek Marczykowski-Górecki
c6ca2725a1
backups: rename classes according to coding style
2014-01-13 04:27:19 +01:00
Wojciech Porczyk
962d3da42e
appicons
...
labels need to be specified with colour code
also fixed duplicate QubesDispVmLabels
2014-01-11 00:07:55 +01:00
Marek Marczykowski-Górecki
c825a41909
backups: ignore EPIPE on pipe.close()
...
This is most likely some padding left in output buffer. See #764
comments for details.
2014-01-10 03:31:15 +01:00
Marek Marczykowski-Górecki
6abca8ce57
backups: do not chdir() in main process
...
This can be any application, for example Qubes Manager. Changing current
dir can have side effects, especially when we do not change it back
after restore (or in any error encountered).
2014-01-10 03:30:59 +01:00
Marek Marczykowski-Górecki
29bd92aad9
backups: terminate Extract_Worker on error in main process
2014-01-10 03:28:53 +01:00
Marek Marczykowski-Górecki
d86865d299
backups: fix passing -z option to openssl
...
Note that this is not fix #775 in any way.
2014-01-10 03:26:50 +01:00
Marek Marczykowski-Górecki
01312a17d6
backups: improve error handling in Extract_Worker
...
Terminate children when exception raised. Also rename tar2_command to
tar2_process to improve readability.
2014-01-10 03:23:51 +01:00
Marek Marczykowski-Górecki
eeca3eb697
backups: improve error reporting when something failed in dest VM
2014-01-10 03:20:48 +01:00