Moti Asayag has uploaded a new change for review. Change subject: engine: Improve setup networks failure message ......................................................................
engine: Improve setup networks failure message Change-Id: Id25f864970df7e7f420f760fa8e8c78c1104d64e Bug-Url: https://bugzilla.redhat.com/ Signed-off-by: Moti Asayag <masa...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties 5 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/25413/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java index 878bfa4..de0faa2 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/SetupNetworksCommand.java @@ -20,6 +20,8 @@ import org.ovirt.engine.core.common.businessentities.network.VdsNetworkInterface; import org.ovirt.engine.core.common.config.Config; import org.ovirt.engine.core.common.config.ConfigValues; +import org.ovirt.engine.core.common.errors.VdcBLLException; +import org.ovirt.engine.core.common.errors.VdcBllErrors; import org.ovirt.engine.core.common.errors.VdcBllMessages; import org.ovirt.engine.core.common.interfaces.FutureVDSCall; import org.ovirt.engine.core.common.vdscommands.CollectHostNetworkDataVdsCommandParameters; @@ -134,6 +136,10 @@ try { VDSReturnValue retVal = setupNetworksTask.get(timeout, TimeUnit.SECONDS); if (retVal != null) { + if (!retVal.getSucceeded() && retVal.getVdsError() == null && getParameters().isCheckConnectivity()) { + throw new VdcBLLException(VdcBllErrors.SETUP_NETWORK_ROLLBACK, retVal.getExceptionString()); + } + VdsHandler.handleVdsResult(retVal); if (retVal.getSucceeded()) { diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java index 1eb3f70..7aa5971 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java @@ -432,6 +432,9 @@ LABELED_NETWORK_INTERFACE_NOT_FOUND(5200), NETWORK_LABEL_CONFLICT(5201), + // SetupNetwork errors + SETUP_NETWORK_ROLLBACK(5300), + // Gluster errors NO_UP_SERVER_FOUND(7000), // error to indicate backend does not recognize the session diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties index b6cc050..7b1ddc7 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -1128,6 +1128,7 @@ POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Cannot perform ${action}. Another power management action is already in progress. LABELED_NETWORK_INTERFACE_NOT_FOUND=A labeled network interface could not be found. NETWORK_LABEL_CONFLICT=The networks represented by label cannot be configured on the same network interface. +SETUP_NETWORK_ROLLBACK=Reverting back to last known saved configuration. # Affinity Groups AFFINITY_GROUP_NAME_TOO_LONG=Cannot ${action} ${type}. Name field input is too long. AFFINITY_GROUP_NAME_INVALID=Cannot ${action} ${type}. Name field is invalid. diff --git a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java index 7eba70f..992b3a1 100644 --- a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java +++ b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java @@ -3016,6 +3016,9 @@ @DefaultStringValue("The networks represented by label cannot be configured on the same network interface.") String NETWORK_LABEL_CONFLICT(); + @DefaultStringValue("Reverting back to last known saved configuration.") + String SETUP_NETWORK_ROLLBACK(); + @DefaultStringValue("Cannot ${action} ${type}. Name field input is too long.") String AFFINITY_GROUP_NAME_TOO_LONG(); diff --git a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties index 7e7718f..e7aafae 100644 --- a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties +++ b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties @@ -1099,6 +1099,7 @@ POWER_MANAGEMENT_ACTION_ON_ENTITY_ALREADY_IN_PROGRESS=Another power management action, ${action}, is already in progress. LABELED_NETWORK_INTERFACE_NOT_FOUND=A labeled network interface could not be found. NETWORK_LABEL_CONFLICT=The networks represented by label cannot be configured on the same network interface. +SETUP_NETWORK_ROLLBACK=Reverting back to last known saved configuration. # Affinity Groups AFFINITY_GROUP_NAME_TOO_LONG=Cannot ${action} ${type}. Name field input is too long. AFFINITY_GROUP_NAME_INVALID=Cannot ${action} ${type}. Name field is invalid. -- To view, visit http://gerrit.ovirt.org/25413 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id25f864970df7e7f420f760fa8e8c78c1104d64e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches