Liron Ar has uploaded a new change for review. Change subject: core: InitVdsOnUp- proceed regardless of ConnectHostToStoragePoolServers ......................................................................
core: InitVdsOnUp- proceed regardless of ConnectHostToStoragePoolServers When running InitVdsOnUp, attempt to connect to the pool regardless of the result of the connect to the storage pool servers. Change-Id: Ia69b62807331d4a47482f71fe88aa3e2ad7b7448 Signed-off-by: Liron Aravot <lara...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectHostToStoragePoolServersCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.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/resources/bundles/AuditLogMessages.properties 5 files changed, 11 insertions(+), 31 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/80/13880/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java index 7827748..57b77ac 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InitVdsOnUpCommand.java @@ -61,7 +61,7 @@ public class InitVdsOnUpCommand extends StorageHandlingCommandBase<HostStoragePoolParametersBase> { private boolean _fenceSucceeded = true; private boolean _vdsProxyFound; - private boolean _connectStorageSucceeded, _connectPoolSucceeded; + private boolean _connectPoolSucceeded; private boolean _glusterPeerListSucceeded, _glusterPeerProbeSucceeded; private FenceStatusReturnValue _fenceStatusReturnValue; @@ -133,17 +133,13 @@ if (getStoragePool() == null || StoragePoolStatus.Uninitialized == getStoragePool().getstatus() || StoragePoolStatus.Maintenance == getStoragePool().getstatus()) { returnValue = true; - _connectStorageSucceeded = true; _connectPoolSucceeded = true; } else { HostStoragePoolParametersBase params = new HostStoragePoolParametersBase(getStoragePool(), getVds()); - if (Backend.getInstance() - .runInternalAction(VdcActionType.ConnectHostToStoragePoolServers, params) - .getSucceeded()) { - _connectStorageSucceeded = true; - returnValue = connectHostToPool(); - _connectPoolSucceeded = returnValue; - } + Backend.getInstance() + .runInternalAction(VdcActionType.ConnectHostToStoragePoolServers, params); + returnValue = connectHostToPool(); + _connectPoolSucceeded = returnValue; } return returnValue; } @@ -241,9 +237,7 @@ return type; } - if (!_connectStorageSucceeded) { - type = AuditLogType.CONNECT_STORAGE_SERVERS_FAILED; - } else if (!_connectPoolSucceeded) { + if (!_connectPoolSucceeded) { type = AuditLogType.CONNECT_STORAGE_POOL_FAILED; } else if (getVds().getpm_enabled() && _fenceSucceeded) { type = AuditLogType.VDS_FENCE_STATUS; diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectHostToStoragePoolServersCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectHostToStoragePoolServersCommand.java index e8de611..9439f9e 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectHostToStoragePoolServersCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectHostToStoragePoolServersCommand.java @@ -32,24 +32,18 @@ @Override protected void executeCommand() { InitConnectionList(); - setSucceeded(connectStorageServer(getStoragePool().getstorage_pool_type(), getConnections())); + connectStorageServer(getStoragePool().getstorage_pool_type(), getConnections()); + setSucceeded(true); if (getNeedToConnectIso()) { - if (!connectStorageServer(getIsoType(), getIsoConnections())) { - log.infoFormat("Failed to connect host {0} to StoragePool {1} Iso domain/s connections", getVds() - .getName(), getStoragePool().getname()); - } + connectStorageServer(getIsoType(), getIsoConnections()); } if (getNeedToConnectExport()) { - if (!connectStorageServer(getExportType(), getExportConnections())) { - log.infoFormat("Failed to connect host {0} to StoragePool {1} Export domain/s connections", getVds() - .getName(), getStoragePool().getname()); - } + connectStorageServer(getExportType(), getExportConnections()); } } - private boolean connectStorageServer(StorageType type, List<StorageServerConnections> connections) { - boolean connectSucceeded = true; + private void connectStorageServer(StorageType type, List<StorageServerConnections> connections) { if (connections != null && connections.size() > 0) { Map<String, String> retValues = (HashMap<String, String>) Backend .getInstance() @@ -58,11 +52,6 @@ VDSCommandType.ConnectStorageServer, new ConnectStorageServerVDSCommandParameters(getVds().getId(), getStoragePool().getId(), type, connections)).getReturnValue(); - connectSucceeded = - StorageHelperDirector.getInstance().getItem(type).isConnectSucceeded(retValues, connections); - log.infoFormat("Host {0} storage connection was {1} ", getVds().getName(), - connectSucceeded ? "succeeded" : "failed"); } - return connectSucceeded; } } 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 2a04f04..ac59f24 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 @@ -633,7 +633,6 @@ RECOVERY_STORAGE_POOL(991), RECOVERY_STORAGE_POOL_FAILED(992), SYSTEM_CHANGE_STORAGE_POOL_STATUS_RESET_IRS(993, AuditLogTimeInterval.MINUTE.getValue()), - CONNECT_STORAGE_SERVERS_FAILED(994), CONNECT_STORAGE_POOL_FAILED(995), STORAGE_DOMAIN_ERROR(996), REFRESH_REPOSITORY_FILE_LIST_FAILED(997), 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 8eda9e4..5d496ef 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 @@ -385,7 +385,6 @@ severities.put(AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_PROBLEMATIC_FROM_NON_OPERATIONAL, AuditLogSeverity.NORMAL); severities.put(AuditLogType.RECOVERY_STORAGE_POOL, AuditLogSeverity.NORMAL); - severities.put(AuditLogType.CONNECT_STORAGE_SERVERS_FAILED, AuditLogSeverity.WARNING); severities.put(AuditLogType.CONNECT_STORAGE_POOL_FAILED, AuditLogSeverity.WARNING); severities.put(AuditLogType.STORAGE_DOMAIN_ERROR, AuditLogSeverity.ERROR); severities.put(AuditLogType.REFRESH_REPOSITORY_FILE_LIST_FAILED, AuditLogSeverity.ERROR); 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 4c060a8..7c5aeff 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -523,7 +523,6 @@ VM_WAS_SET_DOWN_DUE_TO_HOST_REBOOT_OR_MANUAL_FENCE=Vm ${VmName} was shut down due to ${VdsName} host reboot or manual fence UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE=Vm ${VmName} tag default display type was updated UPDATE_TAGS_VM_DEFAULT_DISPLAY_TYPE_FAILED=Failed to update Vm ${VmName} tag default display type -CONNECT_STORAGE_SERVERS_FAILED=Failed to connect Host ${VdsName} to Storage Servers CONNECT_STORAGE_POOL_FAILED=Failed to connect Host ${VdsName} to Storage Pool ${StoragePoolName} STORAGE_DOMAIN_ERROR=The error message for connection ${Connection} returned by VDSM was: ${ErrorMessage} VDS_LOW_MEM=Available memory of host ${HostName} [${AvailableMemory} MB] is under defined threshold [${Threshold} MB]. -- To view, visit http://gerrit.ovirt.org/13880 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia69b62807331d4a47482f71fe88aa3e2ad7b7448 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <lara...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches