Martin Peřina has uploaded a new change for review. Change subject: core: Remove empty Vds hostname condition ......................................................................
core: Remove empty Vds hostname condition Removes condition which test if Vds hostname is empty. But hostname cannot be empty, as there is no way how to install or communicate with empty hostname host. Change-Id: I639e9aea7ddbe9c6952a05d1077bbaf06930adcc Signed-off-by: Martin Perina <mper...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java 1 file changed, 2 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/88/35088/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java index 207331c..28347b2 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ChangeVDSClusterCommand.java @@ -328,9 +328,6 @@ // are unpredictable. Hence locking the cluster to ensure the sync job does not lead to race // condition. try (EngineLock lock = GlusterUtil.getInstance().acquireGlusterLockWait(sourceClusterId)) { - String hostName = - (getVds().getHostName().isEmpty()) ? getVds().getManagementIp() - : getVds().getHostName(); VDS runningHostInSourceCluster = getClusterUtils().getUpServer(sourceClusterId); if (runningHostInSourceCluster == null) { log.error("Cannot remove host from source cluster, no host in Up status found in source cluster"); @@ -342,7 +339,7 @@ runVdsCommand( VDSCommandType.RemoveGlusterServer, new RemoveGlusterServerVDSParameters(runningHostInSourceCluster.getId(), - hostName, + getVds().getHostName(), false)); if (!returnValue.getSucceeded()) { handleVdsError(returnValue); @@ -358,9 +355,6 @@ // are unpredictable. Hence locking the cluster to ensure the sync job does not lead to race // condition. try (EngineLock lock = GlusterUtil.getInstance().acquireGlusterLockWait(targetClusterId)) { - String hostName = - (getVds().getHostName().isEmpty()) ? getVds().getManagementIp() - : getVds().getHostName(); VDS runningHostInTargetCluster = getClusterUtils().getUpServer(targetClusterId); if (runningHostInTargetCluster == null) { log.error("Cannot add host to target cluster, no host in Up status found in target cluster"); @@ -372,7 +366,7 @@ runVdsCommand( VDSCommandType.AddGlusterServer, new AddGlusterServerVDSParameters(runningHostInTargetCluster.getId(), - hostName)); + getVds().getHostName())); if (!returnValue.getSucceeded()) { handleVdsError(returnValue); errorType = AuditLogType.GLUSTER_SERVER_ADD_FAILED; -- To view, visit http://gerrit.ovirt.org/35088 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I639e9aea7ddbe9c6952a05d1077bbaf06930adcc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches