Dudi Maroshi has uploaded a new change for review. Change subject: core [DB]: Append database update script for KSM with NUMA ......................................................................
core [DB]: Append database update script for KSM with NUMA Fix broken patch that mistekenly deleted this script in https://gerrit.ovirt.org/#/c/39864/ Change-Id: I1c716c866f41f139551e74b2748f12c326f67619 Bug-Url: https://bugzilla.redhat.com/840114 Signed-off-by: Dudi Maroshi <[email protected]> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java A packaging/dbscripts/upgrade/03_06_1600_add_ksm_with_numa_awareness.sql 5 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/42382/1 diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd index 61e1bf4..4516d05 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd @@ -1917,6 +1917,7 @@ <xs:complexType name="KSM"> <xs:sequence> <xs:element name="enabled" type="xs:boolean" minOccurs="0" maxOccurs="1"/> + <xs:element name="merge_across_nodes" type="xs:boolean" minOccurs="0" maxOccurs="1"/> </xs:sequence> </xs:complexType> diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml index 4781632..1bd32c2 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml @@ -1292,6 +1292,7 @@ cluster.maintenance_reason_required: xs:boolean cluster.management_network.id|name: xs:string cluster.ha_reservation: xs:boolean + cluster.ksm.merge_across_nodes: xs:boolean description: update the specified cluster in the system. The capabilities like virt service, cluster service, tarnsparent huge pages etc can be changed. - name: /clusters|rel=add description: add a new cluster to the system @@ -1304,7 +1305,7 @@ cluster.scheduling_policy.policy--DEPRECATED: 'xs:string', cluster.scheduling_policy.thresholds.low--DEPRECATED: 'xs:int', cluster.scheduling_policy.thresholds.high--DEPRECATED: 'xs:int', cluster.scheduling_policy.thresholds.duration--DEPRECATED: 'xs:int', cluster.scheduling_policy.id: 'xs:string', cluster.scheduling_policy.properties.property--COLLECTION: {property.name: 'xs:string', property.value: 'xs:string'}, cluster.error_handling.on_error: 'xs:string', cluster.virt_service: 'xs:boolean', cluster.gluster_service: 'xs:boolean', cluster.threads_as_cores: 'xs:boolean', cluster.tunnel_migration: 'xs:boolean', cluster.trusted_service: 'xs:boolean', cluster.ha_reservation: 'xs:boolean', cluster.ballooning_enabled: 'xs:boolean', cluster.cpu.architecture: 'xs:string', cluster.display.proxy: 'xs:string', - cluster.ksm.enabled: 'xs:boolean', + cluster.ksm.enabled: 'xs:boolean', cluster.ksm.merge_across_nodes: 'xs:boolean', cluster.fencing_policy.enabled: 'xs:boolean', cluster.fencing_policy.skip_if_sd_active.enabled: 'xs:boolean', cluster.fencing_policy.skip_if_connectivity_broken.enabled: 'xs:boolean', cluster.fencing_policy.skip_if_connectivity_broken.threshold: 'xs:int', cluster.management_network.id|name: 'xs:string', cluster.maintenance_reason_required: 'xs:boolean'} description: add a new cluster to the system diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java index 266a98c..1cd08c3 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/ClusterMapper.java @@ -102,8 +102,13 @@ if (model.isSetBallooningEnabled()) { entity.setEnableBallooning(model.isBallooningEnabled()); } - if (model.isSetKsm() && model.getKsm().isSetEnabled()) { - entity.setEnableKsm(model.getKsm().isEnabled()); + if (model.isSetKsm()) { + if (model.getKsm().isSetEnabled()) { + entity.setEnableKsm(model.getKsm().isEnabled()); + } + if (model.getKsm().isSetMergeAcrossNodes()) { + entity.setKsmMergeAcrossNumaNodes(model.getKsm().isMergeAcrossNodes()); + } } if (model.isSetDisplay() && model.getDisplay().isSetProxy()) { entity.setSpiceProxy("".equals(model.getDisplay().getProxy()) ? null : model.getDisplay().getProxy()); diff --git a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java index a592a49..7fb8e3d 100644 --- a/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java +++ b/backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/ClusterMapperTest.java @@ -58,7 +58,11 @@ assertEquals(model.isTunnelMigration(), transform.isTunnelMigration()); assertEquals(model.isTrustedService(), transform.isTrustedService()); assertEquals(model.isBallooningEnabled(), transform.isBallooningEnabled()); + assertEquals(model.getKsm().isEnabled(), transform.getKsm().isEnabled()); + assertEquals(model.getKsm().isMergeAcrossNodes(), transform.getKsm() + .isMergeAcrossNodes()); + assertEquals(model.getDisplay().getProxy(), transform.getDisplay().getProxy()); assertEquals(model.getSerialNumber().getPolicy(), transform.getSerialNumber().getPolicy()); assertEquals(model.getSerialNumber().getValue(), transform.getSerialNumber().getValue()); diff --git a/packaging/dbscripts/upgrade/03_06_1600_add_ksm_with_numa_awareness.sql b/packaging/dbscripts/upgrade/03_06_1600_add_ksm_with_numa_awareness.sql new file mode 100644 index 0000000..98565de --- /dev/null +++ b/packaging/dbscripts/upgrade/03_06_1600_add_ksm_with_numa_awareness.sql @@ -0,0 +1 @@ +select fn_db_add_column('vds_groups', 'ksm_merge_across_nodes', 'boolean default TRUE NULL'); \ No newline at end of file -- To view, visit https://gerrit.ovirt.org/42382 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c716c866f41f139551e74b2748f12c326f67619 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Dudi Maroshi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
