Details
-
Improvement
-
Status: Done
-
Major
-
Resolution: Done
-
None
-
None
Description
As of commit [5ffcef8](https://github.com/apache/incubator-metron/commit/5ffcef8d4a9ec0788dca094f54b07d99c44c6bef), `/etc/monit.d/enrichment-elasticsearch.monit` was renamed to `/etc/monit.d/indexing-elasticsearch.monit`, however the old file isn't removed via ansible, which causes the below error during an upgrade:
`Starting monit: /etc/monit.d/enrichment-elasticsearch.monit:18: Service name conflict, enrichment already defined '/usr/local/monit/status_enrichment_topology.sh'`
Not sure of other downstream impacts, but the remedy I suggest is to modify `/etc/monit.conf:23` to be more specific (`include /etc/monit.d/*.monit` and rename `/etc/monit.d/logging`?) and rename `/etc/monit.d/enrichment-elasticsearch.monit` to append a backup string as a part of the run.
Alternatively, we could just add a `state: absent` to `incubator-metron/metron-deployment/roles/monit/tasks/monit-definitions.yml` to delete the old file, if it exists.
Looking for feedback on the approach, but happy to fix this myself and submit a PR.