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

Apply "fix: do not crash on pool with no volumes" #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rustybird
Copy link
Contributor

@rustybird rustybird commented Oct 14, 2024

Submitted by @ethnh
Authored by @CertainLach
Fixes QubesOS/qubes-issues#9504

I don't know what exactly was crashing there. But the patch LGTM, and I've checked that list(qubesadmin.Qubes().pools['my-empty-pool'].volumes) now correctly results in [] instead of raising AssertionError.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.09%. Comparing base (30d7547) to head (54b7428).

Files with missing lines Patch % Lines
qubesadmin/storage.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
- Coverage   75.10%   75.09%   -0.01%     
==========================================
  Files          52       52              
  Lines        8552     8554       +2     
==========================================
+ Hits         6423     6424       +1     
- Misses       2129     2130       +1     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@CertainLach CertainLach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qubesd and qubes-qube-manager are not handling this AssertionError, resulting in crash.

I think this error might be specific to nixos-qubes bootstrapping, where the initial system doesn't even have kernels available, but still this AssertionError is not good

@rustybird
Copy link
Contributor Author

Makes sense that the crash was in qubesmanager: That was the only consumer of the buggy method I found too, and limited to kernel pools. (qvm-volume list --pool=... calls a different method)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not crash on pool with no volumes
2 participants