-
-
Notifications
You must be signed in to change notification settings - Fork 119
Avoid de-configuring non-existing interface #563
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #563 +/- ##
==========================================
+ Coverage 70.46% 70.88% +0.42%
==========================================
Files 3 3
Lines 474 474
==========================================
+ Hits 334 336 +2
+ Misses 140 138 -2 ☔ 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=2025031619-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=2025021804-4.3&flavor=update
Failed tests15 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/129058#dependencies 6 fixed
Unstable testsPerformance TestsPerformance degradation:30 performance degradations
Remaining performance tests:42 tests
|
When 'vif-route-qubes offline' is called, the interface (usually) doesn't exist anymore. In that case, commands are called with 'do_without_error', but while it doesn't fail the script, it still logs misleading error message. Avoid calling 'ip' on non-existing interface to remove its address/route, as those are removed by the kernel implicitly anyway. But still call them on online action (if interface doesn't exist at this point, it will fail, and that's intentional to get proper error message), or when the interface still exist at the time the script is called (in which case, it may still race against disappearing the interface, but then there is 'do_without_error' prefix as the last resort). This way, it avoids confusing error in the common case, but still ensure things are cleaned up in the unusual case of interface staying there.
When 'vif-route-qubes offline' is called, the interface (usually)
doesn't exist anymore. In that case, commands are called with
'do_without_error', but while it doesn't fail the script, it still logs
misleading error message.
Avoid calling 'ip' on non-existing interface to remove its
address/route, as those are removed by the kernel implicitly anyway.
But still call them on online action (if interface doesn't exist at this
point, it will fail, and that's intentional to get proper error
message), or when the interface still exist at the time the script is
called (in which case, it may still race against disappearing the
interface, but then there is 'do_without_error' prefix as the
last resort). This way, it avoids confusing error in the common case,
but still ensure things are cleaned up in the unusual case of interface
staying there.