-
Notifications
You must be signed in to change notification settings - Fork 90
Make sure the right beat service gets restarted #34
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins test this please |
Hi @nyetwurk, Every "debian-based" tests are failing => elastic+ansible-beats+pull-request/10. |
9e007ab
to
0a9c4e4
Compare
Hopefully fixed. Sorry about the oversight :) |
04e2c0a
to
9c33a47
Compare
jenkins test this please |
Can someone please approve so I can keep my downstream clean :) thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @nyetwurk,
Code review is good, Automatic test are almost good.
For any reason, I don't understand {{ beat }}
isn't expanded on restart handler name on centos (see elastic+ansible-beats+pull-request/11/OS=centos-7,TEST_TYPE=multi at 17:52:40) also it's OK on debian based OS.
I'll relaunch tests as I don't what's the problem in the code.
In addition, I think we could use {{ beat }}
in Start beats service
task name also.
Jenkins test this please |
@jmlrt agreed on the |
@jmlrt I think there is something wrong with the tests. It doesn't seem as if the handler isn't working, it seems as though none of the tasks that |
When running more than one role at once, make sure all of the right notifies get triggered, not just the one for the last beat role run.
9c33a47
to
11b1270
Compare
FYI you can run automated test locally on all supported OS with our KitchenCI setup assuming you have ruby and docker installed. For this PR, you would need to run More details on the testing setup here. |
The This way beat doesn't need to be restarted by handler during first ansible role deployment because it is already started by But if you change beats config and run the ansible role another time with beats already started, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Jenkins test this please |
Does that mean we need separate beats_not_changed for each kind of beat like we did for the handler (e.g. {{ beat }}_started.changed or {{beat}}_started.changed) since if you run two instances of the role from the same parent, the last one wins? |
Yes we may need it, also I'm not sure. |
@nyetwurk I can confirm you that we don't need separated When testing it with
|
When running more than one role at once, make sure all of the right notifies
get triggered, not just the one for the last beat role run.