You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Sheng Yang (JIRA)" <ji...@apache.org> on 2013/07/17 01:06:49 UTC

[jira] [Commented] (CLOUDSTACK-1670) When Vm is part of 2 networks say N1(default) and N2 , the ip address from N1 is being assigned to eth1.

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

Sheng Yang commented on CLOUDSTACK-1670:
----------------------------------------

It's broken by: 

commit 94e8090bf344717191c72c27b2a794ce197c10ff
Author: Prachi Damle <pr...@cloud.com>
Date:   Tue Jan 15 23:08:00 2013 -0800

    Deploy, Start, Stop, Destroy VM orchestration service changes

Which change the original (sorted) List of networkUuidList in UserVmManagerImpl.java to a (unsorted) networkNicMap.

diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index bf3da4c..b6042a1 100644
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java

-
-        List<String> networkUuidList = new ArrayList<String>();
+       
+        Map<String, NicProfile> networkNicMap = new HashMap<String, NicProfile>();
 
         short defaultNetworkNumber = 0;
         boolean securityGroupEnabled = false;
@@ -2948,7 +2956,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
                 vpcNetwork = true;
             }
 
-            networkUuidList.add(network.getUuid());
+            networkNicMap.put(network.getUuid(), profile);
         }
 
Would fix it soon.
                
> When Vm is part of 2 networks say N1(default) and N2  , the ip address from N1 is being assigned to eth1. 
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1670
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1670
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.1.0, 4.2.0
>         Environment: Build from 4.1
>            Reporter: Sangeetha Hariharan
>            Assignee: Sheng Yang
>             Fix For: 4.2.0
>
>
> Steps to reproduce the problem:
> Create a shared network N1.
> Create a shared network N2.
> Deploy a Vm as part of 2 networks.
> In case of Vm being part of 2 networks say N1(default) and N2  , should we always expect the ip address from N1 to be always assigned to eth0?
> Right now , I see that ip address from N1 gets assigned to eth1.
> 2013-03-09 02:12:40,235 DEBUG [agent.transport.Request] (Job-Executor-16:job-21) Seq 1-1264910416: Sending  { Cmd , MgmtId: 206915885080248, vi
> a: 1, Ver: v1, Flags: 100111, [{"StartCommand":{"vm":{"id":7,"name":"i-7-7-VM","type":"User","cpus":1,"speed":100,"minRam":130023424,"maxRam":1
> 30023424,"arch":"x86_64","os":"Other Ubuntu (64-bit)","bootArgs":"","rebootOnCrash":false,"enableHA":false,"limitCpuUse":false,"vncPassword":"5
> b3f249e969026a0","params":{},"uuid":"dac7f26a-7cdc-4cb9-9d76-e1057937858f","disks":[{"id":7,"name":"/export/home/sangeetha/asf41-1/primary","mo
> untPoint":"5cc4a65b-0589-4d8b-956e-d378ca08d1c2","path":"5cc4a65b-0589-4d8b-956e-d378ca08d1c2","size":21474836480,"type":"ROOT","storagePoolTyp
> e":"NetworkFilesystem","storagePoolUuid":"d6693bf1-9c36-365a-899a-815cd052a870","deviceId":0},{"id":7,"name":"ubuntu","size":0,"type":"ISO","st
> oragePoolType":"ISO","deviceId":3}],"nics":[{"deviceId":1,"networkRateMbps":200,"defaultNic":true,"uuid":"06d0b0a5-623d-4a9c-a0cf-b9cb9cf434e0"
> ,"ip":"10.223.137.71","netmask":"255.255.255.192","gateway":"10.223.137.65","mac":"06:e4:c6:00:00:26","dns1":"72.52.126.11","dns2":"72.52.126.1
> 2","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://1371","isolationUri":"vlan://1371","isSecurityGroupEnabled":false},{"deviceId":
> 0,"networkRateMbps":200,"defaultNic":false,"uuid":"6f367589-e5eb-466e-a33b-c0bdc09902cb","ip":"10.223.137.7","netmask":"255.255.255.192","gatew
> ay":"10.223.137.1","mac":"06:26:32:00:00:13","dns1":"72.52.126.11","dns2":"72.52.126.12","broadcastType":"Vlan","type":"Guest","broadcastUri":"
> vlan://1370","isolationUri":"vlan://1370","isSecurityGroupEnabled":false}]},"hostIp":"10.223.56.194","wait":0}}] }
> sangeetha@ubuntu-123:~$ ifconfig
> eth0      Link encap:Ethernet  HWaddr 06:26:32:00:00:13
>           inet addr:10.223.137.7  Bcast:10.223.137.63  Mask:255.255.255.192
>           inet6 addr: fc00:3:1370:0:93d6:88c4:57f5:af0a/64 Scope:Global
>           inet6 addr: fe80::426:32ff:fe00:13/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:22 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:3275 (3.2 KB)  TX bytes:2931 (2.9 KB)
> eth1      Link encap:Ethernet  HWaddr 06:e4:c6:00:00:26
>           inet addr:10.223.137.71  Bcast:10.223.137.127  Mask:255.255.255.192
>           inet6 addr: fe80::4e4:c6ff:fe00:26/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:68 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:8854 (8.8 KB)  TX bytes:10917 (10.9 KB)
> lo        Link encap:Local Loopback
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           inet6 addr: ::1/128 Scope:Host
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0
>           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
> sangeetha@ubuntu-123:~$ ip route
> default via 10.223.137.65 dev eth1
> 10.223.137.0/26 dev eth0  proto kernel  scope link  src 10.223.137.7
> 10.223.137.64/26 dev eth1  proto kernel  scope link  src 10.223.137.71
> sangeetha@ubuntu-123:~$

--
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