Moti Asayag has posted comments on this change. Change subject: <WIP>engine: add feature comptability check for VDS ......................................................................
Patch Set 6: (3 comments) https://gerrit.ovirt.org/#/c/39756/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsGroupCommand.java: Line 78: for(ClusterFeature feature:vdsGroup.getFeaturesSupported()){ Line 79: feature.setVdsGroupId(vdsGroup.getId()); Line 80: } Line 81: getClusterFeatureDao().saveAll(vdsGroup.getFeaturesSupported()); Line 82: } > While creating cluster, user should be able to select the features he wants i wasn't aware of a requirement to allow the user to specify the desired supported features. If this is the case that api makes sense. Line 83: Line 84: setActionReturnValue(vdsGroup.getId()); Line 85: setSucceeded(true); Line 86: } https://gerrit.ovirt.org/#/c/39756/6/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java: Line 708: } else { Line 709: vds.setLiveMergeSupport(false); Line 710: } Line 711: Line 712: // Its an work around until the supportedFeatures field is supported by VDSM > This is a temp code to test the feature. It will be replaced with more gene 10x for clarifying Line 713: if (RpmVersionUtils.compareRpmParts(vds.getGlusterVersion().getMajor() + "." Line 714: + vds.getGlusterVersion().getMinor(), "3.7") >= 0) { Line 715: vds.setSupportedFeatures("gluster37_features"); Line 716: } https://gerrit.ovirt.org/#/c/39756/6/packaging/dbscripts/upgrade/03_06_1250_add_cluster_features_table.sql File packaging/dbscripts/upgrade/03_06_1250_add_cluster_features_table.sql: Line 6: CREATE TABLE cluster_features Line 7: ( Line 8: vds_group_id UUID NOT NULL, Line 9: feature varchar(256) NOT NULL, Line 10: is_enabled BOOLEAN, > Yes. Assume a case where a feature is enabled for a particular cluster dur So there will be a table that will contain all the features supported by a specific cluster, and another table to list all of the available feature. There should be a method to intersect between the two. Would it rely on the compatibility version ? Is the feature list presented to the user will be a static list that the user won't be able to control, and its attributes will contain the enabled/disabled checkbox ? What will happen when we move to a higher cluster level ? How the new available features will be reflected to the user if they are not stored in this table as disabled ? Or if a newer version of engine is installed and introduces new features ? IMO 'enabled' could be spared. We need the following entities: 1. SupportedClusterFeature - a specific feature which is supported by the given cluster (same as ClusterFeature in this patch). 2. ClusterFeature - a generic table (doesn't related to any specific cluster) which contains the list of features which are available for each cluster level. thoughts ? Line 11: CONSTRAINT PK_cluster_features PRIMARY KEY (vds_group_id, feature), Line 12: FOREIGN KEY (vds_group_id) REFERENCES vds_groups(vds_group_id) ON DELETE CASCADE Line 13: ) ; Line 14: -- To view, visit https://gerrit.ovirt.org/39756 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icba02b189a169bc676e0c5f47f7aaf394f0b49a6 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ramesh N <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Kanagaraj M <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Ramesh N <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
