Bug 1697367

Summary: make SMT setting more user friendly
Product: Red Hat Enterprise Virtualization Manager Reporter: Michal Skrivanek <michal.skrivanek>
Component: ovirt-engineAssignee: Tomasz Barański <tbaransk>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.2.8CC: bugs, lleistne, mkalinin, rbarry, Rhev-m-bugs, tbaransk
Target Milestone: ovirt-4.2.11Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-03 12:29:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Skrivanek 2019-04-08 12:23:24 UTC
SMT setting on and off in a more user friendly way

SMT can be configured on two levels: 
1. Cluster-wide, on Cluster Option's Optimization tab, applicable to all hosts in the cluster. https://imgur.com/a/ZGCO2Xe 

2. In Host's Option, on Kernel tab. Selecting here overwrites Cluster setting. https://imgur.com/a/GduP4jB 

3. General host view has a new alert added when there is discrepancy between settings and the reality of the host. https://imgur.com/a/HnfmN1z

Comment 1 Lucie Leistnerova 2019-04-23 14:12:33 UTC
The setting doesn't work as I expect. There are few issues:

1. In host's edit dialog 'SMT disabled' is checked even when it is enabled on the host
2. I have host with 'CPU Threads per Core: 2 (SMT Enabled)', cluster has 'Symmetric Multithreading disabled' checked and no warning about SMT discrepancy.
3. Host has SMT disabled. When I uncheck 'SMT disabled', save and go back to edit dialog, it is still checked. No warning about configuration changes. On the other hand after reinstalling it is back to enabled.
4. Warning in hosts table view (exclamation mark next to status) doesn't contain information of SMT discrepancy
5. Wrong warning: 'Host has SMT disabled but the changes has not been applied. Please restart the host.' -> should be 'Please reinstall and restart the host'

Tested in ovirt-engine-4.2.8.7-0.1.el7ev.noarch with vdsm-4.20.48-1.el7ev.x86_64

Comment 3 Tomasz Barański 2019-04-24 15:52:31 UTC
There is a bug connected to setting SMT Disabled on the host's Cluster. It is probably the reason behind #1 and #2.

Regarding #5: Reinstall is not required, only reboot.

Please add steps to reproduce #1 and #3.

Comment 4 Lucie Leistnerova 2019-04-24 22:31:13 UTC
Steps for #1:
1. have 4.2.8 host - CPU with multithreading e.g. at least SandyBridge with Thread(s) per core: 2, Core(s) per socket: 4, Socket(s): 1, no 'nosmt' in kernel command line
2. add it to engine, it should show CPU Threads per Core: 2 (SMT Enabled) in host's detail
3. check 'Symmetric Multithreading disabled' in appropriate cluster edit -> Optimization, if not already checked
4. edit the host -> Kernel - 'SMT disabled' is checked

Steps for #3 (works now a little bit different, maybe because of the reinstall steps):
1. for the host in #1 SMT disabled is checked, save it
   hosts detail shows warnings:
   Host needs to be reinstalled as important configuration changes were applied on it.
   Host has SMT disabled but the changes has not been applied. Please restart the host.
2. move host to maintenance
3. reinstall and restart the host
4. it shows in hosts detail CPU Threads per Core: 1 (SMT Disabled), 'nosmt' in kernel command line
5. edit the host again, uncheck SMT disabled, save it
   hosts detail shows warning:
   Host needs to be reinstalled as important configuration changes were applied on it.
6. go to edit again - 'SMT disabled' is checked
7. move host to maintenance
8. reinstall and restart the host
9. SMT back enabled

Strange behaviour is when I only restart the host without reinstall, it got stuck in stopping some jobs and also can't unmount storage. And I needed to restart it again by force.

Comment 5 Sandro Bonazzola 2019-04-30 08:12:19 UTC
There are no planned oVirt 4.2 releases, please re-target bug accordingly.

Comment 6 Sandro Bonazzola 2019-05-06 06:22:10 UTC
Fix included in ovirt-engine-4.3.3.7

Comment 8 Lucie Leistnerova 2019-05-07 17:02:43 UTC
'SMT Disabled' works as expected in ovirt-engine-4.3.3.7-0.1.el7.noarch
When we will have also new 4.2.8 build, I can verify this BZ.

Comment 10 Michal Skrivanek 2019-06-03 12:29:30 UTC
fixed in 4.3