Skip to content
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

Improve restart commands by passing changed settings #1480

Merged
merged 2 commits into from
Apr 30, 2021

Conversation

sanu11
Copy link
Contributor

@sanu11 sanu11 commented Apr 12, 2021

Issue number:
#1389

Description of changes:
Pass a space separated string of changed settings to the restart command
Here, I have added a function to return a map of service, list of changed settings so that we get the list of changed settings for a particular service and that list can be passed as a env to the restart command fo that service. Here I have used env because some commands are systemctl based and passing them as arguments to them wouldn't be right.

Author: Sanika <shasanik@amazon.com>
Date:   Sat Apr 10 00:29:23 2021 +0000

    thar-be-settings: pass changed settings to restart commands
    
    When the changed settings affect any services, the changed settings are passed to the restart command of that service.
    The changed settings are passed as space separated strings to the env of the restart command.
    The env is only set when there are any changed settings that affects the service.

Handle the changed settings for host-containers. Handle only the host-containers whose setting is changed.

Author: Sanika <shasanik@amazon.com>
Date:   Sat Apr 10 00:43:09 2021 +0000

    host-containers: handle host-containers based on changed settings passed to the restart command
    
    if there are no changed settings passed, say during startup, handle all the host containers.
    if the settings are changed for a particular host container, handle only that host container.
    if the settings are not host-container settings, but do affect host-containers, handle all the host-containers.

Testing done:

  1. Verified that on startup, all the host containers are handled
Apr 29 19:29:50 ip-172-31-44-44.us-west-2.compute.internal thar-be-settings[3581]: 19:29:50 [INFO] Command stdout: 19:29:50 [INFO] host-containers started
Apr 29 19:29:50 ip-172-31-44-44.us-west-2.compute.internal thar-be-settings[3581]: 19:29:50 [INFO] Handling host container 'control' during full configuration process
Apr 29 19:29:50 ip-172-31-44-44.us-west-2.compute.internal thar-be-settings[3581]: 19:29:50 [INFO] Host container 'control' is enabled: true, superpowered: false, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.5.0
Apr 29 19:29:50 ip-172-31-44-44.us-west-2.compute.internal thar-be-settings[3581]: 19:29:50 [INFO] Handling host container 'admin' during full configuration process
Apr 29 19:29:50 ip-172-31-44-44.us-west-2.compute.internal thar-be-settings[3581]: 19:29:50 [INFO] Host container 'admin' is enabled: true, superpowered: true, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0

  1. Verified that if a particular host-container setting is changed, only that host-container is handled
apiclient set  settings.host-containers.admin.source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0
 
Apr 29 19:33:10 ip-172-31-44-44.us-west-2.compute.internal apiserver[4784]: 19:33:10 [TRACE] (1) thar_be_settings: [api/thar-be-settings/src/main.rs:191] Found services: Services({"host-containers": Service { changed_settings: Some({"settings.host-containers.admin.source"}), model: Service { configuration_files: [], restart_commands: ["/usr/bin/host-containers"] } }})

Apr 29 19:33:10 ip-172-31-44-44.us-west-2.compute.internal apiserver[4784]: 19:33:10 [INFO] Command stdout: 19:33:10 [INFO] host-containers started
Apr 29 19:33:10 ip-172-31-44-44.us-west-2.compute.internal apiserver[4784]: 19:33:10 [INFO] Handling host container 'admin' because it's directly affected by changed setting 'settings.host-containers.admin.source' (and maybe others)
Apr 29 19:33:10 ip-172-31-44-44.us-west-2.compute.internal apiserver[4784]: 19:33:10 [INFO] Host container 'admin' is enabled: true, superpowered: true, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0
Apr 29 19:33:10 ip-172-31-44-44.us-west-2.compute.internal apiserver[4784]: 19:33:10 [INFO] Not handling host container 'control', no changed settings affect it


apiclient set  settings.host-containers.control.enabled=true

Apr 29 19:34:18 ip-172-31-44-44.us-west-2.compute.internal apiserver[4811]: 19:34:18 [TRACE] (1) thar_be_settings: [api/thar-be-settings/src/main.rs:191] Found services: Services({"host-containers": Service { changed_settings: Some({"settings.host-containers.control.enabled"}), model: Service { configuration_files: [], restart_commands: ["/usr/bin/host-containers"] } }})

Apr 29 19:34:18 ip-172-31-44-44.us-west-2.compute.internal apiserver[4811]: 19:34:18 [INFO] Command stdout: 19:34:18 [INFO] host-containers started
Apr 29 19:34:18 ip-172-31-44-44.us-west-2.compute.internal apiserver[4811]: 19:34:18 [INFO] Handling host container 'control' because it's directly affected by changed setting 'settings.host-containers.control.enabled' (and maybe others)
Apr 29 19:34:18 ip-172-31-44-44.us-west-2.compute.internal apiserver[4811]: 19:34:18 [INFO] Host container 'control' is enabled: true, superpowered: false, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.5.0
Apr 29 19:34:18 ip-172-31-44-44.us-west-2.compute.internal apiserver[4811]: 19:34:18 [INFO] Not handling host container 'admin', no changed settings affect it

  1. Verified that if a setting that doesn't belong to settings.host-containers but affects the host-containers, all the host-containers are handled
