Skip to content

also restart dependent services after a service has been restarted#10273

Merged
ndeloof merged 2 commits intodocker:v2from
ndeloof:restart_dependent
Feb 14, 2023
Merged

also restart dependent services after a service has been restarted#10273
ndeloof merged 2 commits intodocker:v2from
ndeloof:restart_dependent

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Feb 13, 2023

What I did
As a service is restarted, restart dependent services to ensure they can access the restarted container, which is required when those are set to share namespaces.

Introduce --no-deps flag for those who prefer the legacy behavior, still disabled by default to enforce a predictable restart as side-effects of unshared namespaces is hard to diagnose.

Related issue
close #10263

(not mandatory) A picture of a cute animal, if possible in relation to what you did

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 72.79% // Head: 73.89% // Increases project coverage by +1.10% 🎉

Coverage data is based on head (fde8de4) compared to base (b19df5c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10273      +/-   ##
==========================================
+ Coverage   72.79%   73.89%   +1.10%     
==========================================
  Files           2        2              
  Lines         272      272              
==========================================
+ Hits          198      201       +3     
+ Misses         62       60       -2     
+ Partials       12       11       -1     
Impacted Files Coverage Δ
pkg/e2e/framework.go 72.15% <0.00%> (+1.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ndeloof ndeloof requested review from a team, StefanScherer, glours, laurazard, milas, nicksieger and ulyssessouza and removed request for a team February 13, 2023 15:12
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof merged commit 0612b34 into docker:v2 Feb 14, 2023
@ndeloof ndeloof deleted the restart_dependent branch February 14, 2023 10:34
@ndeloof
Copy link
Contributor Author

ndeloof commented Feb 14, 2023

Also created compose-spec/compose-spec#305 so that user can explicitly opt-in/out for service to be restarted after a dependency has been restarted

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.

restart behavior when using network_mode: service

2 participants