Bug 1573754

Summary: [RFE] Stop collectd fluentd services on undeployed hosts
Product: [oVirt] ovirt-engine-metrics Reporter: Lukas Svaty <lsvaty>
Component: RFEsAssignee: Shirly Radco <sradco>
Status: CLOSED WONTFIX QA Contact: Lucie Leistnerova <lleistne>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.4.2CC: bugs, dfediuck, mperina
Target Milestone: ---Keywords: FutureFeature
Target Release: ---Flags: rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-22 19:30:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Svaty 2018-05-02 08:04:54 UTC
Description of problem:
When a host is removed from the engine (or moved to maintenance) we need to stop collectd/fluentd services so host won't appear anymore in metrics store.

We are already doing something similar for gluster and HE services, thus collectd/fluentd should be added to this playbook.

Comment 1 Sandro Bonazzola 2019-01-28 09:43:39 UTC
This bug has not been marked as blocker for oVirt 4.3.0.
Since we are releasing it tomorrow, January 29th, this bug has been re-targeted to 4.3.1.

Comment 2 Shirly Radco 2019-08-26 13:37:29 UTC
Why should we stop the services from hosts that are in maintenance?
For hosts that are removed from engine, I see that there is a playbook "ovirt-host-remove".
Is it run as part of the host removal?

Comment 3 Lukas Svaty 2019-10-24 09:07:00 UTC
Hi Shirly,

1. Not sure what is the behaviour for other serices, I know we have something similiar with gluster.
2. I am sorry to say I do not know internal implementation of host, maybe martin can help you.

Comment 4 Martin Perina 2019-10-24 12:30:23 UTC
1. Host moving to Maintenance
  We are currently stopping gluster services before host going to Maintenance because of upgrades (gluster services need to be stopped during upgrade to prevent corruptions):

      https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HostMaintenanceCallback.java#L102

  At the moment this is implemented as a call to VDSM, but if needed we could introduce ansible playbook being executed just before host status being moved to Maintenance.


2. Removing a host
  As Lukas mentioned we have a playbook which is executed after removal of a host and currently it's disable hosted engine HA services:

      https://github.com/oVirt/ovirt-engine/blob/master/packaging/playbooks/ovirt-host-remove.yml

  So feel free to add add any other services which need to be stopped/disabled.

Comment 5 Shirly Radco 2019-10-28 12:09:00 UTC
(In reply to Martin Perina from comment #4)
> 1. Host moving to Maintenance
>   We are currently stopping gluster services before host going to
> Maintenance because of upgrades (gluster services need to be stopped during
> upgrade to prevent corruptions):
> 
>      
> https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/
> bll/src/main/java/org/ovirt/engine/core/bll/HostMaintenanceCallback.java#L102
> 
>   At the moment this is implemented as a call to VDSM, but if needed we
> could introduce ansible playbook being executed just before host status
> being moved to Maintenance.
> 
We would need a playbook before moving to Maintenance
but also after moving back from Maintenance...

> 
> 2. Removing a host
>   As Lukas mentioned we have a playbook which is executed after removal of a
> host and currently it's disable hosted engine HA services:
> 
>      
> https://github.com/oVirt/ovirt-engine/blob/master/packaging/playbooks/ovirt-
> host-remove.yml
> 
>   So feel free to add add any other services which need to be
> stopped/disabled.

Comment 6 Shirly Radco 2020-06-22 19:30:30 UTC
Closing this for now, this can be handled by wiping the host and re-use for other purposes or re-installing as a clean host.
Please reopen if needed