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

Removed unnecessary EL7 commands and optimized CW agent download script #17

Merged
merged 4 commits into from
Mar 29, 2018

Conversation

eemperor
Copy link
Member

The default CloudWatch agent config script, amazon-cloudwatch-agent-ctl, already handles setting up the CloudWatch agent service in EL6 and EL7. The two systemd commands were not required.

In additon, the CloudWatch agent download steps have been optimized into fewer commands.

This PR addresses the following issues:

#15
#16

@eemperor eemperor requested review from ferricoxide and a team March 28, 2018 19:55
Copy link
Member

@ferricoxide ferricoxide left a comment

Choose a reason for hiding this comment

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

@eemperor Quick query: did you validate that the CWAgent works as expected on EL6? That it comes with a systemd unit-file but not a legacy-init file is somewhat concerning?

@eemperor
Copy link
Member Author

eemperor commented Mar 28, 2018

One of my tests was EL6 on CentOS but not RedHat. Let me double check.

@ferricoxide
Copy link
Member

Cool. CentOS should be adequately representative

Did the CWA processes come back online after a reboot of the CentOS 6.9 instance? If so, did the installer create /etc/rc.d files or is it using a different mechanism to ensure the service restarts across boots?

@eemperor
Copy link
Member Author

The CWA process does come back running after reboot following completion of the Cfn stack. I will have to do additional testing to speak on the resilincy across multiple reboots.

It appears the CWA installer populates both a .conf file in /etc/init and a .service in /etc/systemd/system/ then executes one or the other based on the system. So looks like it's using Upstart to launch the CWA process in EL6?

@ferricoxide
Copy link
Member

ferricoxide commented Mar 29, 2018

Good to know: I hadn't noticed the .conf file when I was looking at the RPM.

But, yeah, the .conf file means they're using upstart rather than chkconfig for enabling persistency.

Copy link
Member

@lorengordon lorengordon left a comment

Choose a reason for hiding this comment

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

🚢

@eemperor eemperor merged commit 552a0e0 into plus3it:master Mar 29, 2018
@eemperor eemperor deleted the el6-fix branch April 10, 2018 13:35
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