Skip to content

Fix bug in storage/__init__.py dropping "False" config values#834

Open
andersonarc wants to merge 1 commit into
QubesOS:mainfrom
andersonarc:main
Open

Fix bug in storage/__init__.py dropping "False" config values#834
andersonarc wants to merge 1 commit into
QubesOS:mainfrom
andersonarc:main

Conversation

@andersonarc

Copy link
Copy Markdown
Contributor

The _sanitize_config function drops "False" values from the config, resulting in properties such as rw="False" disappearing. As a consequence, the default value of "True" gets reassigned to them. Similar to #829, but does not have any practical consequences I can think of beyond having the correct/expected behavior for the "False" values.

To reproduce:

[user@dom0 ~]$ sudo systemctl stop qubesd
[user@dom0 ~]$ sudo nano /var/lib/qubes/qubes.xml # Set rw="False" for any domU volume
[user@dom0 ~]$ sudo systemctl start qubesd 
[user@dom0 ~]$ # At this stage, rw="False" is still present
[user@dom0 ~]$ # Now, make any edit to the domU - the simplest example is to change the vCPU count, and then apply it
[user@dom0 ~]$ # Then, rw="False" will fully disappear in qubes.xml
[user@dom0 ~]$ sudo systemctl restart qubesd 
[user@dom0 ~]$ # Now, make another edit to the domU to trigger a fresh save
[user@dom0 ~]$ # Now rw="True" appears in qubes.xml

Pinging @marmarek for review.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.47%. Comparing base (befbb9b) to head (35bf9c3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #834   +/-   ##
=======================================
  Coverage   70.46%   70.47%           
=======================================
  Files          61       61           
  Lines       14161    14162    +1     
=======================================
+ Hits         9979     9980    +1     
  Misses       4182     4182           
Flag Coverage Δ
unittests 70.47% <100.00%> (+<0.01%) ⬆️

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant