Shubhendu Tripathi has posted comments on this change.

Change subject: gluster: Fix add host gluster uuid already exists in the db.
......................................................................


Patch Set 2:

(10 comments)

minor comments

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java
Line 344:         glusterHostUuidFound = true;
Line 345:         if 
(GlusterFeatureSupported.glusterHostUuidSupported(getVdsGroup().getcompatibility_version()))
 {
Line 346:             VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.GetGlusterHostUUID,
Line 347:                     new 
VdsIdVDSCommandParametersBase(getVds().getId()));
Line 348:             Guid addServerGlusterUuid = 
Guid.createGuidFromString((String) returnValue.getReturnValue());
s/addServerGlusterUuid/addedServerUuid/g
Line 349:             if (returnValue.getSucceeded() && 
returnValue.getReturnValue() != null) {
Line 350:                 if (!validateGlusterHostUuid(addServerGlusterUuid)) {
Line 351:                     glusterHostUuidFound = true;
Line 352:                     
setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_FOUND, null);


Line 347:                     new 
VdsIdVDSCommandParametersBase(getVds().getId()));
Line 348:             Guid addServerGlusterUuid = 
Guid.createGuidFromString((String) returnValue.getReturnValue());
Line 349:             if (returnValue.getSucceeded() && 
returnValue.getReturnValue() != null) {
Line 350:                 if (!validateGlusterHostUuid(addServerGlusterUuid)) {
Line 351:                     glusterHostUuidFound = true;
s/glusterHostUuidFound/hostUuidExists/g
Line 352:                     
setNonOperational(NonOperationalReason.GLUSTER_HOST_UUID_ALREADY_FOUND, null);
Line 353:                     return false;
Line 354:                 }
Line 355:                 saveGlusterHostUuid(addServerGlusterUuid);


Line 429:         }
Line 430:         return false;
Line 431:     }
Line 432: 
Line 433:     private boolean validateGlusterHostUuid(Guid 
addServerGlusterUuid) {
s/validateGlusterHostUuid/checkIfHostUuidExists/g
Line 434:         GlusterServerDao glusterServerDao = 
DbFacade.getInstance().getGlusterServerDao();
Line 435:         if 
(glusterServerDao.getByGlusterServerUuid(addServerGlusterUuid) != null) {
Line 436:             return false;
Line 437:         }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SetNonOperationalVdsCommand.java
Line 118:             return AuditLogType.GLUSTER_COMMAND_FAILED;
Line 119:         case GLUSTER_HOST_UUID_NOT_FOUND:
Line 120:             return AuditLogType.GLUSTER_HOST_UUID_NOT_FOUND;
Line 121:         case GLUSTER_HOST_UUID_ALREADY_FOUND:
Line 122:             return AuditLogType.GLUSTER_HOST_UUID_ALREADY_FOUND;
same
Line 123:         case EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER:
Line 124:             return 
AuditLogType.EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER;
Line 125:         case UNTRUSTED:
Line 126:             return AuditLogType.VDS_UNTRUSTED;


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
Line 304:     GLUSTER_VOLUME_REMOVE_BRICKS_STOP_FAILED(4083),
Line 305:     GLUSTER_VOLUME_REMOVE_BRICKS_COMMIT(4084),
Line 306:     GLUSTER_VOLUME_REMOVE_BRICKS_COMMIT_FAILED(4085),
Line 307:     GLUSTER_BRICK_STATUS_CHANGED(4086),
Line 308:     GLUSTER_HOST_UUID_ALREADY_FOUND(4087),
s/GLUSTER_HOST_UUID_ALREADY_FOUND/GLUSTER_HOST_UUID_ALREADY_EXISTS/g
Line 309: 
Line 310:     USER_FORCE_SELECTED_SPM(159),
Line 311:     USER_VDS_RESTART(41),
Line 312:     USER_FAILED_VDS_RESTART(107),


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
Line 19:     EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER(11),
Line 20:     UNTRUSTED(12),
Line 21:     UNINITIALIZED(13),
Line 22:     CLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER(14),
Line 23:     GLUSTER_HOST_UUID_ALREADY_FOUND(15);
s/GLUSTER_HOST_UUID_ALREADY_FOUND/GLUSTER_HOST_UUID_ALREADY_EXISTS/g
Line 24: 
Line 25:     private final int value;
Line 26: 
Line 27:     private static final Map<Integer, NonOperationalReason> valueMap = 
new HashMap<Integer, NonOperationalReason>(


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
Line 157:         severities.put(AuditLogType.GLUSTER_SERVICE_STOP_FAILED, 
AuditLogSeverity.ERROR);
Line 158:         severities.put(AuditLogType.GLUSTER_SERVICE_RESTARTED, 
AuditLogSeverity.NORMAL);
Line 159:         severities.put(AuditLogType.GLUSTER_SERVICE_RESTART_FAILED, 
AuditLogSeverity.ERROR);
Line 160:         severities.put(AuditLogType.GLUSTER_HOST_UUID_NOT_FOUND, 
AuditLogSeverity.ERROR);
Line 161:         severities.put(AuditLogType.GLUSTER_HOST_UUID_ALREADY_FOUND, 
AuditLogSeverity.ERROR);
Same as earlier
Line 162:         severities.put(AuditLogType.GLUSTER_BRICK_STATUS_CHANGED, 
AuditLogSeverity.WARNING);
Line 163:     }
Line 164: 
Line 165:     private static void initDefaultSeverities() {


....................................................
File 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
Line 661: GLUSTER_CLUSTER_SERVICE_STATUS_ADDED=Status of service type 
${ServiceType} set to ${NewStatus} on cluster ${VdsGroupName}
Line 662: GLUSTER_SERVICE_ADDED_TO_SERVER=Service ${ServiceName} was not mapped 
to server ${VdsName}. Mapped it now.
Line 663: GLUSTER_SERVER_SERVICE_STATUS_CHANGED=Status of service 
${ServiceName} on server ${VdsName} changed from ${OldStatus} to ${NewStatus}. 
Updating in engine now.
Line 664: GLUSTER_HOST_UUID_NOT_FOUND=Could not find gluster uuid of server 
${VdsName} on Cluster ${VdsGroupName}.
Line 665: GLUSTER_HOST_UUID_ALREADY_FOUND=Same gluster uuid of server 
${VdsName} on Cluster ${VdsGroupName} already exists.
Same as earlier
Line 666: WATCHDOG_EVENT=Watchdog event (${wdaction}) triggered on ${VmName} at 
${wdevent} (host time).
Line 667: GLUSTER_HOOK_UPDATED=Gluster Hook ${GlusterHookName} updated on 
conflicting servers.
Line 668: GLUSTER_HOOK_UPDATE_FAILED=Failed to update Gluster Hook 
${GlusterHookName} on conflicting servers. ${FailureMessage}
Line 669: GLUSTER_HOOK_ADDED=Gluster Hook ${GlusterHookName} added on 
conflicting servers.


....................................................
File 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
Line 29:     String NonOperationalReason___UNINITIALIZED();
Line 30: 
Line 31:     String NonOperationalReason___GLUSTER_HOST_UUID_NOT_FOUND();
Line 32: 
Line 33:     String NonOperationalReason___GLUSTER_HOST_UUID_ALREADY_FOUND();
same
Line 34: 
Line 35:     String 
NonOperationalReason___CLUSTER_VERSION_INCOMPATIBLE_WITH_CLUSTER();
Line 36: 
Line 37:     String 
NonOperationalReason___EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER();


....................................................
File 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
Line 9: NonOperationalReason___KVM_NOT_RUNNING=KVM is not running on the Host.
Line 10: NonOperationalReason___TIMEOUT_RECOVERING_FROM_CRASH=Timeout 
connecting to Host.
Line 11: NonOperationalReason___GLUSTER_COMMAND_FAILED=Gluster command failed 
on server.
Line 12: NonOperationalReason___GLUSTER_HOST_UUID_NOT_FOUND=Could not find 
Gluster UUID of the server.
Line 13: NonOperationalReason___GLUSTER_HOST_UUID_ALREADY_FOUND=Gluster UUID 
already exists.
same
Line 14: NonOperationalReason___EMULATED_MACHINES_INCOMPATIBLE_WITH_CLUSTER=The 
Host emulated machine flags doesn't match one of the cluster emulated machines.
Line 15: NonOperationalReason___UNTRUSTED=Host is untrusted.
Line 16: NonOperationalReason___UNINITIALIZED=Host is uninitialized as it is 
not attested yet.
Line 17: UsbPolicy___ENABLED_LEGACY=Legacy


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1cca4c64cdbcb6a681089e1fbb2f0d707f768083
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeya...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeya...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to