Liron Aravot has posted comments on this change. Change subject: core: Add an audit log entry when number of LVs on a domain exceeded max ......................................................................
Patch Set 1: (3 comments) http://gerrit.ovirt.org/#/c/29057/1/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java: Line 836: STORAGE_DOMAIN_TASKS_ERROR(1004, AuditLogSeverity.WARNING), Line 837: UPDATE_OVF_FOR_STORAGE_POOL_FAILED(1005, AuditLogSeverity.WARNING), Line 838: UPGRADE_STORAGE_POOL_ENCOUNTERED_PROBLEMS(1006, AuditLogSeverity.WARNING), Line 839: REFRESH_REPOSITORY_IMAGE_LIST_INCOMPLETE(1007, AuditLogSeverity.WARNING), Line 840: NUNBER_OF_LVS_ON_STORAGE_DOMAIN_EXCEEDED_THRESHOLD(1008, AuditLogSeverity.WARNING), possibly let's add a delay between the appearances of this message, otherwise it might be irritating Line 841: Line 842: RELOAD_CONFIGURATIONS_SUCCESS(1010), Line 843: RELOAD_CONFIGURATIONS_FAILURE(1011, AuditLogSeverity.ERROR), Line 844: http://gerrit.ovirt.org/#/c/29057/1/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties File backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties: Line 619: TASK_STOPPING_ASYNC_TASK=Stopping async task ${CommandName} that started at ${Date} Line 620: REFRESH_REPOSITORY_IMAGE_LIST_FAILED=Refresh image list failed for domain(s): ${imageDomains}. Please check domain activity. Line 621: REFRESH_REPOSITORY_IMAGE_LIST_SUCCEEDED=Refresh image list succeeded for domain(s): ${imageDomains} Line 622: REFRESH_REPOSITORY_IMAGE_LIST_INCOMPLETE=Refresh image list probably incomplete for domain ${imageDomain}, only ${imageListSize} images discovered. Line 623: NUNBER_OF_LVS_ON_STORAGE_DOMAIN_EXCEEDED_THRESHOLD=The number of LVs on the domain ${storageDomainName} exceeded the threshold of ${maxNumOfLVs}. > Probably worth adding something like " you're approaching the limit where p not sure that threshold is the best fit term here.. Line 624: TASK_CLEARING_ASYNC_TASK=Clearing asynchronous task ${CommandName} that started at ${Date} Line 625: VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE=Vm ${VmName} was shut down due to ${VdsName} host reboot or manual fence Line 626: UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE=Vm ${VmName} tag default display type was updated Line 627: UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE_FAILED=Failed to update Vm ${VmName} tag default display type http://gerrit.ovirt.org/#/c/29057/1/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/storage/StorageDomainHelper.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/storage/StorageDomainHelper.java: Line 23: long numOfLVs = DbFacade.getInstance().getStorageDomainDao().getNumberOfImagesInStorageDomain(storageDomainId); Line 24: Integer maxNumOfLVs = Config.getValue(ConfigValues.AlertOnNumberOfLVs); Line 25: if (numOfLVs >= maxNumOfLVs) { Line 26: AuditLogableBase logable = new AuditLogableBase(); Line 27: logable.setStorageDomainId(storageDomainId); let's just add the value of the storage domain name, no need to set the id and load it from the db again if we already did it. Line 28: logable.addCustomValue("maxNumOfLVs", maxNumOfLVs.toString()); Line 29: AuditLogDirector.log(logable, AuditLogType.NUNBER_OF_LVS_ON_STORAGE_DOMAIN_EXCEEDED_THRESHOLD); Line 30: } Line 31: } -- To view, visit http://gerrit.ovirt.org/29057 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie701a4b622b4f93690020922f96279d28903abc8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
