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

Fix dsc_service order issues #34

Merged
merged 3 commits into from
Jul 19, 2020
Merged

Fix dsc_service order issues #34

merged 3 commits into from
Jul 19, 2020

Conversation

treydock
Copy link
Collaborator

Pull Request Checklist

Description

Fix DSC service order of operations.

Related Issue

Fixes #32

Motivation and Context

It seems that dsc_service is starting the service, not Service['sensu-client'] so this ensures that configs and other necessary items are in place before adding the DSC service.

Copy link

@StuartMcManus StuartMcManus left a comment

Choose a reason for hiding this comment

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

Tests carried out:

No client installed - Package was installed -> Config was put down -> DSC created the service and started it -> Sensu service refresh ran restarting it again

Client installed with wrong config and no service - Config was put down -> DSC created the service and started it -> Sensu service refresh ran restarting it again

Client installed with no config and no service - Config was put down -> DSC created the service and started it -> Sensu service refresh ran restarting it again

Hopefully tested the main scenarios but this change looks to work correctly putting config down before DSC starts the service. The service does get restarted again at the end of the puppet run due to the notify to the service but I do not see any way you can change that and is not a huge issue.

@ghoneycutt
Copy link
Collaborator

@treydock travis is failing. Perhaps a dependency needs pinned.

@treydock
Copy link
Collaborator Author

Looks like we need a newer version of rspec-puppet. The issue: rodjek/rspec-puppet#796, the fix: rodjek/rspec-puppet#797, was in rspec-puppet 2.7.9 and we pin to 2.6.x , which won't ever see this necessary fix. I'll update the rspec-puppet dependency.

@treydock
Copy link
Collaborator Author

I've pushed a fix.

@ghoneycutt ghoneycutt merged commit 915ee24 into master Jul 19, 2020
@ghoneycutt ghoneycutt deleted the dsc-order branch July 19, 2020 00:19
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.

Service started before config applied
3 participants