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

Addition of disable-debug mode to ECS Logs Collector #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rohanmangal
Copy link
Contributor

@rohanmangal rohanmangal commented May 13, 2024

Summary

Modification for #78

Implementation details

Details on #78

Testing

  • Works properly on Amazon Linux
  • Works properly on Amazon Linux 2
  • Works properly on Amazon Linux 2023
  • Works partially on Ubuntu 20.04.6 LTS - only ecs agent
  • Works partially on CentOS Stream 8 - only ecs agent
  • Works partially on Ubuntu 24.04 LTS - only ecs agent

New tests cover the changes: No, Manually tested.

Licensing

This contribution is under the terms of the Apache 2.0 License:

if [ -e /etc/sysconfig/docker ]; then
case "${init_type}" in
systemd)
# sed -i 's/^OPTIONS="\(.*\)/OPTIONS="-D \1/g' /etc/sysconfig/docker
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: lets remove this comment and L828

Comment on lines +820 to +821
sed -i 's/\-D//g' /etc/sysconfig/docker
ok
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to be common to both cases (systemd and *). can we move this to be before the case and remove it here and L829 below?

Comment on lines +852 to +854
if [ ! -d /etc/ecs ]; then
mkdir /etc/ecs
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

if /etc/ecs doesn't exist then they don't have the ECS_LOGLEVEL=debug set in the config. wonder why we want to create the dir here ?

mkdir /etc/ecs
fi

sed -i '/^\s*ECS_LOGLEVEL=debug/d' /etc/ecs/ecs.config
Copy link
Contributor

Choose a reason for hiding this comment

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

this sets the log level to debug, instead of unsetting it or setting it back to info

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.

2 participants