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

support disabling the agent service #280

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
2 participants
@hydrant25
Copy link
Contributor

commented Mar 8, 2016

We use a Packer workflow to create AMIs for our apps and then promote them through non-production environments before deploying to production. In non-production environments, it is desirable to install the Datadog Agent, but leave the service stopped and disabled via an environment attribute setting. Once in launched in production, the Agent starts and is enabled.

The cookbook already had an attribute to stop the Agent, but not to control the Agent service's :enable/:disable action. This PR adds that functionality.

@miketheman miketheman added the feature label Mar 12, 2016

@miketheman

This comment has been minimized.

Copy link
Collaborator

commented Mar 12, 2016

Hi @hydrant25 !

Thanks for taking the time to send this.

I think the idea is sane, but the naming and logical selection seems to be in direct opposite of the other attribute used to control the service behavior.

default['datadog']['agent_start'] = true with a default of true

I'd recommend something similar, like default['datadog']['agent_enable'] = true also with a default of true, so as to keep some consistency around the action semantics.

agent_boot_startup also seems very specific to your use case, whereas the enable action is clear.

Can you take a pass at renaming?

@hydrant25

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2016

I took a shot at renaming the attribute and variable per your comment, @miketheman. How does this look?

@miketheman

This comment has been minimized.

Copy link
Collaborator

commented Mar 14, 2016

@hydrant25 that's awesome, thanks!
Now that I see them both together, it looks like the older agent_action is a misnomer - following this style, it would be agent_start.
Since this name is used only internally - the attribute already has the correct name - could you change that one too?

@hydrant25

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2016

@miketheman, ask and ye shall receive!

@miketheman miketheman added this to the Next minor milestone Mar 15, 2016

@miketheman miketheman self-assigned this Apr 21, 2016

miketheman added a commit that referenced this pull request Apr 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.