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

Only try stop sysprobe if it is installed #255

Merged
merged 2 commits into from
Jan 31, 2020

Conversation

danielsimkus
Copy link
Contributor

Fixes a bug introduced in #249 where if sysprobe wasn't installed, the provision would still try and stop the service and fail as it doesn't exist

@danielsimkus
Copy link
Contributor Author

FAILED! => {"changed": false, "msg": "Could not find the requested service datadog-agent-sysprobe: host"}

Copy link
Contributor

@kevinconaway kevinconaway left a comment

Choose a reason for hiding this comment

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

Thanks so much for contributing here Daniel. One small change and then we should be 🚀

@@ -94,7 +94,7 @@
name: datadog-agent-sysprobe
state: stopped
enabled: no
when: not datadog_skip_running_check and (not datadog_enabled or not datadog_sysprobe_enabled)
when: not datadog_skip_running_check and (not datadog_enabled or not datadog_sysprobe_enabled) and ansible_facts.services['datadog-agent-sysprobe'] is defined
Copy link
Contributor

Choose a reason for hiding this comment

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

We'll want to check both type of services as done here:

and (ansible_facts.services['datadog-agent-sysprobe'] is defined or ansible_facts.services['datadog-agent-sysprobe.service'] is defined) }}"

Perhaps we can create a fact about whether the service is installed or not (datadog_sysprobe_installed?) and use that here and in the datadog_sysprobe_enabled fact check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah good shout, I'll sort that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@kevinconaway kevinconaway left a comment

Choose a reason for hiding this comment

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

I tested this locally and it LGTM. Thanks for your contribution!

@kevinconaway kevinconaway requested a review from a team January 31, 2020 12:38
Copy link
Contributor

@KSerrania KSerrania left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinconaway kevinconaway merged commit c531617 into DataDog:master Jan 31, 2020
@danielsimkus
Copy link
Contributor Author

Hi guys, would we be able to release this on Galaxy? Our provisioning is still failing because of this 👍

@KSerrania
Copy link
Contributor

Hi @dv9io0o, I'll do a bugfix release today to include this.

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