minimal-vms: mask gvfs-daemon to prevent dbus timeout#636
minimal-vms: mask gvfs-daemon to prevent dbus timeout#636marmarek merged 1 commit intoQubesOS:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #636 +/- ##
=======================================
Coverage 70.30% 70.30%
=======================================
Files 3 3
Lines 495 495
=======================================
Hits 348 348
Misses 147 147 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026031800-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update
Failed tests24 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/166096#dependencies 25 fixed
Unstable testsDetails
Performance TestsPerformance degradation:4 performance degradations
Remaining performance tests:35 tests
|
|
You can keep it a system unit and use |
Oh god you're absolutely right! I made it way more complicated than it needed to be... I force pushed a new commit. Now there's a single service which is simply runs |
| setup_minimal_netvm() { | ||
| if [ "$UID" == "0" ]; then | ||
| /usr/lib/systemd/systemd-sysctl /etc/sysctl.d/82-qubes-minimal-sys-net.conf.optional | ||
| /usr/bin/systemctl --global --runtime mask gvfs-daemon.service |
There was a problem hiding this comment.
Why hardcode the path to /usr/bin?
There was a problem hiding this comment.
No particular reason, if you think it might cause issues, I'll remove it
There was a problem hiding this comment.
There was a recent problem of the merge of /usr/sbin with /usr/bin, because some paths were hardcoded, package migration was painful and scripts broke. I don't think /usr/bin will ever change, but if you are worried about path, than everything should be hardcoded: /bin/test etc. I prefer no hardcoding of path. The the environment variable PATH decide.
There was a problem hiding this comment.
Ok make sense. Thank you, let me fix that :)
82e4ad2 to
c28c0f1
Compare
| fi | ||
| } | ||
|
|
||
| is_minimal_netvm && setup_minimal_netvm |
There was a problem hiding this comment.
This, being the last line, will cause the service to be considered failed in non-minimal vm. Better use if syntax to avoid this side effect.
|
|
||
|
|
||
| setup_minimal_netvm() { | ||
| if [ "$UID" == "0" ]; then |
There was a problem hiding this comment.
The only thing that requires bash is this line, ==. What about:
#!/bin/sh
...
if test "$(id -u)" = "0"; then
...Some programs try to start gvfs-daemon, which refusing to start when minimal-vm is enabled, using a dbus method call and resulting in timeouts. Trying to start a masked service is detected by Dbus and doesn't trigger any timeout. The service is masked at runtime thanks to a new service executed when running a qube with minimal-netvm or minimal-usbvm.
Some programs try to start gvfs-daemon, which refusing to start when minimal-vm is enabled, using a dbus method call and resulting in timeouts.
Trying to start a masked service is detected by Dbus and doesn't trigger any timeout.
The service is masked at runtime thanks to a new service executed when running a qube with minimal-netvm or minimal-usbvm.
Fixes QubesOS/qubes-issues#10165 (comment)