Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1820146

Summary: Cluster CPU level is picked without users knowledge
Product: [oVirt] ovirt-ansible-collection Reporter: Petr Matyáš <pmatyas>
Component: hosted-engine-setupAssignee: Asaf Rachmani <arachman>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Matyáš <pmatyas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: arachman, bugs, lsvaty, mburman, michal.skrivanek, mnecas, mtessun, pkubica, stirabos
Target Milestone: ovirt-4.4.3-1Keywords: ZStream
Target Release: 1.2.2Flags: pm-rhel: ovirt-4.4+
mtessun: planning_ack+
sbonazzo: devel_ack+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-collection-1.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-27 16:55:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1896473    
Bug Blocks:    

Description Petr Matyáš 2020-04-02 11:22:39 UTC
Description of problem:
When setting up HE env, there is no option to select cluster CPU type and it is selected according to the first host.
This can lead to unusable environments. If I add the best host first I will never be able to add older hosts as the CPU type cannot be changed (lowered) as HE VM is always up.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.4.4-1.el8ev.noarch

How reproducible:
always

Steps to Reproduce:
1. set up HE
2.
3.

Actual results:
cluster CPU type is selected according to the first host

Expected results:
there needs to be an option to select cluster CPU type

Additional info:
not sure what was selected before (maybe lowest?)

Comment 1 Michal Skrivanek 2020-04-03 04:33:57 UTC
That”s the same behavior as within regular webadmin

Comment 2 Petr Matyáš 2020-04-03 08:06:09 UTC
No it's not, within regular webadmin you can change the cluster cpu level before adding hosts and pick the lowest one necessary.

Also please specify priority, severity is for QE.

This is blocking issue for our environments as we can't use virtual hosts when we start with adding regular ones.

Comment 3 Lukas Svaty 2020-04-03 10:05:20 UTC
This though probably need an question in HE-setup as well

Comment 4 Michal Skrivanek 2020-04-03 12:38:09 UTC
Petr, feel free to post a patch for that, I don't see a reason why it couldn't be added as another low level setting variable in ovirt-ansible-hosted-engine-setup.

Comment 5 Sandro Bonazzola 2020-04-22 07:24:51 UTC
I've memories of this question being there in the past. Need to check why it got removed or not exposed.

Comment 6 Sandro Bonazzola 2020-04-22 07:27:21 UTC
Also we need to check if we can change this setting after HE is deployed. If this can be done in a second step we can just close this bug.

Comment 7 Michal Skrivanek 2020-04-22 07:32:26 UTC
still not really within out capacity. See comment #4, it's either going to happen by contribution in foreseeable future or it will get closed for no activity

Comment 10 Martin Necas 2020-06-05 08:33:26 UTC
the fix was released on 4th May (https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/releases/tag/1.1.3).

Comment 11 Petr Matyáš 2020-06-09 13:09:45 UTC
Fix was done only for running the playbook directly.
As there is no question in HE setup then this will need further patches and IMO this is not enough to verify this bug now, as it was reported mainly for the manual setup.

Comment 12 Sandro Bonazzola 2020-06-23 16:13:00 UTC
Not blocking 4.4.1 on this bug and 4.4.2 has been already planned, moving to 4.4.3 for zstream consideration.

Comment 13 Lukas Svaty 2020-07-21 10:09:46 UTC
Unfortunately, I don't see inside engine-setup code

Comment 14 Sandro Bonazzola 2020-08-12 10:16:01 UTC
Is this already fixed in 4.4.2?

Comment 15 Asaf Rachmani 2020-08-12 11:18:01 UTC
It is fixed in 4.4.2 only when running the playbook directly (see comment 11).
In the last ovirt-hosted-engine-setup build (2.4.6), there is an option to pass ansible vars (fixed in bug 1849517) when running 'hosted-engine --deploy'.

Comment 16 Petr Matyáš 2020-08-26 07:56:26 UTC
So using ansible extra vars works without a problem, however the setting of cluster CPU doesn't work as it still is an edit and not set during setup.

# hosted-engine --deploy --ansible-extra-vars=he_cluster_cpu_type='Intel Nehalem Family' # I have host that has Westmere cluster CPU to recognize if there was some change

however this only results in:

[ INFO  ] TASK [ovirt.hosted_engine_setup : Ensure that the target cluster is present in the target datacenter]
[ ERROR ] ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot change Cluster CPU type unless all Hosts attached to this Cluster are in Maintenance.]". HTTP response code is 409.
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Cannot change Cluster CPU type unless all Hosts attached to this Cluster are in Maintenance.]\". HTTP response code is 409."}

Comment 17 Michal Skrivanek 2020-08-26 18:36:00 UTC
too late for 4.4.2

Comment 18 Sandro Bonazzola 2020-10-01 11:17:22 UTC
Not cirtical, moved out to 4.4.4.

Comment 20 Asaf Rachmani 2020-11-22 17:27:28 UTC
This works when using @varfile with a full path.

#hosted-engine --deploy --ansible-extra-vars=@/root/a.json

Comment 21 Petr Matyáš 2020-11-25 13:37:34 UTC
Verified with ovirt-ansible-collection-1.2.2-1.el8ev.noarch

[root@host ~]# cat deploy.json 
{
	"he_cluster_cpu_type": "Intel Nehalem Family"
}

[root@host ~]# hosted-engine --deploy --ansible-extra-vars=@/root/deploy.json

Results in Default cluster having Nehalem instead of max level possible which is Westmere.

[root@host ~]# lscpu
Model name:          Westmere E56xx/L56xx/X56xx (Nehalem-C)