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

aws-ecs-1: add ecs.loglevel setting #1062

Merged
merged 1 commit into from
Aug 23, 2020

Conversation

samuelkarp
Copy link
Contributor

Issue number:
#815

(Note: this overlaps with #1053 as it adds a new setting. I will update either this one or the other one depending on which gets merged first.)

Description of changes:
The log level for the ECS agent cannot be set using ecs.config.json. Instead, for this setting we use a template file which is then sourced as an EnvironmentFile in ecs.service.

This change also reduces the default logging level from "debug" (which is quite chatty) to "info" (which is the default on the ECS-optimized AMIs).

Testing done:
Built a new AMI. Observed that the correct default value was populated to /etc/ecs/ecs.config and that the ECS agent was logging at the correct level. Used apiclient to patch the value to "debug", committed the change, and observed the correct change to /etc/ecs/ecs.config as well as the ECS agent's logging behavior. Used apiclient to try and set an invalid value, received an appropriate error response.

Terms of contribution:

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.

packages/ecs-agent/ecs.service Outdated Show resolved Hide resolved
sources/models/src/modeled_types/mod.rs Outdated Show resolved Hide resolved
sources/models/src/modeled_types/ecs.rs Outdated Show resolved Hide resolved
sources/models/src/modeled_types/ecs.rs Outdated Show resolved Hide resolved
sources/models/src/modeled_types/ecs.rs Outdated Show resolved Hide resolved
The log level for the ECS agent cannot be set using ecs.config.json.
Instead, for this setting we use a template file which is then sourced
as an EnvironmentFile in ecs.service.
@samuelkarp samuelkarp merged commit c6381e6 into bottlerocket-os:develop Aug 23, 2020
@samuelkarp samuelkarp deleted the ecs-debug branch August 23, 2020 21:31
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.

3 participants