Venkata Siva Vijayendra Bhamidipati created CLOUDSTACK-2867: ---------------------------------------------------------------
Summary: Cannot add multiple vmware zones in vCenter Key: CLOUDSTACK-2867 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2867 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: Management Server Affects Versions: 4.2.0 Environment: VMWare cloudstack deployment. Reporter: Venkata Siva Vijayendra Bhamidipati Create a datacenter in vmware, say dc1, add a cluster to it, say cluster1, add one or more hosts to cluster1. Add a zone in cloudstack, and provide dc1/cluster1 info for it. It'll go through fine. Next, create dc2, cluster2 in vCenter with new host(s). Attempt to add a new zone in cloudstack providing dc2/cluster2 info. It will fail with the following exception: INFO [cloud.configuration.ConfigurationManagerImpl] (94321089@qtp-1454176402-24:) adding a new subnet to the network 209 WARN [admin.zone.AddVmwareDcCmd] (1538955034@qtp-1454176402-23:) Exception: com.cloud.exception.ResourceInUseException: This DC is already part of other CloudStack zone(s). Cannot add this DC to more zones. at com.cloud.hypervisor.vmware.manager.VmwareManagerImpl.addVmwareDatacenter(VmwareManagerImpl.java:952) at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) at org.apache.cloudstack.api.command.admin.zone.AddVmwareDcCmd.execute(AddVmwareDcCmd.java:97) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155) at com.cloud.api.ApiServer.queueCommand(ApiServer.java:528) at com.cloud.api.ApiServer.handleRequest(ApiServer.java:371) at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:304) at com.cloud.api.ApiServlet.doGet(ApiServlet.java:66) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) INFO [cloud.api.ApiServer] (1538955034@qtp-1454176402-23:) This DC is already part of other CloudStack zone(s). Cannot add this DC to more zones. INFO [vmware.resource.VmwareResource] (DirectAgent-100:10.223.74.132) Executing resource NetworkUsageCommand It looks like the CustomFieldDef[] cloud.zone key is getting defined globally for all DCs. So once it's set to true, it's probably getting read as true for new DCs as well. Or probably it's just that we're reading it wrongly in the mgmt server (doesn't look like that's the case though). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira