Martin Sivák has uploaded a new change for review. Change subject: engine: Add cpuShares attribute to a VM ......................................................................
engine: Add cpuShares attribute to a VM We are deprecating niceLevel in favour of direct control over the specific CPU QoS parameters. The first one we introduce in this patchset is cpuShares. Change-Id: I89c30a495629de9ebd37c476d035711b30797a91 Signed-off-by: Martin Sivak <msi...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java M packaging/dbscripts/create_views.sql A packaging/dbscripts/upgrade/03_03_0620_add_cpu_shares_to_vm.sql M packaging/dbscripts/vm_templates_sp.sql M packaging/dbscripts/vms_sp.sql 16 files changed, 91 insertions(+), 43 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/21/17421/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java index a8ba177..1f056ff 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java @@ -391,6 +391,7 @@ getParameters().getMasterVm().getUsbPolicy().getValue(), getParameters().getMasterVm().getTimeZone(), getParameters().getMasterVm().getNiceLevel(), + getParameters().getMasterVm().getCpuShares(), getParameters().getMasterVm().isFailBack(), getParameters().getMasterVm().getDefaultBootSequence(), getParameters().getMasterVm().getVmType(), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java index a99559e..828a354 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java @@ -876,6 +876,14 @@ this.vmStatic.setNiceLevel(value); } + public int getCpuShares() { + return this.vmStatic.getCpuShares(); + } + + public void setCpuShares(int value) { + this.vmStatic.setCpuShares(value); + } + public void setDbGeneration(long value) { this.vmStatic.setDbGeneration(value); } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java index bdcb9c4..9f09b99 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java @@ -93,6 +93,9 @@ @EditableOnVmStatusField private int niceLevel; + @EditableOnVmStatusField + private int cpuShares; + @EditableField private int priority; @@ -201,38 +204,38 @@ private Guid createdByUserId; public VmBase(Guid id, - Guid vdsGroupId, - int osId, - Date creationDate, - String description, - String comment, - int memSizeMb, - int numOfSockets, - int cpusPerSocket, - int numOfMonitors, - String domain, - String timezone, - VmType vmType, - UsbPolicy usbPolicy, - boolean failBack, - BootSequence defaultBootSequence, - int niceLevel, - int priority, - boolean autoStartup, - boolean stateless, - String isoPath, - OriginType origin, - String kernelUrl, - String kernelParams, - String initrdUrl, - Guid quotaId, - boolean smartcardEnabled, - boolean deleteProtected, - Boolean tunnelMigration, - String vncKeyboardLayout, - int minAllocatedMem, - boolean runAndPause, - Guid createdByUserId) { + Guid vdsGroupId, + int osId, + Date creationDate, + String description, + String comment, + int memSizeMb, + int numOfSockets, + int cpusPerSocket, + int numOfMonitors, + String domain, + String timezone, + VmType vmType, + UsbPolicy usbPolicy, + boolean failBack, + BootSequence defaultBootSequence, + int niceLevel, + int cpuShares, int priority, + boolean autoStartup, + boolean stateless, + String isoPath, + OriginType origin, + String kernelUrl, + String kernelParams, + String initrdUrl, + Guid quotaId, + boolean smartcardEnabled, + boolean deleteProtected, + Boolean tunnelMigration, + String vncKeyboardLayout, + int minAllocatedMem, + boolean runAndPause, + Guid createdByUserId) { super(); this.id = id; this.vdsGroupId = vdsGroupId; @@ -251,6 +254,7 @@ this.failBack = failBack; this.defaultBootSequence = defaultBootSequence; this.niceLevel = niceLevel; + this.cpuShares = cpuShares; this.priority = priority; this.autoStartup = autoStartup; this.stateless = stateless; @@ -578,6 +582,7 @@ result = prime * result + osId; result = prime * result + memSizeMb; result = prime * result + niceLevel; + result = prime * result + cpuShares; result = prime * result + numOfSockets; result = prime * result + numOfMonitors; result = prime * result + ((origin == null) ? 0 : origin.hashCode()); @@ -642,7 +647,8 @@ && migrationSupport == other.migrationSupport && ObjectUtils.objectsEqual(tunnelMigration, other.tunnelMigration) && ObjectUtils.objectsEqual(vncKeyboardLayout, other.vncKeyboardLayout) - && ObjectUtils.objectsEqual(createdByUserId, other.createdByUserId)); + && ObjectUtils.objectsEqual(createdByUserId, other.createdByUserId) + && cpuShares == other.cpuShares); } public Guid getQuotaId() { @@ -749,4 +755,12 @@ public void setCreatedByUserId(Guid createdByUserId) { this.createdByUserId = createdByUserId; } + + public int getCpuShares() { + return cpuShares; + } + + public void setCpuShares(int cpuShares) { + this.cpuShares = cpuShares; + } } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java index b29f54b..4fe81f5 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java @@ -48,6 +48,7 @@ setNumOfMonitors(1); initialized = false; setNiceLevel(0); + setCpuShares(0); setDefaultBootSequence(BootSequence.C); defaultDisplayType = DisplayType.qxl; setVmType(VmType.Desktop); @@ -71,6 +72,7 @@ vmStatic.isFailBack(), vmStatic.getDefaultBootSequence(), vmStatic.getNiceLevel(), + vmStatic.getCpuShares(), vmStatic.getPriority(), vmStatic.isAutoStartup(), vmStatic.isStateless(), diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java index 41c8183..f717338 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java @@ -49,6 +49,7 @@ public VmTemplate() { setNiceLevel(0); + setCpuShares(0); diskTemplateMap = new HashMap<Guid, DiskImage>(); } @@ -56,7 +57,7 @@ public VmTemplate(int childCount, Date creationDate, String description, int memSizeMb, String name, int numOfSockets, int cpuPerSocket, int osId, Guid vdsGroupId, Guid vmtGuid, String domain, - int numOfMonitors, int status, int usbPolicy, String timeZone, int niceLevel, + int numOfMonitors, int status, int usbPolicy, String timeZone, int niceLevel, int cpuShares, boolean failBack, BootSequence defaultBootSequence, VmType vmType, boolean smartcardEnabled, boolean deleteProtected, Boolean tunnelMigration, String vncKeyboardLayout, int minAllocatedMem, boolean stateless, boolean runAndPause, Guid createdByUserId) { @@ -78,6 +79,7 @@ failBack, defaultBootSequence, niceLevel, + cpuShares, 0, false, stateless, diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java index 952a638..a394c8d 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/AbstractVmRowMapper.java @@ -30,6 +30,7 @@ entity.setFailBack(rs.getBoolean("fail_back")); entity.setDefaultBootSequence(BootSequence.forValue(rs.getInt("default_boot_sequence"))); entity.setNiceLevel(rs.getInt("nice_level")); + entity.setCpuShares(rs.getInt("cpu_shares")); entity.setPriority(rs.getInt("priority")); entity.setAutoStartup(rs.getBoolean("auto_startup")); entity.setStateless(rs.getBoolean("is_stateless")); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java index 18cc051..8e56ad4 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java @@ -217,6 +217,7 @@ .addValue("fail_back", vm.isFailBack()) .addValue("vm_type", vm.getVmType()) .addValue("nice_level", vm.getNiceLevel()) + .addValue("cpu_shares", vm.getCpuShares()) .addValue("default_boot_sequence", vm.getDefaultBootSequence()) .addValue("default_display_type", vm.getDefaultDisplayType()) @@ -373,6 +374,7 @@ entity.setStoragePoolName(rs.getString("storage_pool_name")); entity.setTransparentHugePages(rs.getBoolean("transparent_hugepages")); entity.setNiceLevel(rs.getInt("nice_level")); + entity.setCpuShares(rs.getInt("cpu_shares")); entity.setHibernationVolHandle(rs.getString("hibernation_vol_handle")); entity.setDefaultBootSequence(BootSequence.forValue(rs.getInt("default_boot_sequence"))); entity.setDefaultDisplayType(DisplayType.forValue(rs.getInt("default_display_type"))); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java index db40fb7..a914a45 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java @@ -65,6 +65,7 @@ .addValue("fail_back", vm.isFailBack()) .addValue("vm_type", vm.getVmType()) .addValue("nice_level", vm.getNiceLevel()) + .addValue("cpu_shares", vm.getCpuShares()) .addValue("default_boot_sequence", vm.getDefaultBootSequence()) .addValue("default_display_type", vm.getDefaultDisplayType()) diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java index 358a723..f5e4cea 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java @@ -144,6 +144,7 @@ .addValue("fail_back", template.isFailBack()) .addValue("vm_type", template.getVmType()) .addValue("nice_level", template.getNiceLevel()) + .addValue("cpu_shares", template.getCpuShares()) .addValue("default_boot_sequence", template.getDefaultBootSequence()) .addValue("default_display_type", diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java index ed676f1..2f4e2c1 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java @@ -80,6 +80,8 @@ staticVm.setMemSizeMb(entity.getMemSizeMb()); staticVm.setOsId(entity.getOsId()); staticVm.setNiceLevel(entity.getNiceLevel()); + staticVm.setCpuShares(entity.getCpuShares()); + staticVm.setCpuShares(entity.getCpuShares()); staticVm.setFailBack(entity.isFailBack()); staticVm.setAutoStartup(entity.isAutoStartup()); staticVm.setStateless(entity.isStateless()); diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java index 62019bf..75761ba 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsProperties.java @@ -215,6 +215,7 @@ public static final String virtioConsole = "console"; public static final String cpuType = "cpuType"; public static final String niceLevel = "nice"; + public static final String cpuShares = "cpuShares"; public static final String hiberVolHandle = "hiberVolHandle"; public static final String pauseCode = "pauseCode"; public static final String KeyboardLayout = "keyboardLayout"; diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java index ff4b727..35e97ad 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilderBase.java @@ -92,6 +92,8 @@ } createInfo.put(VdsProperties.niceLevel, String.valueOf(vm.getNiceLevel())); + createInfo.put(VdsProperties.cpuShares, + String.valueOf(vm.getCpuShares())); if (!StringUtils.isEmpty(vm.getHibernationVolHandle())) { createInfo.put(VdsProperties.hiberVolHandle, vm.getHibernationVolHandle()); diff --git a/packaging/dbscripts/create_views.sql b/packaging/dbscripts/create_views.sql index bcb295a..3ff5b1d 100644 --- a/packaging/dbscripts/create_views.sql +++ b/packaging/dbscripts/create_views.sql @@ -363,6 +363,7 @@ vds_groups.trusted_service as trusted_service, vm_templates.vm_type as vm_type, vm_templates.nice_level as nice_level, + vm_templates.cpu_shares as cpu_shares, storage_pool.id as storage_pool_id, storage_pool.name as storage_pool_name, storage_pool.quota_enforcement_type as quota_enforcement_type, @@ -418,7 +419,7 @@ vm_templates.num_of_sockets*vm_templates.cpu_per_socket AS num_of_cpus, vm_templates.description, vm_templates.free_text_comment, vm_templates.vds_group_id, vm_templates.domain, vm_templates.num_of_monitors, vm_templates.allow_console_reconnect, vm_templates.template_status AS status, vm_templates.usb_policy, vm_templates.time_zone, vm_templates.fail_back, - vds_groups.name AS vds_group_name, vm_templates.vm_type, vm_templates.nice_level, storage_pool.id AS storage_pool_id, storage_pool.name + vds_groups.name AS vds_group_name, vm_templates.vm_type, vm_templates.nice_level, vm_templates.cpu_shares, storage_pool.id AS storage_pool_id, storage_pool.name AS storage_pool_name, vm_templates.default_boot_sequence, vm_templates.default_display_type, vm_templates.priority, vm_templates.auto_startup, vm_templates.is_stateless, vm_templates.iso_path, vm_templates.origin, vm_templates.initrd_url, vm_templates.kernel_url, @@ -438,7 +439,7 @@ vm_templates_1.num_of_sockets*vm_templates_1.cpu_per_socket AS num_of_cpus, vm_templates_1.description, vm_templates_1.free_text_comment, vm_templates_1.vds_group_id, vm_templates_1.domain, vm_templates_1.num_of_monitors, vm_templates_1.allow_console_reconnect, vm_templates_1.template_status AS status, vm_templates_1.usb_policy, vm_templates_1.time_zone, vm_templates_1.fail_back, vds_groups_1.name AS vds_group_name, vm_templates_1.vm_type, - vm_templates_1.nice_level, storage_pool_1.id AS storage_pool_id, + vm_templates_1.nice_level, vm_templates_1.cpu_shares, storage_pool_1.id AS storage_pool_id, storage_pool_1.name AS storage_pool_name, vm_templates_1.default_boot_sequence, vm_templates_1.default_display_type, vm_templates_1.priority, vm_templates_1.auto_startup, vm_templates_1.is_stateless, vm_templates_1.iso_path, vm_templates_1.origin, vm_templates_1.initrd_url, vm_templates_1.kernel_url, vm_templates_1.kernel_params, @@ -536,7 +537,7 @@ CREATE OR REPLACE VIEW vms AS -SELECT vm_static.vm_name as vm_name, vm_static.mem_size_mb as vm_mem_size_mb, vm_static.nice_level as nice_level, +SELECT vm_static.vm_name as vm_name, vm_static.mem_size_mb as vm_mem_size_mb, vm_static.nice_level as nice_level, vm_static.cpu_shares as cpu_shares, vm_static.vmt_guid as vmt_guid, vm_static.os as vm_os, vm_static.description as vm_description, vm_static.free_text_comment as vm_comment, vm_static.vds_group_id as vds_group_id, vm_static.domain as vm_domain, vm_static.creation_date as vm_creation_date, vm_static.auto_startup as auto_startup, vm_static.is_stateless as is_stateless, vm_static.is_smartcard_enabled as is_smartcard_enabled, vm_static.is_delete_protected as is_delete_protected, vm_static.dedicated_vm_for_vds as dedicated_vm_for_vds, vm_static.fail_back as fail_back, vm_static.default_boot_sequence as default_boot_sequence, vm_static.vm_type as vm_type, @@ -580,7 +581,7 @@ CREATE OR REPLACE VIEW vms_with_tags AS -SELECT vms.vm_name, vms.vm_mem_size_mb, vms.nice_level, vms.vmt_guid, vms.vm_os, vms.vm_description, vms.vm_comment, +SELECT vms.vm_name, vms.vm_mem_size_mb, vms.nice_level, vmc.cpu_shares, vms.vmt_guid, vms.vm_os, vms.vm_description, vms.vm_comment, vms.vds_group_id, vms.vm_domain, vms.vm_creation_date, vms.auto_startup, vms.is_stateless, vms.is_smartcard_enabled, vms.is_delete_protected, vms.dedicated_vm_for_vds, vms.fail_back, vms.default_boot_sequence, vms.vm_type, vms.vds_group_name, vms.storage_pool_id, vms.storage_pool_name, diff --git a/packaging/dbscripts/upgrade/03_03_0620_add_cpu_shares_to_vm.sql b/packaging/dbscripts/upgrade/03_03_0620_add_cpu_shares_to_vm.sql new file mode 100644 index 0000000..42efbc2 --- /dev/null +++ b/packaging/dbscripts/upgrade/03_03_0620_add_cpu_shares_to_vm.sql @@ -0,0 +1,2 @@ +select fn_db_add_column('vm_static', 'cpu_shares', 'integer not null default 0'); +select fn_db_add_column('vm_templates', 'cpu_shares', 'integer not null default 0'); diff --git a/packaging/dbscripts/vm_templates_sp.sql b/packaging/dbscripts/vm_templates_sp.sql index bb4225b..95dc00f 100644 --- a/packaging/dbscripts/vm_templates_sp.sql +++ b/packaging/dbscripts/vm_templates_sp.sql @@ -27,6 +27,7 @@ v_fail_back BOOLEAN , v_vm_type INTEGER , v_nice_level INTEGER, + v_cpu_shares INTEGER, v_default_boot_sequence INTEGER, v_default_display_type INTEGER, v_priority INTEGER, @@ -75,6 +76,7 @@ fail_back, vm_type, nice_level, + cpu_shares, default_boot_sequence, default_display_type, priority, @@ -121,6 +123,7 @@ v_fail_back, v_vm_type, v_nice_level, + v_cpu_shares, v_default_boot_sequence, v_default_display_type, v_priority, @@ -176,6 +179,7 @@ v_fail_back BOOLEAN , v_vm_type INTEGER , v_nice_level INTEGER, + v_cpu_shares INTEGER, v_default_boot_sequence INTEGER, v_default_display_type INTEGER, v_priority INTEGER, @@ -211,7 +215,8 @@ template_status = v_status,usb_policy = v_usb_policy,time_zone = v_time_zone, fail_back = v_fail_back, vm_type = v_vm_type, - nice_level = v_nice_level,default_boot_sequence = v_default_boot_sequence, + nice_level = v_nice_level, + cpu_shares = v_cpu_shares, default_boot_sequence = v_default_boot_sequence, default_display_type = v_default_display_type, priority = v_priority,auto_startup = v_auto_startup,is_stateless = v_is_stateless, iso_path = v_iso_path,origin = v_origin,initrd_url = v_initrd_url, diff --git a/packaging/dbscripts/vms_sp.sql b/packaging/dbscripts/vms_sp.sql index aedca76..5687eaa 100644 --- a/packaging/dbscripts/vms_sp.sql +++ b/packaging/dbscripts/vms_sp.sql @@ -419,6 +419,7 @@ v_fail_back BOOLEAN , v_vm_type INTEGER , v_nice_level INTEGER, + v_cpu_shares INTEGER, v_default_boot_sequence INTEGER, v_default_display_type INTEGER, v_priority INTEGER, @@ -441,8 +442,8 @@ RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors,allow_console_reconnect,is_initialized,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause, created_by_user_id) - VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors, v_allow_console_reconnect, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause, v_created_by_user_id); +INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid,domain,creation_date,num_of_monitors,allow_console_reconnect,is_initialized,num_of_sockets,cpu_per_socket,usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back, default_boot_sequence, vm_type, nice_level, cpu_shares, default_display_type, priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem, entity_type, quota_id, cpu_pinning, is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, vnc_keyboard_layout, is_run_and_pause, created_by_user_id) + VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors, v_allow_console_reconnect, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone, v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back, v_default_boot_sequence, v_vm_type, v_nice_level, v_cpu_shares, v_default_display_type, v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem, 'VM', v_quota_id, v_cpu_pinning, v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_vnc_keyboard_layout, v_is_run_and_pause, v_created_by_user_id); -- perform deletion from vm_ovf_generations to ensure that no record exists when performing insert to avoid PK violation. DELETE FROM vm_ovf_generations gen WHERE gen.vm_guid = v_vm_guid; INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES (v_vm_guid, (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = v_vds_group_id)); @@ -536,6 +537,7 @@ v_fail_back BOOLEAN , v_vm_type INTEGER , v_nice_level INTEGER, + v_cpu_shares INTEGER, v_default_boot_sequence INTEGER, v_default_display_type INTEGER, v_priority INTEGER, @@ -911,6 +913,7 @@ v_fail_back BOOLEAN , v_vm_type INTEGER , v_nice_level INTEGER, + v_cpu_shares INTEGER, v_default_boot_sequence INTEGER, v_default_display_type INTEGER, v_priority INTEGER, @@ -931,8 +934,8 @@ RETURNS VOID AS $procedure$ BEGIN -INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid, num_of_monitors, allow_console_reconnect, is_initialized, num_of_sockets, cpu_per_socket, usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds,fail_back,vm_type,nice_level,default_boot_sequence,default_display_type,priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem,cpu_pinning,is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, is_run_and_pause, created_by_user_id) - VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_num_of_monitors, v_num_of_monitors, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone,v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back,v_vm_type,v_nice_level,v_default_boot_sequence,v_default_display_type,v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem,v_cpu_pinning,v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_is_run_and_pause, v_created_by_user_id); +INSERT INTO vm_static(description, free_text_comment, mem_size_mb, os, vds_group_id, vm_guid, VM_NAME, vmt_guid, num_of_monitors, allow_console_reconnect, is_initialized, num_of_sockets, cpu_per_socket, usb_policy, time_zone,auto_startup,is_stateless,dedicated_vm_for_vds,fail_back,vm_type,nice_level,cpu_shares,default_boot_sequence,default_display_type,priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem,cpu_pinning,is_smartcard_enabled,is_delete_protected,host_cpu_flags, tunnel_migration, is_run_and_pause, created_by_user_id) + VALUES(v_description, v_free_text_comment, v_mem_size_mb, v_os, v_vds_group_id, v_vm_guid, v_vm_name, v_vmt_guid, v_num_of_monitors, v_num_of_monitors, v_is_initialized, v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone,v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back,v_vm_type,v_nice_level,v_cpu_shares,v_default_boot_sequence,v_default_display_type,v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem,v_cpu_pinning,v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags, v_tunnel_migration, v_is_run_and_pause, v_created_by_user_id); INSERT INTO vm_dynamic(vm_guid, status) VALUES(v_vm_guid, 0); -- To view, visit http://gerrit.ovirt.org/17421 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I89c30a495629de9ebd37c476d035711b30797a91 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <msi...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches