Bug 1977486 - Duplicate tasks execution when using hosted-engine --deploy
Summary: Duplicate tasks execution when using hosted-engine --deploy
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-ansible-collection
Classification: oVirt
Component: hosted-engine-setup
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.4.8
: ---
Assignee: Asaf Rachmani
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-29 21:49 UTC by Asaf Rachmani
Modified: 2021-10-10 06:47 UTC (History)
2 users (show)

Fixed In Version: ovirt-ansible-collection-1.5.4-1.el8ev
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-19 06:23:03 UTC
oVirt Team: Integration
Embargoed:
pm-rhel: ovirt-4.4+
sbonazzo: devel_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection pull 314 0 None closed roles: hosted_engine_setup: remove duplicate tasks 2021-07-01 06:01:45 UTC

Description Asaf Rachmani 2021-06-29 21:49:15 UTC
Description of problem:
When using hosted-engine --deploy, there are a couple of tasks that run twice, in Creating Target VM and Cleaning temporary resources stages.

Version-Release number of selected component (if applicable):
ovirt-ansible-collection-1.5.3-1.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. run hosted-engine --deploy
2.
3.

Actual results:
Duplicate tasks execution 

Expected results:
These tasks should be executed only once

Additional info:

[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch logs from the engine VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory path]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination directory]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance image]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush dirty buffers]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove local vm dir]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove temporary entry in /etc/hosts for the local VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Clean local storage pools]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool localvm7fpxvpcr]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool localvm7fpxvpcr]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool 492e2cbc-8123-452a-bf36-a0b47b5eb70a]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool 492e2cbc-8123-452a-bf36-a0b47b5eb70a]
[ INFO  ] changed: [localhost]
[ INFO  ] Stage: Clean up
[ INFO  ] Cleaning temporary resources
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Execute just a specific set of steps]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Force facts gathering]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set the name for add_host]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch the value of HOST_KEY_CHECKING]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Get the username running the deploy]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Register the engine FQDN as a host]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Sync on engine machine - sync file]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch logs from the engine VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory path]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination directory]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance image]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
[ INFO  ] skipping: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush dirty buffers]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove local vm dir]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove temporary entry in /etc/hosts for the local VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Clean local storage pools]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool localvm7fpxvpcr]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool localvm7fpxvpcr]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool {{ local_vm_disk_path.split('/')[5] }}]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool {{ local_vm_disk_path.split('/')[5] }}]

Comment 1 Nikolai Sednev 2021-07-29 13:39:57 UTC
ovirt-hosted-engine-ha-2.4.8-1.el8ev will be part of 4.4.8-3, at this moment we don't have it yet, it should arrive later on Today or next week.
QA have nothing to do with this bug until then.

Comment 2 Nikolai Sednev 2021-08-02 08:32:47 UTC
Deployed HE over FC using these components:
ovirt-ansible-collection-1.5.4-1.el8ev.noarch
ovirt-hosted-engine-setup-2.5.3-1.el8ev.noarch
ovirt-hosted-engine-ha-2.4.8-1.el8ev.noarch
rhvm-appliance-4.4-20210715.0.el8ev.x86_64
Linux 4.18.0-305.12.1.el8_4.x86_64 #1 SMP Mon Jul 26 08:06:24 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux release 8.4 (Ootpa)

