Bug 1613291 - [text] log says ovirt-ha-agent is starting after HE undeploy but it's actually being disabled and stopped
Summary: [text] log says ovirt-ha-agent is starting after HE undeploy but it's actuall...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-host-deploy
Classification: oVirt
Component: Plugins.Hosted-Engine
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.3.9
: 1.8.5
Assignee: Asaf Rachmani
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks: 1796409
TreeView+ depends on / blocked
 
Reported: 2018-08-07 11:26 UTC by Evgheni Dereveanchin
Modified: 2020-03-20 07:57 UTC (History)
7 users (show)

Fixed In Version: ovirt-host-deploy-1.8.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-20 07:57:12 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.3?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1463653 0 high CLOSED [RFE] Provide a failure-is-ok command for decomisioning a host 2021-02-22 00:41:40 UTC
oVirt gerrit 106116 0 master MERGED src: plugins: Fix incorrect log message 2020-10-27 07:08:41 UTC
oVirt gerrit 106391 0 ovirt-host-deploy-1.8 MERGED src: plugins: Fix incorrect log message 2020-10-27 07:08:26 UTC

Internal Links: 1463653

Description Evgheni Dereveanchin 2018-08-07 11:26:10 UTC
Description of problem:
After undeploying the Hosted Engine from the oVirt UI, the ovirt-ha-agent is still started though it is no longer needed.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.2.25-1.el7.noarch
ovirt-hosted-engine-ha-2.2.16-1.el7.noarch
ovirt-engine-4.2.5.2-1.el7.noarch

How reproducible:
always

Steps to Reproduce:
 reinstall a host from the HE pool selecting UNDEPLOY for the Hosted Engine

Actual results:
...
Installing Host host2. Removing hosted-engine configuration.
Installing Host host2. Enrolling certificate.
Installing Host host2. Enrolling serial console certificate.
Installing Host host2. Stage: Transaction commit.
...
Installing Host host2. Starting vdsm.
Installing Host host2. Starting ovirt-vmconsole-host-sshd.
Installing Host host2. Starting ovirt-ha-agent.
Installing Host host2. Stage: Clean up.


Expected results:
ovirt-ha-agent is not started after HE undeploy

Additional info:

Comment 1 Martin Perina 2018-08-08 06:59:11 UTC
Please attach logs, but AFAIK only when you actually remove host from engine, we are calling ansible role, which stops HA agent and removes its configuration.

Comment 2 Evgheni Dereveanchin 2018-08-08 12:21:59 UTC
Looking at the log it may be just a typo in the log. The service is stopped in fact when it says "starting":

2018-08-06 23:07:57,381+0000 INFO otopi.plugins.ovirt_host_deploy.hosted-engine.packages packages._closeup:103 Starting ovirt-ha-agent
2018-08-06 23:07:57,381+0000 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service ovirt-ha-agent startup to False
2018-08-06 23:07:57,382+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-ha-agent.service'), executable='None', cwd='None', env=None
2018-08-06 23:07:57,474+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-ha-agent.service'), rc=0
2018-08-06 23:07:57,475+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-ha-agent.service') stdout:
Id=ovirt-ha-agent.service

2018-08-06 23:07:57,476+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'show', '-p', 'Id', 'ovirt-ha-agent.service') stderr:


2018-08-06 23:07:57,476+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'disable', u'ovirt-ha-agent.service'), executable='None', cwd='None', env=None
2018-08-06 23:07:57,719+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'disable', u'ovirt-ha-agent.service'), rc=0
2018-08-06 23:07:57,720+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'disable', u'ovirt-ha-agent.service') stdout:


2018-08-06 23:07:57,721+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'disable', u'ovirt-ha-agent.service') stderr:
Removed symlink /etc/systemd/system/multi-user.target.wants/ovirt-ha-agent.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/ovirt-ha-broker.service.

2018-08-06 23:07:57,721+0000 DEBUG otopi.plugins.otopi.services.systemd systemd.state:130 stopping service ovirt-ha-agent
2018-08-06 23:07:57,722+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/usr/bin/systemctl', 'stop', 'ovirt-ha-agent.service'), executable='None', cwd='None', env=None
2018-08-06 23:07:57,812+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/usr/bin/systemctl', 'stop', 'ovirt-ha-agent.service'), rc=0
2018-08-06 23:07:57,813+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-ha-agent.service') stdout:


2018-08-06 23:07:57,813+0000 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/usr/bin/systemctl', 'stop', 'ovirt-ha-agent.service') stderr:

