You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually starting to use the deallocator to clean up services
**- What I did**
This patch actually stars to use the deallocator to clean up services, as
well as service-level resources (as of now, only networks).
**- How I did it**
A previous patch (moby#2759) introduced a
new component, the deallocator, responsible for cleaning up services and
service-level resources. This patch is actually starting to make use of that
component.
Since the deallocator used to rely on the reaper deleting the tasks belonging
to services that had been marked for removal, a previous version of this patch
was modifying the task reaper quite heavily to also keep track of such services
(needed since otherwise the reaper would fail to clean up all of them, instead
keeping some for history tracking purposes). However, it soon appeared that
this was not the best approach:
* this creates a hidden coupling between the reaper and the deallocator
* it's also not the best user experience to suddenly remove all of a service's
task history while shutting down, for not apparent reason to the user
For these reasons, this patch instead amends the deallocator to also look at tasks status when keeping track of how many alive tasks remain to a service.
**- How to test it**
Updated tests.
**- Description for the changelog**
Services & networks are no longer deleted immediately when a user requests their
deletion; instead, they are deleted when all their tasks are actually shut down.
Signed-off-by: Jean Rouge <jer329@cornell.edu>
0 commit comments