-
Notifications
You must be signed in to change notification settings - Fork 582
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
wrappers: do not reload activation units #14724
wrappers: do not reload activation units #14724
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14724 +/- ##
==========================================
+ Coverage 78.95% 79.01% +0.06%
==========================================
Files 1084 1085 +1
Lines 146638 147535 +897
==========================================
+ Hits 115773 116575 +802
- Misses 23667 23732 +65
- Partials 7198 7228 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
85552dc
to
0b732f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I think this maybe warrants a cli documentation update for --reload
to clarify this behavior.
43dc611
to
50304e8
Compare
* master: (44 commits) wrappers: do not reload activation units (canonical#14724) gadget/install: support for no{exec,dev,suid} mount flags interfaces/builtin/mount_control: add support for nfs mounts (canonical#14694) tests: use gojq - part 1 (canonical#14686) interfaces/desktop-legacy: allow DBus access to com.canonical.dbusmenu interfaces/builtin/fwupd.go: allow access to nvmem for thunderbolt plugin tests: removing uc16 executions (canonical#14575) tests: Added arm github runner to build snapd (canonical#14504) tests: no need to run spread when there are not tests matching the filter (canonical#14728) tests/lib/tools/store-state: exit on errors, update relevant tests (canonical#14725) tests: udpate the github workflow to run tests suggested by spread-filter tool (canonical#14519) testtime: add mockable timers for use in tests (canonical#14672) interface/screen_inhibit_control: Improve screen inhibit control for use on core (canonical#14134) tests: use images with 20G disk in openstack (canonical#14720) i/builtin: allow @ in custom-device filepaths (canonical#14651) tests: refactor test-snapd-desktop-layout-with-content tests: fix broken app definition tests: capitalize sentences in comments tests: wrap very long shell line tests: fix raciness in async startup and sync install ...
Reported here: https://bugs.launchpad.net/snapd/+bug/2083961 it seems that we fail to restart services that have activation units when passing
--reload
.Difference of
snap restart
andsnap restart --reload
When we do
snap restart
we actually dosystemctl stop ...
and thensystemctl start ...
. This works completely fine when doing this on activated service units, with their activation units, and thus we do not see an issue here.When we do
snap restart --reload
, we directly callsystemctl reload-or-restart
on the service unit and its activation units, however this causes an error from systemd, for two different reasons:To fix this, we revert to the default behavior when reloading for activated units. Meaning, instead of operating on the activation units as well as the activated unit, we just operate on the activated unit (which does support reload-or-restart).
REF: SNAPDENG-34173