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 verify-only: archives having dom0 yield NoneType error #3362

Closed
tasket opened this Issue Dec 1, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@tasket

tasket commented Dec 1, 2017

Qubes OS version:

R4.0-rc3


Steps to reproduce the behavior:

qvm-backup-restore --verify-only path-to-archive

The archive must contain a backup of dom0.

Expected behavior:

Verify completes without error.

Actual behavior:

app: Checking backup content...
Traceback (most recent call last):
  File "/usr/bin/qvm-backup-restore", line 5, in <module>
    sys.exit(main())
  File "/usr/lib/python3.5/site-packages/qubesadmin/tools/qvm_backup_restore.py", line 245, in main
    restore_info = backup.get_restore_info()
  File "/usr/lib/python3.5/site-packages/qubesadmin/backup/restore.py", line 1536, in get_restore_info
    vms_to_restore['dom0'] = self.Dom0ToRestore(vm)
  File "/usr/lib/python3.5/site-packages/qubesadmin/backup/restore.py", line 795, in __init__
    self.username = os.path.basename(subdir)
  File "/usr/lib64/python3.5/posixpath.py", line 139, in basename
    i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

General notes:

Although an archive must contain a dom0 backup to produce the error, omitting dom0 from vm selection (only specifying appvms on the command line) has no effect.


Related issues:

#3303

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Dec 7, 2017

I'm looking into a fix for this one, also.

tasket commented Dec 7, 2017

I'm looking into a fix for this one, also.

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Dec 10, 2017

@marmarek I think I have it fixed. Should I combine it with the other commits in PR#42?

QubesOS/qubes-core-admin-client#42

tasket commented Dec 10, 2017

@marmarek I think I have it fixed. Should I combine it with the other commits in PR#42?

QubesOS/qubes-core-admin-client#42

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Dec 10, 2017

Also, I ran into an anomaly in the VM listing when processing a dom0-bearing archive:

The following VMs are included in the backup:

--------+---------+----------+-----------+--------+
   name |    type | template |     netvm |  label |
--------+---------+----------+-----------+--------+
 temp10 |   AppVM |       d9 | wireguard | orange |
   dom0 | AdminVM |      n/a | (default) |  black |
   Dom0 |    Home |          |           |        |

Notice the extra entry for dom0. Its from the last code block in get_restore_summary() and I'm thinking it should be removed...?

tasket commented Dec 10, 2017

Also, I ran into an anomaly in the VM listing when processing a dom0-bearing archive:

The following VMs are included in the backup:

--------+---------+----------+-----------+--------+
   name |    type | template |     netvm |  label |
--------+---------+----------+-----------+--------+
 temp10 |   AppVM |       d9 | wireguard | orange |
   dom0 | AdminVM |      n/a | (default) |  black |
   Dom0 |    Home |          |           |        |

Notice the extra entry for dom0. Its from the last code block in get_restore_summary() and I'm thinking it should be removed...?

@tasket tasket referenced this issue in QubesOS/qubes-core-admin-client Dec 11, 2017

Merged

Fix dom0-related issues #43

@tasket

This comment has been minimized.

Show comment
Hide comment

@tasket tasket closed this Jan 10, 2018

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 11, 2018

Member

Keeping this open for builder-github (unless we know we don't need it tracked for some reason).

Member

andrewdavidwong commented Jan 11, 2018

Keeping this open for builder-github (unless we know we don't need it tracked for some reason).

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 11, 2018

Member

Never mind, looks like tracking works fine even if it's closed.

Member

andrewdavidwong commented Jan 11, 2018

Never mind, looks like tracking works fine even if it's closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment