Bug 1338545

Summary: Add AlertOnNumberOfLVs to engine-config.sh
Product: [oVirt] ovirt-engine Reporter: Allon Mureinik <amureini>
Component: Tools.ConfigAssignee: Allon Mureinik <amureini>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: low Docs Contact:
Priority: medium    
Version: 4.0.0CC: acanan, amureini, bugs, ngavrilo, ylavi
Target Milestone: ovirt-4.0.0-rcFlags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
amureini: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.0   
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: 2016-07-05 08:01:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Allon Mureinik 2016-05-22 16:46:04 UTC
Description of problem:
AlertOnNumberOfLVs is the config value that controls how many LVs are allowed in a block storage domain before the user gets warned about it.
As stated in https://bugzilla.redhat.com/show_bug.cgi?id=1275182#c14:

"""
we should [have this config value in engine-config] since for some storage we can have more and for some less. It's also a matter of how conservative the customer is. Users would like to change this.
"""

This bz is to track adding the option to configure it via the tool.

Version-Release number of selected component (if applicable):
4.0.0.

How reproducible:
100%

Steps to Reproduce:
1. On the engine machine, run ${OVIRT_HOME}/share/ovirt-engine/bin/engine-config.sh -g AlertOnNumberOfLVs

Actual results:
Error fetching AlertOnNumberOfLVs value: no such entry. Please verify key name and property file support.

Expected results:
Value of the config value is displayed.

[similartly, setting it should be possible via the -s flag]

Comment 1 Natalie Gavrielov 2016-06-07 16:54:27 UTC
Allon,

This issue only takes care of displaying the value?
What about the option of setting it to a different value?

Comment 2 Allon Mureinik 2016-06-08 13:06:19 UTC
Yup, indeed - any value that can be queried by engine-config can also be updated, by using the -s flag:

${OVIRT_HOME}/share/ovirt-engine/bin/engine-config.sh -s AlertOnNumberOfLVs=<some number>

The legal values are integers of 6 and above (due to the special LVs we create on the domain)

Comment 3 Carlos Mestre González 2016-06-17 14:44:49 UTC
#engine-config  -g AlertOnNumberOfLVs
AlertOnNumberOfLVs: 300 version: general
# engine-config  -s AlertOnNumberOfLVs=5
Cannot set value 5 to key AlertOnNumberOfLVs. 
# engine-config  -s AlertOnNumberOfLVs=6
# engine-config  -g AlertOnNumberOfLVs
AlertOnNumberOfLVs: 6 version: general
engine=> SELECT * from vdc_options WHERE option_name = 'AlertOnNumberOfLVs';
 option_id |    option_name     | option_value | version 
-----------+--------------------+--------------+---------
       375 | AlertOnNumberOfLVs | 6            | general
(1 row)


(also tested negative: char, float, negative...)

version: 
rhevm-4.0.0.4-0.1.el7ev.noarch

Comment 4 Sandro Bonazzola 2016-07-05 08:01:58 UTC
oVirt 4.0.0 has been released, closing current release.