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

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

rafaelweingartner commented on a change in pull request #2455: 
CLOUDSTACK-10292:Hostname in metadata when using external DNS is inco…
URL: https://github.com/apache/cloudstack/pull/2455#discussion_r169939634
 
 

 ##########
 File path: 
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
 ##########
 @@ -2526,7 +2526,7 @@ private void orchestrateMigrateWithStorage(final String 
vmUuid, final long srcHo
                     final String zoneName = 
_dcDao.findById(vm.getDataCenterId()).getName();
                     boolean isWindows = 
_guestOSCategoryDao.findById(_guestOSDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows");
 
-                    vmData = 
_networkModel.generateVmData(userVm.getUserData(), serviceOffering, zoneName, 
vm.getInstanceName(), vm.getId(),
+                    vmData = 
_networkModel.generateVmData(userVm.getUserData(), serviceOffering, zoneName, 
vm.getInstanceName(), vm.getHostName(), vm.getId(),
 
 Review comment:
   @mrunalinikankariya you want to send the name set by the user for the given 
VM, right? They are the parameters "displayname" and "name" that the user can 
enter when deploying a VM. 
   
   Even though this "hostName" contains that parameter "name", I get the 
feeling that it is not the right one to use. It looks like an inconsistent sent 
of value that can and should be fixed in the future. If you look into the VM's 
POJO, we have hostId and hostName; for sanity, I would consider them the same 
thing. Therefore, hostId is the id of the host where the VM is running, and the 
hostName is the name of the host where the VM is running.
   
   Therefore, I believe you should use "displayName" or "name" attributes 
instead of the "hostName".

----------------------------------------------------------------
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:
us...@infra.apache.org


> Hostname in metadata when using external DNS is incorrect
> ---------------------------------------------------------
>
>                 Key: CLOUDSTACK-10292
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10292
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: mrunalini
>            Priority: Major
>
> In the current implementation, both the local-hostname and instance-id in the 
> metadata are pointing to same thing when VM is deployed in a network with 
> Network Offering that has no services. 
> The metadata for the VM is presented in configdrive.iso for a VM having 
> network with network offering that has no services. However the metadata 
> doesn't have any info around the name of the VM user has passed when 
> deploying the VM, instead the local_hostname.txt in the metadata refers to VM 
> internal name "i-12-254-VM" doesn't it needs to be the name of the VM user 
> has passed when creating the VM?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to