[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jessica Wang reassigned CLOUDSTACK-5098:
----------------------------------------

    Assignee: Sateesh Chodapuneedi  (was: Jessica Wang)

Sateesh,

Sorry, I described it wrong earlier.

I read UI code again and found UI indeed does what you say.
i.e.
The criterion UI uses to determine whether to show "Add VMware dataceter" or 
"Hide VMware datacenter" is
whether listVmwareDcs response is an empty list or not.
If it's not an empty list, "Add VMware Datacenter" button will be hidden.

According to the API call you provided: 

http://10.102.192.116:8080/client/api?command=listVmwareDcs&response=json&zoneid=4380efdd-e0c8-4a60-b9b0-1a77d6ee62df
{ "listvmwaredcsresponse" : { "count":1 ,"VMwareDC" : [
{"id":"0f22310f-893a-4718-a997-aa6de51abf69","zoneid":1,"name":"dcdemo","vcenter":"10.102.192.248"}]
 } }

, "Add VMware Datacenter" button should be hidden on your UI.

I don't know why it's not hidden on your UI and I need to debug in your 
environment since I'm unable to reproduce this bug in my environment.

So, could you please provide:
(1) your URL
or
(2) a database dump (of 4.2 branch or 4.3 branch, please let me know which 
branch your database dump comes from) 
or
(3) all of 4 API calls fired by zone detail page (Infrastructure > Zones > 
zoneDetailPage):
e.g.
http://localhost:8080/client/api?command=listZones&response=json&sessionkey=XYaUyPqwZk7oxJT0vOuPvAvAwzQ%3D&id=cb6c6eed-286b-480d-b7b8-bb2eba491aad&_=1386364055057
{ "listzonesresponse" : { "count":1 ,"zone" : [  
{"id":"cb6c6eed-286b-480d-b7b8-bb2eba491aad","name":"jw-adv","dns1":"8.8.8.8","internaldns1":"10.223.110.254","guestcidraddress":"10.1.1.0/24","networktype":"Advanced","securitygroupsenabled":false,"allocationstate":"Enabled","zonetoken":"55f5aea4-7de1-3b7b-a57b-1a897635b257","dhcpprovider":"VirtualRouter","localstorageenabled":false,"tags":[]}
 ] } }

http://localhost:8080/client/api?command=listDedicatedZones&response=json&sessionkey=XYaUyPqwZk7oxJT0vOuPvAvAwzQ%3D&zoneid=cb6c6eed-286b-480d-b7b8-bb2eba491aad&_=1386364055128
{ "listdedicatedzonesresponse" : { } }

http://localhost:8080/client/api?command=listClusters&response=json&sessionkey=XYaUyPqwZk7oxJT0vOuPvAvAwzQ%3D&zoneid=cb6c6eed-286b-480d-b7b8-bb2eba491aad&_=1386364055148
{ "listclustersresponse" : { "count":1 ,"cluster" : [  
{"id":"4913c748-e4da-40ce-bc79-c4e7e4b8ed0e","name":"jw-xen","podid":"9d08bb1b-a728-46fe-b481-f9e79a097c91","podname":"pod1","zoneid":"cb6c6eed-286b-480d-b7b8-bb2eba491aad","zonename":"jw-adv","hypervisortype":"XenServer","clustertype":"CloudManaged","allocationstate":"Enabled","managedstate":"Managed","cpuovercommitratio":"1.0","memoryovercommitratio":"1.0"}
 ] } }

http://10.102.192.116:8080/client/api?command=listVmwareDcs&response=json&zoneid=4380efdd-e0c8-4a60-b9b0-1a77d6ee62df
{ "listvmwaredcsresponse" : { "count":1 ,"VMwareDC" : [
{"id":"0f22310f-893a-4718-a997-aa6de51abf69","zoneid":1,"name":"dcdemo","vcenter":"10.102.192.248"}]
 } }

thank you.

Jessica

> [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: Sateesh Chodapuneedi
>            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#6144)

Reply via email to