apiclient set settings.network.https-proxy="0.0.0.0:9898"

Apr 29 19:34:57 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:57 [TRACE] (1) thar_be_settings: [api/thar-be-settings/src/main.rs:191] Found services: Services({"docker": Service { changed_settings: Some({"settings.network.https-proxy"}), model: Service { configuration_files: [SingleLineString { inner: "proxy-env" }], restart_commands: ["/bin/systemctl try-restart docker.service"] } }, "host-containers": Service { changed_settings: Some({"settings.network.https-proxy"}), model: Service { configuration_files: [], restart_commands: ["/usr/bin/host-containers"] } }, "containerd": Service { changed_settings: Some({"settings.network.https-proxy"}), model: Service { configuration_files: [SingleLineString { inner: "containerd-config-toml" }, SingleLineString { inner: "proxy-env" }], restart_commands: ["/bin/systemctl try-restart containerd.service"] } }, "host-containerd": Service { changed_settings: Some({"settings.network.https-proxy"}), model: Service { configuration_files: [SingleLineString { inner: "proxy-env" }], restart_commands: ["/bin/systemctl try-restart host-containerd.service"] } }, "ecs": Service { changed_settings: Some({"settings.network.https-proxy"}), model: Service { configuration_files: [SingleLineString { inner: "ecs-config" }], restart_commands: ["/usr/bin/ecs-settings-applier", "/bin/systemctl try-reload-or-restart ecs.service"] } }})

Apr 29 19:34:59 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:59 [INFO] Command stdout: 19:34:58 [INFO] host-containers started
Apr 29 19:34:59 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:58 [INFO] Handling host container 'admin' because it's indirectly affected by changed setting 'settings.network.https-proxy' (and maybe others)
Apr 29 19:34:59 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:58 [INFO] Host container 'admin' is enabled: true, superpowered: true, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0
Apr 29 19:34:59 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:58 [INFO] Handling host container 'control' because it's indirectly affected by changed setting 'settings.network.https-proxy' (and maybe others)
Apr 29 19:34:59 ip-172-31-44-44.us-west-2.compute.internal apiserver[4836]: 19:34:58 [INFO] Host container 'control' is enabled: true, superpowered: false, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.5.0
  1. Verified that code doesn't break if we pass in setting that has no affected services
 apiclient set settings.metrics.metrics-url=https://metrics.bottlerocket.aws/v1/metrics

Apr 29 19:36:48 ip-172-31-44-44.us-west-2.compute.internal apiserver[6307]: 19:36:48 [TRACE] (1) thar_be_settings: [api/thar-be-settings/src/main.rs:191] Found services: Services({})
Apr 29 19:36:48 ip-172-31-44-44.us-west-2.compute.internal apiserver[6307]: 19:36:48 [INFO] No services are affected, exiting...

  1. Verified that corresponding services are handled, if we pass in a list of changed_settings that affects different services
apiclient set settings.host-containers.admin.source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0 settings.motd="helllo"

Apr 29 00:03:45 ip-172-31-33-3.us-west-2.compute.internal apiserver[4812]: 00:03:45 [TRACE] (1) thar_be_settings: [api/thar-be-settings/src/main.rs:191] Found services: Services({"motd": Service { changed_settings: Some({"settings.motd"}), model: Service { configuration_files: [SingleLineString { inner: "motd" }], restart_commands: [] } }, "host-containers": Service { changed_settings: Some({"settings.host-containers.admin.source"}), model: Service { configuration_files: [], restart_commands: ["/usr/bin/host-containers"] } }})

Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] Restarting affected services...
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [DEBUG] (1) thar_be_settings::service: Checking for restart-commands for host-containers
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] restart commands ["/usr/bin/host-containers"]
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [DEBUG] (1) thar_be_settings::service: Restart command: "/usr/bin/host-containers"

Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] Command stdout: 19:37:03 [INFO] host-containers started
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] Handling host container 'admin' because it's directly affected by changed setting 'settings.host-containers.admin.source' (and maybe others)
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] Host container 'admin' is enabled: true, superpowered: true, with source: 328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.7.0
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] Not handling host container 'control', no changed settings affect it

Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [DEBUG] (1) thar_be_settings::service: Checking for restart-commands for motd
Apr 29 19:37:03 ip-172-31-44-44.us-west-2.compute.internal apiserver[6316]: 19:37:03 [INFO] restart commands []

  1. Ran upgrade downgrade testing for k8s variants to verify the instances boot up correctly after upgrade/downgrade
  2. Verified the above 5 usecases on k8s and ecs variants both.

