Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qvm-backup-restore fails to properly parse labels #3219

Closed
jwoytek opened this issue Oct 26, 2017 · 3 comments
Closed

qvm-backup-restore fails to properly parse labels #3219

jwoytek opened this issue Oct 26, 2017 · 3 comments
Labels
R: duplicate Resolution: Another issue exists that is very similar to or subsumes this one.

Comments

@jwoytek
Copy link

jwoytek commented Oct 26, 2017

Qubes OS version:

4.0

Affected TemplateVMs:

N/A


Steps to reproduce the behavior:

Attempt to restore a backup from another Qubes 4.0 system that may be running a slightly different update level.

Expected behavior:

Restore should succeed.

Actual behavior:

Restore fails with a KeyError exception at line 134 in file /usr/lib/python3.5/site-packages/qubesadmin/backup/core3.py

This exception occurs because some backups seem to have the color stored in vm.properties, and some systems have "label-X" instead of colors in self.labels. When working with multiple machines, we found that some had label-X in self.labels, and some had colors. The restore process seems to assume that self.labels has colors as keys.

All systems involved were Qubes 4.0rc1. rc2 does not function on any of our hardware, so we were unable to test that.

General notes:


Related issues:

@jwoytek
Copy link
Author

jwoytek commented Oct 26, 2017

Quick fix:

At line 134 in file /usr/lib/python3.5/site-packages/qubesadmin/backup/core3.py:
vm.label = vm.properties.pop('label')
try:
vm.label = self.labels[vm.label]
except KeyError:
pass

@andrewdavidwong
Copy link
Member

This appears to be a duplicate of #3211. If you believe this is not really a duplicate, please leave a comment briefly explaining why. We'll be happy to take another look and, if appropriate, reopen this issue. Thank you.

@andrewdavidwong andrewdavidwong added the R: duplicate Resolution: Another issue exists that is very similar to or subsumes this one. label Oct 27, 2017
@jwoytek
Copy link
Author

jwoytek commented Oct 27, 2017

Concur on the duplicate issue. There was a delay between discovery and filing, and I missed the prior report. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R: duplicate Resolution: Another issue exists that is very similar to or subsumes this one.
Projects
None yet
Development

No branches or pull requests

2 participants