Moti Asayag has posted comments on this change.

Change subject: core: notify user about broken domain tasks (#753591)
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/SetStoragePoolStatusCommand.java
Line 39:                     DbFacade.getInstance()
Line 40:                             .getStoragePoolIsoMapDAO()
Line 41:                             .updateStatus(storageStatusInPool.getId(), 
storageStatusInPool.getstatus());
Line 42:                     //notify async tasks
Line 43:                     final List<Guid> asyncTasks = 
getDbFacade().getAsyncTaskDAO().getAsyncTaskIdsByEntity(storageStatusInPool.getstorage_id());
I think a single event to log is enough per storage domain, or at least as 
number of running jobs if wishes to log the job-id
Line 44:                     for(Guid taskId: asyncTasks) {
Line 45:                         AuditLogableBase auditLogableBase = new 
AuditLogableBase();
Line 46:                         
auditLogableBase.setStorageDomain(getStorageDomain());
Line 47:                         auditLogableBase.setJobId(taskId);


Line 43:                     final List<Guid> asyncTasks = 
getDbFacade().getAsyncTaskDAO().getAsyncTaskIdsByEntity(storageStatusInPool.getstorage_id());
Line 44:                     for(Guid taskId: asyncTasks) {
Line 45:                         AuditLogableBase auditLogableBase = new 
AuditLogableBase();
Line 46:                         
auditLogableBase.setStorageDomain(getStorageDomain());
Line 47:                         auditLogableBase.setJobId(taskId);
sorry for missing this in previous review, but jobId != taskID.
async_tasks has an attribute named stepId which is the part of the Job this 
task is being run under.

If wishes to set the proper job-id, you need to use the StepDao to retrieve the 
Step entity and get the jobId.

Note that Steps and Jobs tends to be cleaned from the DB, therefore I'd verify 
the Step isn't null.
Line 48:                         AuditLogDirector.log(auditLogableBase, 
AuditLogType.STORAGE_DOMAIN_TASKS_ERROR);
Line 49:                     }
Line 50:                 }
Line 51:             }


....................................................
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Line 516: RELOAD_CONFIGURATIONS_SUCCESS=System Configurations reloaded 
successfully.
Line 517: RELOAD_CONFIGURATIONS_FAILURE=System Configurations failed to reload.
Line 518: USER_ACCOUNT_DISABLED_OR_LOCKED=User ${UserName} cannot login, as it 
got disabled or locked. Please contact the system administrator.
Line 519: USER_ACCOUNT_PASSWORD_EXPIRED=User ${UserName} cannot login, as the 
user account password has expired. Please contact the system administrator.
Line 520: STORAGE_DOMAIN_TASKS_ERROR=Storage Domain is down while there are 
tasks running on it. These tasks may fail.
just noticed you don't specify the storage domain name - i think it should be 
useful when looking event-log
Line 521: 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}.
Line 522: 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}.
Line 523: 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}'
Line 524: # Gluster Messages


--
To view, visit http://gerrit.ovirt.org/7957
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2b6239668eece2be39b96c9bd360af2bd310a3b0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to