-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
ISSUE TYPE
- Bug Report
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.18
CONFIGURATION
A new installation without any zones
OS / ENVIRONMENT
Oracle Linux Server 8.8
mysql Ver 8.0.30
vSphere 6.7
SUMMARY
An error "Something went wrong; please correct the following: Unable to add the external cluster" when I try to add new zone with VMware hypervisor.

I think the main reason of this error is wrong processing cluster, pod, zone names which I enter in the ACS UI.
In this case my vSphere cluster is named "lab-cluster-1", datacenter name is "Lab-DC1".
When I add in ACS zone with name "z1" I fill "Clusert name" record in UI as "lab-cluster-1" I get the error:
2023-05-25 16:35:13,412 ERROR [c.c.h.v.VmwareServerDiscoverer] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Unable to find host or cluster based on url: /Lab-DC1/Cluster-z1
STEPS TO REPRODUCE
Install CloudStack 4.18, deploy vSphere 6.7, try to add a vmware-zone in the UI ACS.
EXPECTED RESULTS
New zone added without any errors.
ACTUAL RESULTS
Full error message from log file:
2023-05-25 16:35:13,410 ERROR [c.c.h.v.u.VmwareContext] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Path element points to an un-existing inventory entity
2023-05-25 16:35:13,411 ERROR [c.c.h.v.m.VmwareManagerImpl] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Unable to find host from inventory path: /Lab-DC1/Cluster-z1
2023-05-25 16:35:13,412 INFO [c.c.h.v.VmwareServerDiscoverer] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Found 0 hosts.
2023-05-25 16:35:13,412 ERROR [c.c.h.v.VmwareServerDiscoverer] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Unable to find host or cluster based on url: /Lab-DC1/Cluster-z1
2023-05-25 16:35:13,412 INFO [c.c.h.v.u.VmwareContext] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Disconnecting VMware session
2023-05-25 16:35:13,420 WARN [c.c.r.ResourceManagerImpl] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Unable to find the server resources at http://vcsa67.lab/Lab-DC1/Cluster-z1
2023-05-25 16:35:13,420 INFO [c.c.u.e.CSExceptionErrorCode] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Could not find exception: com.cloud.exception.DiscoveryException in error code list fo
r exceptions
2023-05-25 16:35:13,477 WARN [o.a.c.a.c.a.c.AddClusterCmd] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Exception:
com.cloud.exception.DiscoveryException: Unable to add the external cluster
at com.cloud.resource.ResourceManagerImpl.discoverCluster(ResourceManagerImpl.java:588)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy199.discoverCluster(Unknown Source)
at org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd.execute(AddClusterCmd.java:212)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:163)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:777)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:601)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:347)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:154)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:151)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:105)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
2023-05-25 16:35:13,479 INFO [c.c.a.ApiServer] (qtp649329985-20:ctx-3035123f ctx-1802f527) (logid:02ad0493) Unable to add the external cluster