[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16314759#comment-16314759
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9730:
--------------------------------------------

rhtyd commented on a change in pull request #1891: CLOUDSTACK-9730: [VMware] 
Unable to add a host with space in its name to existing VMware cluster
URL: https://github.com/apache/cloudstack/pull/1891#discussion_r160030725
 
 

 ##########
 File path: 
plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
 ##########
 @@ -151,16 +151,8 @@ public VmwareServerDiscoverer() {
                 clusterDetails.put("password", password);
                 _clusterDetailsDao.persist(clusterId, clusterDetails);
             }
-            String updatedInventoryPath = validateCluster(url, vmwareDc);
-            try {
-                if (!URLDecoder.decode(url.getPath(), 
"UTF-8").equals(updatedInventoryPath)) {
-                    // If url from API doesn't specify DC then update url in 
database with DC associated with this zone.
-                    clusterDetails.put("url", url.getScheme() + "://" + 
url.getHost() + updatedInventoryPath);
-                    _clusterDetailsDao.persist(clusterId, clusterDetails);
 
 Review comment:
   @sureshanaparti could not persisting the url in the cluster details cause 
regression?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [VMware] Unable to add a host with space in its name to existing VMware 
> cluster
> -------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9730
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9730
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: VMware
>            Reporter: Suresh Kumar Anaparti
>            Assignee: Suresh Kumar Anaparti
>             Fix For: 4.10.1.0
>
>
> ISSUE
> ==================
> Unable to add a host with space in the name to existing VMware cluster.
> While adding host, CloudStack tries to persist the validated inventory url 
> path in database, which inserts encoded url into database which means 
> whitespace would be stored as '+' symbols. Url from API parameter string is 
> being converted to URI object as part of validation, where the url path is 
> getting encoded.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to