Kanagaraj M has posted comments on this change.

Change subject: engine: support for 3.4 cluster level
......................................................................


Patch Set 2:

Right, We have problems here. 

Whenever there is a new cluster level, you will need to add a new entry for 
all(most) of the configuration. Mostly a copy paste if you see from 3.2 to 3.3.

Better option would be to have the defaul/recent config value in 
ConfigValues.java and the overrides will go to config.sql. In this approach you 
don't need a new entries to config.sql when there is a new cluster level.

Lets take an exmaple, 
SupportForceCreateVG" - This is supported from 3.1 onwards,


If you look at config.sql, you will see following entries
select fn_db_add_config_value('SupportForceCreateVG','false','3.0');
select fn_db_add_config_value('SupportForceCreateVG','true','3.1');
select fn_db_add_config_value('SupportForceCreateVG','true','3.2');
select fn_db_add_config_value('SupportForceCreateVG','true','3.3');

And in ConfigValues.java

    @TypeConverterAttribute(Boolean.class)
    @DefaultValueAttribute("false")
    SupportForceCreateVG,

Now if there is 3.4 and 3.5, the user needs to add 2 more entries, which i feel 
is redundant.

Instead we can make 
    @TypeConverterAttribute(Boolean.class)
    @DefaultValueAttribute("true")
    SupportForceCreateVG,

and have only the following in config.sql

select fn_db_add_config_value('SupportForceCreateVG','false','3.0');

if a particular value(for a specific cluster level) is not found in Config.sql, 
the fallback is to use the value available in ConfigValues.java.


All the gluster related configurations are following this approach, we need to 
refactor other configurations also to follow this approach to reduce 
maintenance overheads.

-- 
To view, visit http://gerrit.ovirt.org/21406
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie56e5715fae9b14b94798242edf454bcc6e4e733
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to