[
https://issues.apache.org/jira/browse/CLOUDSTACK-5098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13844137#comment-13844137
]
Sateesh Chodapuneedi commented on CLOUDSTACK-5098:
--------------------------------------------------
>UI has this criterion because listVmwareDcs API is only available in non-oss
>build, but not oss-build.
>And there is no way to tell whether management server is running in an oss
>build or non-oss build.
>If UI calls listVmwareDcs API in an oss build, an error “this API doesn’t
>exist” will throw (which a lot of people complaint annoying and confusing).
>That’s why I made zone detail page to check whether the zone has a VMware
>cluster first.
>UI has this criterion because listVmwareDcs API is only available in non-oss
>build, but not oss-build.
Yes, currently we are depending on listClusters response to see if there is a
cluster of VMware hypervisor, and if TRUE then call listVmwareDcs. This is to
ensure we are invoking the API listVmwareDcs only for nonoss build based
cloudstack setup.
>And there is no way to tell whether management server is running in an oss
>build or non-oss build.
listApis API can help here. This API with specific API name as parameter
returns list of APIs with that name for specific user. For following URL in
example, we see 1 api along with its details as response. May be we can "count"
field there.
Ex:
URL - http://MS:8096/?command=listApis&user=admin&name=listVmwareDcs
Response -
<listapisresponse cloud-stack-version="4.2.1">
<count>1</count>
<api>
<name>listVmwareDcs</name>
<description>Retrieves VMware DC(s) associated with a zone.</description>
<isasync>false</isasync>
<related/><params><name>keyword</name><description>List by
keyword</description><type>string</type><length>255</length><required>false</required></params><params><name>zoneid</name><description>Id
of the CloudStack
zone.</description><type>uuid</type><length>255</length><required>true</required><related/></params><params><name>page</name><description/><type>integer</type><length>255</length><required>false</required></params><params><name>pagesize</name><description/><type>integer</type><length>255</length><required>false</required></params><response><name>id</name><description>The
VMware Datacenter
ID</description><type>string</type></response><response><name>name</name><description>The
VMware Datacenter
name</description><type>string</type></response><response><name>vcenter</name><description>The
VMware vCenter
name/ip</description><type>string</type></response><response><name>zoneid</name>
<description>the Zone ID associated with this VMware Datacenter</description
><type>long</type>
</response>
</api>
</listapisresponse>
> [UI] Zone view is showing "Add VMware Datacenter" button even though zone is
> already associated with a data center
> ------------------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5098
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5098
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: API
> Affects Versions: 4.2.1
> Reporter: Sailaja Mada
> Assignee: Jessica Wang
> Priority: Critical
> Fix For: 4.3.0
>
> Attachments: apilog.log, management-server.log
>
>
> Steps:
> 1. Enable Nexus flag at the global level
> 2. Tried to configure the Adv zone with VMWARE hypervisor with out specifying
> Nexus vSwitch details while adding the cluster.
> With this Cluster addition failed . So i have cancelled the zone
> configuration.
> Now tried below steps:
> 1) Removed Pod and then tried to remove zone . It failed saying "The zone is
> not deletable because there are VMware datacenters associated with this zone.
> Remove VMware DC from this zone."
> 2) There is no Remove DC option , When i go to Zone details in the UI
> Observation:
> 1) Entries in vmware_data_center and vmware_data_center_zone_map are not
> cleaned up when there is a failure to add the cluster
> 2) So with this issue when i try to add the cluster , it is failing saying
> "This data center is already part of other Cloudstack Zone"
> So when there is a failure to add cluster for any reason , we should remove
> the addDC association in the DB aswell.
> I did delete the rows from vmware_data_center and vmware_data_center_zone_map
> , Then i was able to reuse the Datacenter
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)