Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upqvm-backup-restore should be more defensive #212
Comments
marmarek
assigned
rootkovska
Mar 8, 2015
marmarek
added this to the Release 1 Beta 1 milestone
Mar 8, 2015
marmarek
added
bug
C: core
P: major
labels
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Modified by joanna on 10 Apr 2011 11:21 UTC |
marmarek
modified the milestones:
Release 1 Beta 2,
Release 1 Beta 1
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Modified by marmarek on 20 Apr 2011 17:48 UTC |
marmarek
assigned
marmarek
and unassigned
rootkovska
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 8, 2015
Member
Comment by marmarek on 20 Apr 2011 18:08 UTC
http://git.qubes-os.org/gitweb/?p=marmarek/core.git;a=commit;h=50af1d15b31eeb2df66ac96f0d8fa2e1af00e421
|
Comment by marmarek on 20 Apr 2011 18:08 UTC |
marmarek
closed this
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 8, 2015
Member
Comment by joanna on 17 Jul 2011 23:15 UTC
Nope, it still crashes when encounters a simple problem e.g. with appmenus restoring. This is what I just got:
(...)
-> Adding AppVM qbdev-f13...
Traceback (most recent call last):
File "/usr/bin/qvm-backup-restore", line 399, in <module>
main()
File "/usr/bin/qvm-backup-restore", line 382, in main
vm.create_appmenus(verbose=True)
File "/usr/lib64/python2.6/site-packages/qubes/qubes.py", line 750, in create_appmenus
subprocess.check_call (["none", self.name, vmtype](qubes_appmenu_create_cmd,))
NameError: global name 'vmtype' is not defined
qvm-backup-restore crashed and left the user with half-restored systems, where none of the appvms are seen in the manager, yet some appmenus are seen in the menu. Now, the user must manually use qvm-add-appvm, and then qvm-pref (to set the label). (And how to create appmenus?).
What a mess!
So, qvm-backup-restore should catch all the exceptions, and even if it cannot restore one AppVM it should continue trying with others.
Also, I think we should change the loop logic, from:
for each VM {
- copy files
}
for each VM { - restore appmenus
}
for each VM { - add to qubes DB
}
to:
for each VM {
- copy files
- restore appmenus
- add to qubes DB
}
This would ensure we won't get half of the VMs in half-restored state when we screwed up and didn't catch some exception.
|
Comment by joanna on 17 Jul 2011 23:15 UTC
qvm-backup-restore crashed and left the user with half-restored systems, where none of the appvms are seen in the manager, yet some appmenus are seen in the menu. Now, the user must manually use qvm-add-appvm, and then qvm-pref (to set the label). (And how to create appmenus?). What a mess! So, qvm-backup-restore should catch all the exceptions, and even if it cannot restore one AppVM it should continue trying with others. Also, I think we should change the loop logic, from: for each VM {
to: for each VM {
This would ensure we won't get half of the VMs in half-restored state when we screwed up and didn't catch some exception. |
marmarek
added
P: critical
and removed
P: major
labels
Mar 8, 2015
marmarek
reopened this
Mar 8, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Modified by marmarek on 20 Jul 2011 15:18 UTC |
marmarek commentedMar 8, 2015
Reported by joanna on 8 Apr 2011 15:05 UTC
It should not throw an exception whenever e.g. it cannot find some apps folder (create appmenus), etc. It's really annoying when it throws an exception after it copied a few tens of GBs of data, only because create_apps_for_appvm.sh returned error. And the user gets a half-restored system, which is really not good.
Migrated-From: https://wiki.qubes-os.org/ticket/212