Remove inaccurate console proxy check
Resolves
@@ -7,7 +7,6 @@ import org.zstack.core.Platform;
import org.zstack.core.ansible.AnsibleFacade;
import org.zstack.core.cloudbus.CloudBus;
import org.zstack.core.db.DatabaseFacade;
-import org.zstack.core.db.Q;
import org.zstack.core.db.SimpleQuery;
import org.zstack.core.db.SimpleQuery.Op;
import org.zstack.core.errorcode.ErrorFacade;
@@ -32,12 +31,12 @@ import org.zstack.header.vm.VmInstanceVO;
import org.zstack.utils.Utils;
import org.zstack.utils.logging.CLogger;
-import static org.zstack.core.Platform.operr;
-
import javax.persistence.TypedQuery;
import java.util.List;
import java.util.Map;
+import static org.zstack.core.Platform.operr;
+
/**
* Created with IntelliJ IDEA.
* User: frank
@@ -72,12 +71,6 @@ public abstract class AbstractConsoleProxyBackend implements ConsoleBackend, Com
proxy.establishProxy(session, vm, new ReturnValueCompletion<ConsoleProxyInventory>(complete) {
@Override
public void success(ConsoleProxyInventory ret) {
- if (Q.New(ConsoleProxyVO.class).eq(ConsoleProxyVO_.targetHostname, ret.getTargetHostname())
- .eq(ConsoleProxyVO_.targetPort, ret.getTargetPort()).isExists()) {
- complete.fail(operr("There is already a console proxy connection with %s:%s", ret.getTargetHostname(), ret.getTargetPort()));
- return;
- }
-
ConsoleProxyVO vo = new ConsoleProxyVO();
vo.setAgentIp(ret.getAgentIp());
vo.setProxyIdentity(ret.getProxyIdentity());