Comment 3 Sandro Bonazzola 2019-01-21 08:28:52 UTC
re-targeting to 4.3.1 since this BZ has not been proposed as blocker for 4.3.0.
If you think this bug should block 4.3.0 please re-target and set blocker flag.

Comment 4 Sandro Bonazzola 2019-02-18 07:55:01 UTC
Moving to 4.3.2 not being identified as blocker for 4.3.1.

Comment 7 Nikolai Sednev 2020-02-23 11:40:42 UTC
Management->maintenance->Installation->reinstall->undeploy and got:
Installing Host alma04.qa.lab.tlv.redhat.com. Stopping ovirt-ha-agent.
2/23/201:32:28 PM
.
.
.
Status of host alma04.qa.lab.tlv.redhat.com was set to Up.
2/23/201:34:41 PM

On host I see:
alma04 ~]# systemctl status ovirt-ha-agent
● ovirt-ha-agent.service - oVirt Hosted Engine High Availability Monitoring Agent
   Loaded: loaded (/usr/lib/systemd/system/ovirt-ha-agent.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

Host is running as regular host, none-ha.

Works for me on these components:
ovirt-hosted-engine-ha-2.3.6-1.el7ev.noarch
ovirt-hosted-engine-setup-2.3.12-1.el7ev.noarch
Linux 3.10.0-1062.12.1.el7.x86_64 #1 SMP Thu Dec 12 06:44:49 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Red Hat Virtualization Manager Web Administration Software Version:4.3.9.0-0.1.el7

Moving to verified.

Comment 8 Nikolai Sednev 2020-02-23 11:56:48 UTC
Logs from the events UI of the engine:

Status of host alma04.qa.lab.tlv.redhat.com was set to Up.
2/23/201:46:37 PM

Host alma04.qa.lab.tlv.redhat.com installed
2/23/201:46:31 PM

Ansible host-deploy playbook execution has successfully finished on host alma04.qa.lab.tlv.redhat.com.
2/23/201:46:26 PM

Ansible host-deploy playbook execution has started on host alma04.qa.lab.tlv.redhat.com.
2/23/201:44:32 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Termination.
2/23/201:44:32 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Retrieving installation logs to: '/var/log/ovirt-engine/host-deploy/ovirt-host-deploy-20200223134431-alma04.qa.lab.tlv.redhat.com-f20c7217-19e4-489f-8b39-55fd1b423193.log'.
2/23/201:44:31 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Pre-termination.
2/23/201:44:31 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Clean up.
2/23/201:44:31 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stopping ovirt-ha-agent.
2/23/201:44:29 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Starting ovirt-vmconsole-host-sshd.
2/23/201:44:28 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Starting vdsm.
2/23/201:44:20 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Restarting libvirtd.
2/23/201:44:19 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Starting Cockpit.
2/23/201:44:18 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Closing up.
2/23/201:44:13 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Setting kernel arguments.
2/23/201:44:12 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Transaction commit.
2/23/201:44:12 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Enrolling serial console certificate.
2/23/201:44:10 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Enrolling certificate.
2/23/201:44:09 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Removing hosted-engine configuration.
2/23/201:44:05 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Misc configuration.
2/23/201:44:05 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Package installation.
2/23/201:43:53 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Misc configuration (early).
2/23/201:43:53 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Transaction setup.
2/23/201:43:53 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Hardware supports virtualization.
2/23/201:43:53 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Setup validation.
2/23/201:43:52 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Disabling Kdump integration.
2/23/201:43:52 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Logs at host located at: '/tmp/ovirt-host-deploy-20200223134345-02rx2z.log'.
2/23/201:43:52 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Kdump supported.
2/23/201:43:51 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Environment customization.
2/23/201:43:51 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Programs detection.
2/23/201:43:51 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Environment packages setup.
2/23/201:43:46 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Environment setup.
2/23/201:43:46 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Stage: Initializing.
2/23/201:43:46 PM

Installing Host alma04.qa.lab.tlv.redhat.com. Connected to host alma04.qa.lab.tlv.redhat.com with SSH key fingerprint: SHA256:Ylw7yamtUAvgAPqf4ZYDHtpbVpgpfu8olKwQ0FmJMl4.
2/23/201:43:44 PM

Host alma04.qa.lab.tlv.redhat.com configuration was updated by admin@internal-authz.
2/23/201:43:43 PM

Host alma04.qa.lab.tlv.redhat.com was switched to Maintenance mode by admin@internal-authz.
2/23/201:43:25 PM

Logs looks fine to me.

Comment 9 Sandro Bonazzola 2020-03-20 07:57:12 UTC
This bugzilla is included in oVirt 4.3.9 release, published on March 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.3.9 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.