This repository has been archived by the owner on Dec 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Enable agent restart without impacting running services #63
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eviction on shutdown.
…ods when shutting down. Draining all pods on agent shudown would mean stopping all services that are managed by the agent, which is not feasible for our scenario. Also added check during startup whether the service is already up and running, if it is already running we don't start it again.
lfrancke
previously approved these changes
Feb 18, 2021
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.
Just one real comment. I'll leave it up to you.
Cargo.toml
Outdated
@@ -8,8 +8,8 @@ edition = "2018" | |||
# We are currently referencing the Krustlet directly from the repository, because some features that we are using have | |||
# (exponential backoff most prominently) have not yet been included in a release | |||
# We will look to move this to officially released versions as soon as possible |
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.
Maybe update this comment?
To say why we reference a fork.
@@ -20,6 +20,28 @@ impl State<PodState> for Starting { | |||
async fn next(self: Box<Self>, pod_state: &mut PodState, _: &Pod) -> Transition<PodState> { | |||
if let Some(systemd_units) = &pod_state.service_units { | |||
for unit in systemd_units { | |||
match pod_state.systemd_manager.is_running(&unit.get_name()) { |
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.
I hate that this is basically a copy from below but I don't know a better way right now either...
lfrancke
approved these changes
Feb 18, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change dependency on Krustlet to use our fork, which skips draining pods when shutting down.
Draining all pods on agent shudown would mean stopping all services that are managed by the agent, which is not feasible for our scenario.
Also added check during startup whether the service is already up and running, if it is already running we don't start it again.
fixes #24