[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch logs from the engine VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory path]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination directory]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance image]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush dirty buffers]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove local vm dir]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove temporary entry in /etc/hosts for the local VM]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Clean local storage pools]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool localvmra_mt2yp]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool localvmra_mt2yp]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local storage-pool 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
[ INFO  ] changed: [localhost]
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20210802112331.conf'
[ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Hosted Engine successfully deployed

Looks fine.

Should "Remove temporary entry in /etc/hosts for the local VM" also appear twice?
Moving to verified.

Comment 3 Asaf Rachmani 2021-08-04 06:49:23 UTC
(In reply to Nikolai Sednev from comment #2)
> Deployed HE over FC using these components:
> ovirt-ansible-collection-1.5.4-1.el8ev.noarch
> ovirt-hosted-engine-setup-2.5.3-1.el8ev.noarch
> ovirt-hosted-engine-ha-2.4.8-1.el8ev.noarch
> rhvm-appliance-4.4-20210715.0.el8ev.x86_64
> Linux 4.18.0-305.12.1.el8_4.x86_64 #1 SMP Mon Jul 26 08:06:24 EDT 2021
> x86_64 x86_64 x86_64 GNU/Linux
> Red Hat Enterprise Linux release 8.4 (Ootpa)
> 
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch logs from the engine
> VM]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory
> path]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination
> directory]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance
> image]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush
> dirty buffers]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove local vm dir]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove temporary entry in
> /etc/hosts for the local VM]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Clean local storage pools]
> [ INFO  ] ok: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool
> localvmra_mt2yp]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local
> storage-pool localvmra_mt2yp]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool
> 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
> [ INFO  ] changed: [localhost]
> [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local
> storage-pool 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
> [ INFO  ] changed: [localhost]
> [ INFO  ] Generating answer file
> '/var/lib/ovirt-hosted-engine-setup/answers/answers-20210802112331.conf'
> [ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
> [ INFO  ] Stage: Pre-termination
> [ INFO  ] Stage: Termination
> [ INFO  ] Hosted Engine successfully deployed
> 
> Looks fine.
> 
> Should "Remove temporary entry in /etc/hosts for the local VM" also appear
> twice?
> Moving to verified.

No, I don't see it appears twice in the output.

Comment 4 Nikolai Sednev 2021-08-04 10:50:29 UTC
(In reply to Asaf Rachmani from comment #3)
> (In reply to Nikolai Sednev from comment #2)
> > Deployed HE over FC using these components:
> > ovirt-ansible-collection-1.5.4-1.el8ev.noarch
> > ovirt-hosted-engine-setup-2.5.3-1.el8ev.noarch
> > ovirt-hosted-engine-ha-2.4.8-1.el8ev.noarch
> > rhvm-appliance-4.4-20210715.0.el8ev.x86_64
> > Linux 4.18.0-305.12.1.el8_4.x86_64 #1 SMP Mon Jul 26 08:06:24 EDT 2021
> > x86_64 x86_64 x86_64 GNU/Linux
> > Red Hat Enterprise Linux release 8.4 (Ootpa)
> > 
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch logs from the engine
> > VM]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory
> > path]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination
> > directory]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance
> > image]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush
> > dirty buffers]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove local vm dir]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Remove temporary entry in
> > /etc/hosts for the local VM]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Clean local storage pools]
> > [ INFO  ] ok: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool
> > localvmra_mt2yp]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local
> > storage-pool localvmra_mt2yp]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Destroy local storage-pool
> > 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Undefine local
> > storage-pool 60ed690f-3a58-4fdd-9654-5c6c00dc0369]
> > [ INFO  ] changed: [localhost]
> > [ INFO  ] Generating answer file
> > '/var/lib/ovirt-hosted-engine-setup/answers/answers-20210802112331.conf'
> > [ INFO  ] Generating answer file '/etc/ovirt-hosted-engine/answers.conf'
> > [ INFO  ] Stage: Pre-termination
> > [ INFO  ] Stage: Termination
> > [ INFO  ] Hosted Engine successfully deployed
> > 
> > Looks fine.
> > 
> > Should "Remove temporary entry in /etc/hosts for the local VM" also appear
> > twice?
> > Moving to verified.
> 
> No, I don't see it appears twice in the output.

Please take a look using search for "Remove temporary entry in /etc/hosts for the local VM".
It steel appears twice.

Comment 5 Sandro Bonazzola 2021-08-19 06:23:03 UTC
This bugzilla is included in oVirt 4.4.8 release, published on August 19th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.8 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.

Comment 6 Asaf Rachmani 2021-10-10 06:47:13 UTC
(In reply to Nikolai Sednev from comment #2)
> 
> Should "Remove temporary entry in /etc/hosts for the local VM" also appear
> twice?
> Moving to verified.

Yes, the first one for removing the temporary entry of the bootstrap VM
and the second one for removing the entry of the local VM.


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