Terms of contributiaon:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@sanu11 sanu11 requested review from etungsten and tjkirch April 12, 2021 17:19
@tjkirch tjkirch marked this pull request as draft April 12, 2021 17:44
@sanu11
Copy link
Contributor Author

sanu11 commented Apr 12, 2021

This force push addresses the unit test in thar-be-settings, cargo fmt check and removal of unwrap function wherever used

@sanu11 sanu11 marked this pull request as ready for review April 12, 2021 23:10
Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't finish, but had a few suggestions.

sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
@sanu11
Copy link
Contributor Author

sanu11 commented Apr 13, 2021

^Addressed comments by Matt and refactored some function names to be more clear.

sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
@arnaldo2792
Copy link
Contributor

With your changes you addressed this part of #1389:

It would be great if thar-be-settings can optionally pass the settings being changed to the restart-command being invoked. The restart-command helper would then be able to determine exactly what needs to be done to enact the new setting changes.

But @etungsten mentioned:

Currently host-containers are not automatically restarted if their settings changed. Users have to explicitly disable and re-enable their host-container via the enabled setting to see their new host-container settings enacted.

Should that use case be handled as well in your PR? If so, you need to change handle_host_container to restart the systemd units without requiring users to explicitly disable/enable the containers.

@etungsten
Copy link
Contributor

But @etungsten mentioned:

Currently host-containers are not automatically restarted if their settings changed. Users have to explicitly disable and re-enable their host-container via the enabled setting to see their new host-container settings enacted.

Should that use case be handled as well in your PR? If so, you need to change handle_host_container to restart the systemd units without requiring users to explicitly disable/enable the containers.

Ah, that's correct. There needs to be a conditional inside handle_host_container to check if the host-container is enabled. If it is, we need to systemctl try-restart the unit.

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 19, 2021

But @etungsten mentioned:

Currently host-containers are not automatically restarted if their settings changed. Users have to explicitly disable and re-enable their host-container via the enabled setting to see their new host-container settings enacted.

Should that use case be handled as well in your PR? If so, you need to change handle_host_container to restart the systemd units without requiring users to explicitly disable/enable the containers.

Ah, that's correct. There needs to be a conditional inside handle_host_container to check if the host-container is enabled. If it is, we need to systemctl try-restart the unit.

Okay, I was going to do it, but after our discussion offline, I thought we are supposed to handle only the what part (changed_settings) and not the when (restart host-containers) part. I will add it here in my next push.

@webern webern self-requested a review April 19, 2021 19:45
sources/api/thar-be-settings/src/main.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
@webern webern self-requested a review April 20, 2021 03:42
@sanu11
Copy link
Contributor Author

sanu11 commented Apr 21, 2021

Above force push addresses comments from @webern, @etungsten and @arnaldo2792

  • Removes option from wherever possible
  • Splits get_affected_services into 2 functions, one for getting all services - get_all_services and other for getting affected services when there are changed settings - get_affected_services and added a get_services_impl function which will be called by both the mentioned functions. This makes code more readable
  • Passes string of changed_settings to restart function instead of passing vector
  • Adds comments wherever necessary

Will push the changes for checking if the host-container is enabled in new commit

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 21, 2021

Above force push shortens the commit message

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just leaving a few comments on host-containers because I want to put some more thought into thar-be-settings and see if we can simplify what's going on a bit.

sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
@tjkirch
Copy link
Contributor

tjkirch commented Apr 22, 2021

Should that use case be handled as well in your PR? If so, you need to change handle_host_container to restart the systemd units without requiring users to explicitly disable/enable the containers.

Ah, that's correct. There needs to be a conditional inside handle_host_container to check if the host-container is enabled. If it is, we need to systemctl try-restart the unit.

I think we should do that in a separate PR. This PR isn't changing behavior that much, just fixing a bug where we impact unrelated host containers. Whether impacted host containers are restarted is a separate problem with different implications and testing requirements.

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 22, 2021

Addressed @tjkirch's comments

sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
if services.is_empty() {

let service_settings_map =
service::get_affected_service_setting_map(&args.socket_path, changed_settings)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think my confusion mainly comes from the different ways we're storing settings and services, since some are duplicated, and what "services" actually means in different places. Before, services was a model::Services object, but now we also have maps with just their names so we can find related settings.

Let me throw out an idea, because it might help make my confusion clearer, and at least give us something to start with. What if we get rid of the change on this line, and change get_affected_services to return a new type that has all of that information together. The new type, perhaps just called Services, would effectively be a map where the keys are service names, just like service_settings_map and services are now, and the values would be another new type (Service?) with one field for the relevant setting names and one field for the Service objects used in the model. Then we'd have everything we need, and we can just pass that around instead of needing two different representations of services. It'd be easy to convert for places where we need a model::Services or just the map of services to settings, or we could change those places to understand the new type instead of converting at all.

I think this could simplify quite a bit because we wouldn't have as many conversions between different representations, there'd be fewer maps, fewer naming issues, etc. I can work on a prototype if it'd help clarify what I mean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree using a type here could help a lot. The type could also have a member function for returning a unique HashSet of whatever it is we need that for.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I did a prototype of the Services thing I mentioned. (prototype because it's untested, commits aren't split nicely, etc.) @webern and @sanu11, what do you think, does this make the flow clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting it up @tjkirch : ) Will go through it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • pub fn get_config_file_names(services: &Services) could be a member function in impl Services.
  • creating a member function for services.0.is_empty() improves readability slightly.

In general in both the original and @sanu11 's PR, I found the propagation of an Option to reflect all services very confusing. I suggested the change where @sanu11 introduced:

  • service::get_affected_services
  • service::get_all_services

I think hiding this implementation detail helps a bit instead of having mysterious options in async fn run().

Copy link
Contributor

@tjkirch tjkirch Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are too many functions and it's too hard to trace. If the Option is what's confusing, maybe we could make our own enum..? get_services(Services::All), get_services(Services::AffectedBySettings(list)), would that help?

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 26, 2021

Addressed @tjkirch's comments except the prototype

  1. Passed &[&str] to is_restart_required instead of Vec
  2. Used or_insert_with(Vec::new) instead of .or_insert(vec![]) in thar-be-settings/src/service.rs
  3. Removed service_name.clone() from thar-be-settings/src/service.rs
  4. Removed function get_affected_service_setting_map and moved the code to the caller function, thus removed the test for the same
  5. The function is_restart_required wasn't called after changing host-containers setting, fixed it by removing the extra dot from setting_prefix in host-containers

PS: I have removed the testcase since the function is removed, would add it later based on the prototype changes

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 27, 2021

Above push addresses

  1. @tjkirch's prototype
  2. Modify the commit message to describe newly added Services type
  3. Add the dot to the settings_prefix and removed it from container_prefix in host-containers
  4. Rename function is_restart_required to is_container_affected in host-containers since the former was misleading as we do not restart containers on change yet. This is to be addressed as another issue/PR

I have tested the changes for the usecases mentioned in the PR description. I can update the description to contain the new logs once this change is approved/reviewed

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me, though I want to make sure @webern and @etungsten are happy with the ergonomics based on the open comments above.

sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/thar-be-settings/src/service.rs Outdated Show resolved Hide resolved
@sanu11
Copy link
Contributor Author

sanu11 commented Apr 28, 2021

^ Above push addresses @tjkirch's comments

  1. Remove get_affected_service_names function and added iterator function call
  2. Remove unit test since the function is no more present
  3. Add log for services that affects all host-containers in is_container_affected

Made changes to the PR description by adding recent logs with changed info statements

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 29, 2021

Above force push addresses

  1. add log messages in all four return locations for consistency in the is_container_affected function
  2. change env for changed_settings to uppercase

Changed the PR description for tests according to the changed logs

Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like what's remaining is:

sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
sources/api/host-containers/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My approval is with this one request outstanding (the shadowed variable name). Thanks for all the work on this @sanu11!

Copy link
Contributor

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My approval is with this one request outstanding (the shadowed variable name). Thanks for all the work on this @sanu11!

(with actual Approve radio button this time, I'm getting bad at using this correctly)

@sanu11
Copy link
Contributor Author

sanu11 commented Apr 29, 2021

My approval is with this one request outstanding (the shadowed variable name). Thanks for all the work on this @sanu11!

(with actual Approve radio button this time, I'm getting bad at using this correctly)

sure, I will change it. Thanks! 😄

sanu11 added 2 commits April 29, 2021 19:21
If a service is affected by changed settings, the changed settings are passed
to the restart commands of that service in an environment variable, separated
by spaces. The variable is only set if there are changed settings that affect
the service, and only the settings relevant to that service are included.

This commit adds a Services wrapper which is struct containing a map of service
name(String) to Service where Service has one field for changed_settings and another for
model::Service. This was added to remove the complications of different service
representations that were necessary for this change.
If no settings have changed, say during startup, handle all host containers.
If settings are changed for particular host containers, handle only those
host containers.  If the settings are not host-container-specific, but affect
host containers overall, handle all host containers.
@sanu11
Copy link
Contributor Author

sanu11 commented Apr 29, 2021

Above force push addresses

  1. Rename function parameter as suggested by @webern
  2. Add log messages for all conditions in is_container_affected as suggested by @tjkirch

Updated PR description to include recent logs for test cases

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.

5 participants