Liron Aravot has uploaded a new change for review. Change subject: core: introducing OvfAutoUpdate ......................................................................
core: introducing OvfAutoUpdate vm/template configurations (including disks info) are stored on the master storage domain for backup purposes, import/export and also to provide the abillity to run VMs without having a running engine/db. Currently ovf update is done synchronously when performing various operations on vms/templates - update, save, adding/removing a disk, etc. What's more, currently updating the ovf (updateVM vdsm call) is usually done within a transcation. The idea behined OvfAutoUpdater is to perform batch ovf update operations that aggregate all outstanding updates per data center. These updates will be done in specifed time intervals which will reduce XML-RPC calls and will enable the removal of this syncronous vdsm call from all over the code. Change-Id: I034962cd022bbfa17b4b9d5a9eea1ea53853d730 Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/dbscripts/create_views.sql A backend/manager/dbscripts/upgrade/03_01_1490_add_ovf_update_date_column.sql A backend/manager/dbscripts/upgrade/03_01_1490_add_vm_generation_columns.sql M backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql M backend/manager/dbscripts/vm_templates_sp.sql M backend/manager/dbscripts/vms_sp.sql M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.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/config/ConfigValues.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.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/dal/dbbroker/auditloghandling/AuditLogDirector.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.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/VmTemplateDAO.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAODbFacadeImpl.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties 19 files changed, 171 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/9313/1 diff --git a/backend/manager/dbscripts/create_views.sql b/backend/manager/dbscripts/create_views.sql index fb15073..f1c9230 100644 --- a/backend/manager/dbscripts/create_views.sql +++ b/backend/manager/dbscripts/create_views.sql @@ -333,6 +333,8 @@ vm_templates.mem_size_mb as mem_size_mb, vm_templates.os as os, vm_templates.creation_date as creation_date, + vm_templates._update_date as update_date, + vm_templates._ovf_update_date as ovf_update_date, vm_templates.child_count as child_count, vm_templates.num_of_sockets as num_of_sockets, vm_templates.cpu_per_socket as cpu_per_socket, @@ -370,7 +372,7 @@ quota.quota_name as quota_name, vm_templates.migration_support, vm_templates.dedicated_vm_for_vds -FROM vm_static AS vm_templates INNER JOIN +FROM vm_static AS vm_templates INNER JOIN vds_groups ON vm_templates.vds_group_id = vds_groups.vds_group_id left outer JOIN storage_pool ON storage_pool.id = vds_groups.storage_pool_id @@ -519,7 +521,7 @@ 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, vm_static.vmt_guid as vmt_guid, vm_static.os as vm_os, vm_static.description as vm_description, 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.dedicated_vm_for_vds as dedicated_vm_for_vds, + vm_static.domain as vm_domain, vm_static._update_date as update_date, vm_templates._ovf_update_date as ovf_update_date, 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.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, vm_static.hypervisor_type as hypervisor_type, vm_static.operation_mode as operation_mode, vds_groups.name as vds_group_name, vds_groups.selection_algorithm as selection_algorithm, vds_groups.transparent_hugepages as transparent_hugepages, storage_pool.id as storage_pool_id, storage_pool.name as storage_pool_name, diff --git a/backend/manager/dbscripts/upgrade/03_01_1490_add_ovf_update_date_column.sql b/backend/manager/dbscripts/upgrade/03_01_1490_add_ovf_update_date_column.sql new file mode 100644 index 0000000..b96cb66 --- /dev/null +++ b/backend/manager/dbscripts/upgrade/03_01_1490_add_ovf_update_date_column.sql @@ -0,0 +1,2 @@ +select fn_db_add_column('vm_static', '_ovf_update_date', 'TIMESTAMP WITH TIME ZONE default TO_TIMESTAMP(0)'); +UPDATE vm_static set _ovf_update_date = _update_date WHERE _update_date != null; diff --git a/backend/manager/dbscripts/upgrade/03_01_1490_add_vm_generation_columns.sql b/backend/manager/dbscripts/upgrade/03_01_1490_add_vm_generation_columns.sql new file mode 100644 index 0000000..c928ce9 --- /dev/null +++ b/backend/manager/dbscripts/upgrade/03_01_1490_add_vm_generation_columns.sql @@ -0,0 +1,2 @@ +select fn_db_add_column('vm_static', '_ovf_update_date', 'TIMESTAMP WITH TIME ZONE'); +UPDATE vm_static set _ovf_update_date = _update_date WHERE _update_date != null; diff --git a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql index 2f651d5..e514aeb 100644 --- a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql +++ b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql @@ -550,6 +550,7 @@ --Handling Keyboard Layout configuration for VNC select fn_db_add_config_value('VncKeyboardLayout','en-us','general'); select fn_db_add_config_value('WaitForVdsInitInSec','60','general'); +select fn_db_add_config_value('OvfUpdateIntervalInMinutes','1','general'); --The default network connectivity check timeout select fn_db_add_config_value('NetworkConnectivityCheckTimeoutInSeconds','120','general'); -- AutoRecoveryConfiguration diff --git a/backend/manager/dbscripts/vm_templates_sp.sql b/backend/manager/dbscripts/vm_templates_sp.sql index 2a136f7..68f47c2 100644 --- a/backend/manager/dbscripts/vm_templates_sp.sql +++ b/backend/manager/dbscripts/vm_templates_sp.sql @@ -132,6 +132,22 @@ LANGUAGE plpgsql; +Create or replace FUNCTION UpdateVmTemplateOvfUpdateDate(v_vmt_guid UUID, + v_ovf_update_date TIMESTAMP WITH TIME ZONE) +RETURNS VOID + AS $procedure$ +BEGIN + UPDATE vm_static + SET _ovf_update_date = v_ovf_update_date + WHERE vm_guid = v_vmt_guid + AND entity_type = 'TEMPLATE'; +END; $procedure$ +LANGUAGE plpgsql; + + + + + @@ -249,6 +265,18 @@ +Create or replace FUNCTION GetAllVmTemplatesForOvfUpdate(v_storage_pool_id UUID) RETURNS SETOF vm_templates_view + AS $procedure$ +BEGIN +RETURN QUERY SELECT * + FROM vm_templates + WHERE ovf_update_date != update_date AND vds_group_id = v_storage_pool_id ; +END; $procedure$ +LANGUAGE plpgsql; + + + + Create or replace FUNCTION getAllVmTemplatesRelatedToQuotaId(v_quota_id UUID) RETURNS SETOF vm_templates_view AS $procedure$ BEGIN diff --git a/backend/manager/dbscripts/vms_sp.sql b/backend/manager/dbscripts/vms_sp.sql index db000b6..b950901 100644 --- a/backend/manager/dbscripts/vms_sp.sql +++ b/backend/manager/dbscripts/vms_sp.sql @@ -321,6 +321,26 @@ + +Create or replace FUNCTION UpdateVmOvfUpdateDate(v_vm_guid UUID, + v_ovf_update_date TIMESTAMP WITH TIME ZONE) +RETURNS VOID + AS $procedure$ +BEGIN + UPDATE vm_static + SET _ovf_update_date = v_ovf_update_date + WHERE vm_guid = v_vm_guid + AND entity_type = 'VM'; +END; $procedure$ +LANGUAGE plpgsql; + + + + + + + + Create or replace FUNCTION UpdateVmStatic(v_description VARCHAR(4000) , v_mem_size_mb INTEGER, v_os INTEGER, @@ -544,6 +564,21 @@ +Create or replace FUNCTION GetAllVmsForOvfUpdate(v_storage_pool_id UUID) RETURNS SETOF vms + AS $procedure$ +BEGIN +RETURN QUERY SELECT vms.* + FROM vms + WHERE ovf_update_date != update_date AND + vds_group_id = v_storage_pool_id; +END; $procedure$ +LANGUAGE plpgsql; + + + + + + Create or replace FUNCTION GetVmByVmGuid(v_vm_guid UUID, v_user_id UUID, v_is_filtered boolean) RETURNS SETOF vms AS $procedure$ BEGIN diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java index 7152106..d46834c 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitBackendServicesOnStartupBean.java @@ -36,6 +36,8 @@ ResourceManager.getInstance().init(); AsyncTaskManager.getInstance().InitAsyncTaskManager(); log.infoFormat("AsyncTaskManager: {0}", new Date()); + OvfDataUpdater.getInstance().InitOvfDataUpdater(); + log.infoFormat("OvfDataUpdater: {0}", new Date()); if (Config.<Boolean> GetValue(ConfigValues.EnableVdsLoadBalancing)) { VdsLoadBalancer.EnableLoadBalancer(); diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java index 59e9b02..36d4f27 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java @@ -1,7 +1,6 @@ package org.ovirt.engine.core.bll; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -256,7 +255,7 @@ if (getVm().getstatus() == VMStatus.ImageLocked) { VmHandler.unlockVm(getVm(), getCompensationContext()); } - updateVmInSpm(getVm().getstorage_pool_id(), Arrays.asList(getVm())); + throw new RuntimeException("asd"); } else { setCommandShouldBeLogged(false); log.warn("VmCommand::EndVmCommand: Vm is null - not performing EndAction on Vm"); diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java index 2d7a1c1..fb187ad 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java @@ -608,6 +608,7 @@ USER_ATTACH_STORAGE_DOMAINS_TO_POOL(1002), USER_ATTACH_STORAGE_DOMAINS_TO_POOL_FAILED(1003), STORAGE_DOMAIN_TASKS_ERROR(1004), + UPDATE_OVF_FOR_STORAGE_POOL_FAILED(1005), RELOAD_CONFIGURATIONS_SUCCESS(1010), RELOAD_CONFIGURATIONS_FAILURE(1011), 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 6c3102b..2d3e395 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 @@ -50,6 +50,12 @@ @Column(name = "creation_date", nullable = false) private Date creationDate = new Date(0); + @Column(name = "_update_date") + private Date updateDate; + + @Column(name = "_ovf_update_date") + private Date ovfUpdateDate; + @Size(max = BusinessEntitiesDefinitions.VM_DESCRIPTION_SIZE) @Column(name = "description", length = BusinessEntitiesDefinitions.GENERAL_MAX_SIZE) @Pattern(regexp = ValidationUtils.ONLY_ASCII_OR_NONE, @@ -116,6 +122,12 @@ @Column(name = "is_stateless") private boolean stateless; + + @Column(name = "db_generation") + private int db_generation; + + @Column(name = "ovf_generation") + private int ovf_generation; @Column(name = "is_smartcard_enabled") private boolean smartcardEnabled; @@ -318,6 +330,14 @@ this.creationDate = value; } + public Date getupdate_date() { + return updateDate; + } + + public void setupdate_date(Date value) { + this.updateDate = value; + } + public String getdescription() { return description; } diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java index 932ab12..b81c542 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java @@ -821,6 +821,10 @@ @DefaultValueAttribute("60") WaitForVdsInitInSec(230), + @TypeConverterAttribute(Integer.class) + @DefaultValueAttribute("1") + OvfUpdateIntervalInMinutes(231), + // JTODO - temporarily using values from 256 for Java specific options @TypeConverterAttribute(String.class) @DefaultValueAttribute("keys/engine.p12") diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java index a8aa28e..ec9af0c 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java @@ -63,6 +63,7 @@ VdsFenceOptionTypes, ServerCPUList, SupportedClusterLevels(ConfigAuthType.User), + OvfUpdateIntervalInMinutes, ProductRPMVersion(ConfigAuthType.User), RhevhLocalFSPath, CustomPublicConfig_AppsWebSite(ConfigAuthType.User), 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 15b4637..6e49b8a 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 @@ -37,6 +37,7 @@ entity.setpriority(rs.getInt("priority")); entity.setauto_startup(rs.getBoolean("auto_startup")); entity.setis_stateless(rs.getBoolean("is_stateless")); + entity.setupdate_date(DbFacadeUtils.fromDate(rs.getTimestamp("_update_date"))); entity.setiso_path(rs.getString("iso_path")); entity.setorigin(OriginType.forValue(rs.getInt("origin"))); entity.setkernel_url(rs.getString("kernel_url")); diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java index 7a8c220..c00fbf9 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java @@ -369,6 +369,7 @@ mSeverities.put(AuditLogType.USER_ACTIVATED_STORAGE_DOMAIN_ASYNC, AuditLogSeverity.NORMAL); mSeverities.put(AuditLogType.USER_ACTIVATE_STORAGE_DOMAIN_FAILED_ASYNC, AuditLogSeverity.WARNING); mSeverities.put(AuditLogType.STORAGE_DOMAIN_TASKS_ERROR, AuditLogSeverity.WARNING); + mSeverities.put(AuditLogType.UPDATE_OVF_FOR_STORAGE_POOL_FAILED, AuditLogSeverity.WARNING); } private static void initQuotaSeverities() { diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java index 924de84..571953f 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java @@ -1,5 +1,6 @@ package org.ovirt.engine.core.dao; +import java.util.Date; import java.util.List; import java.util.Map; @@ -160,6 +161,14 @@ public List<VM> getAllVmsRelatedToQuotaId(Guid quotaId); /** + * Get all vms which were updated in db since last ovf update + * + * @param quotaId + * @return + */ + public List<VM> getAllVmsForOvfUpdateForStoragePool(Guid storagePoolId); + + /** * Retrieves the list of all VMS with optional permission filtering. * * @param userID @@ -179,6 +188,15 @@ List<VM> getAll(); /** + * Updates the vm ovf update date to the given value + * + * @param id - vm id + * @param date - date to update the ovf update date to + * @return + */ + public void updateVmOvfUpdateDate(Guid id, Date date); + + /** * Saves the supplied VM. * * @param vm 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 116b7db..ffefe2a 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 @@ -3,6 +3,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -161,6 +162,13 @@ VMRowMapper.instance, getCustomMapSqlParameterSource() .addValue("quota_id", quotaId)); + } + + @Override + public List<VM> getAllVmsForOvfUpdateForStoragePool(Guid storagePoolId) { + return getCallsHandler().executeReadList("GetAllVmsForOvfUpdate", + VMRowMapper.instance, + getCustomMapSqlParameterSource().addValue("storage_pool_id", storagePoolId)); } @Override @@ -356,6 +364,13 @@ } } + @Override + public void updateVmOvfUpdateDate(Guid id, Date date) { + getCallsHandler().executeModification("UpdateVmOvfUpdateDate", getCustomMapSqlParameterSource() + .addValue("vm_guid", id) + .addValue("ovf_update_date", date.getTime())); + } + private static class VMWithPlugInfo { public VM getVM() { diff --git a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java index 010c7a8..3111d1f 100644 --- a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java +++ b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java @@ -1,5 +1,6 @@ package org.ovirt.engine.core.dao; +import java.util.Date; import java.util.List; import java.util.Map; @@ -78,6 +79,14 @@ List<VmTemplate> getAllTemplatesRelatedToQuotaId(Guid quotaId); /** + * Get all vm templates which were updated in db since last ovf update + * + * @param quotaId + * @return + */ + public List<VmTemplate> getAllVmTemplatesForOvfUpdateForStoragePool(Guid storagePoolId); + + /** * Retrieves templates with permissions to perform the given action. * * @param userId @@ -103,4 +112,13 @@ * @return the list of VmTemplates */ List<VmTemplate> getAllForNetwork(Guid networkId); + + /** + * Updates the vm template ovf update date to the given value + * + * @param id - vm id + * @param date - date to update the ovf update date to + * @return + */ + public void updateVmTemplateOvfUpdateDate(Guid id, Date date); } 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 ccf6c8e..1f5da5b 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 @@ -2,6 +2,7 @@ import java.sql.ResultSet; import java.sql.SQLException; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -51,6 +52,13 @@ } @Override + public List<VmTemplate> getAllVmTemplatesForOvfUpdateForStoragePool(Guid storagePoolId) { + return getCallsHandler().executeReadList("GetAllVmsForOvfUpdate", + VMTemplateRowMapper.instance, + getCustomMapSqlParameterSource().addValue("storage_pool_id", storagePoolId)); + } + + @Override public List<VmTemplate> getAllForStorageDomain(Guid storageDomain) { return getAllForStorageDomain(storageDomain, null, false); } @@ -82,8 +90,7 @@ public List<VmTemplate> getAllTemplatesRelatedToQuotaId(Guid quotaId) { return getCallsHandler().executeReadList("GetAllVmTemplatesRelatedToQuotaId", VMTemplateRowMapper.instance, - getCustomMapSqlParameterSource() - .addValue("quota_id", quotaId)); + getCustomMapSqlParameterSource()); } @Override @@ -185,6 +192,13 @@ .addValue("network_id", id)); } + @Override + public void updateVmTemplateOvfUpdateDate(Guid id, Date date) { + getCallsHandler().executeModification("UpdateVmTemplateOvfUpdateDate", getCustomMapSqlParameterSource() + .addValue("vmt_guid", id) + .addValue("ovf_update_date", date.getTime())); + } + private final static class VMTemplateRowMapper extends AbstractVmRowMapper<VmTemplate> { public static final VMTemplateRowMapper instance = new VMTemplateRowMapper(); diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties index 57584ad..9d3f4f1 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -528,6 +528,7 @@ USER_ACCOUNT_DISABLED_OR_LOCKED=User ${UserName} cannot login, as it got disabled or locked. Please contact the system administrator. USER_ACCOUNT_PASSWORD_EXPIRED=User ${UserName} cannot login, as the user account password has expired. Please contact the system administrator. STORAGE_DOMAIN_TASKS_ERROR=Storage Domain ${StorageDomainName} is down while there are tasks running on it. These tasks may fail. +UPDATE_OVF_FOR_STORAGE_POOL_FAILED=Failed to update VMs/Templates OVF data in Data Center ${StoragePoolName}. IMPORTEXPORT_IMPORT_VM_INVALID_INTERFACES=While importing VM ${VmName}, the Network/s ${Networks} were found to be Non-VM Networks or do not exist in Cluster. Network Name was not set in the Interface/s ${Interfaces}. IMPORTEXPORT_IMPORT_TEMPLATE_INVALID_INTERFACES=While importing Template ${VmTemplateName}, the Network/s ${Networks} were found to be Non-VM Networks or do not exist in Cluster. Network Name was not set in the Interface/s ${Interfaces}. VDS_SET_NON_OPERATIONAL_VM_NETWORK_IS_BRIDGELESS=Host ${VdsName} does not comply with the cluster ${VdsGroupName} networks, the following VM networks are bridgeless: '${Networks}' -- To view, visit http://gerrit.ovirt.org/9313 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I034962cd022bbfa17b4b9d5a9eea1ea53853d730 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches