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

Sangeetha Hariharan reopened CLOUDSTACK-1670:
---------------------------------------------


Reopening this issue:

Tested with lastet build from 4.2

When Vm is deployed as part of 2 networks , I see that the eth0 is assigned the 
ip address from the default network and eth1 is assigned ip address from the 
other network.

But the default ip route on the guest network points to eth1 resulting in the 
Vm being accessible only using the ip address from non default network.


2013-08-22 12:21:19,894 DEBUG [cloud.async.AsyncJobManagerImpl] 
(catalina-exec-4:null) submit async job-70 = [ dd097
e44-ec95-4b76-8aae-b38e15feaed5 ], details: AsyncJobVO {id:70, userId: 2, 
accountId: 2, sessionKey: null, instanceTy
pe: VirtualMachine, instanceId: 19, cmd: 
org.apache.cloudstack.api.command.user.vm.DeployVMCmd, cmdOriginator: null,
 cmdInfo: 
{"sessionkey":"2UEaejk88SxhubAPtEjWg1thtrI\u003d","cmdEventType":"VM.CREATE","ctxUserId":"2","serviceOffer
ingId":"29e35c24-4a75-4baa-90ef-4a956e3e127e","httpmethod":"GET","zoneId":"c37437f4-f118-4d9c-a985-c5f0d30960dd","te
mplateId":"d1b39274-09df-11e3-8a04-069ab0000706","response":"json","id":"19","networkIds":"bb85b12e-9e85-4eb6-94ff-1
cf430bed902,49b593c5-f73e-44d0-aa58-61ad2763ed0f","hypervisor":"KVM","name":"dual-yello","_":"1377199703658","ctxAcc
ountId":"2","ctxStartEventId":"257","displayname":"dual-yello"}, cmdVersion: 0, 
callbackType: 0, callbackAddress: null, status: 0, processStatus: 0, 
resultCode: 0, result: null, initMsid: 7261447522054, completeMsid: null, 
lastUpdated: null, lastPolled: null, created: null}


mysql> select * from networks where  id in (208,209);
+-----+-------------+--------------------------------------+--------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+-------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+
| id  | name        | uuid                                 | display_text | 
traffic_type | broadcast_domain_type | broadcast_uri | gateway        | cidr    
          | mode | network_offering_id | physical_network_id | data_center_id | 
guru_name         | state | related | domain_id | account_id | dns1 | dns2 | 
guru_data | set_fields | acl_type | network_domain | reservation_id | 
guest_type | restart_required | created             | removed | 
specify_ip_ranges | vpc_id | ip6_gateway | ip6_cidr | network_cidr | 
display_network | network_acl_id |
+-----+-------------+--------------------------------------+--------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+-------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+
| 208 | test-1-1361 | 49b593c5-f73e-44d0-aa58-61ad2763ed0f | test-1-1361  | 
Guest        | Vlan                  | vlan://1361   | 10.223.136.65  | 
10.223.136.64/26  | Dhcp |                   7 |                 200 |          
    1 | DirectNetworkGuru | Setup |     208 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Domain   | test           | NULL           | 
Shared     |                0 | 2013-08-22 19:09:12 | NULL    |                 
1 |   NULL | NULL        | NULL     | NULL         |               1 |          
 NULL |
| 209 | 1363-1      | bb85b12e-9e85-4eb6-94ff-1cf430bed902 | 1363-1       | 
Guest        | Vlan                  | vlan://1363   | 10.223.136.193 | 
10.223.136.192/26 | Dhcp |                   7 |                 200 |          
    1 | DirectNetworkGuru | Setup |     209 |         1 |          1 | NULL | 
NULL | NULL      |          0 | Domain   | yep            | NULL           | 
Shared     |                0 | 2013-08-22 19:13:39 | NULL    |                 
1 |   NULL | NULL        | NULL     | NULL         |               1 |          
 NULL |
+-----+-------------+--------------------------------------+--------------+--------------+-----------------------+---------------+----------------+-------------------+------+---------------------+---------------------+----------------+-------------------+-------+---------+-----------+------------+------+------+-----------+------------+----------+----------------+----------------+------------+------------------+---------------------+---------+-------------------+--------+-------------+----------+--------------+-----------------+----------------+
2 rows in set (0.00 sec)

2013-08-22 12:21:24,266 DEBUG [agent.transport.Request] (Job-Executor-6:job-70 
= [ dd097e44-ec95-4b76-8aae-b38e15fea
ed5 ]) Seq 1-1209860503: Sending  { Cmd , MgmtId: 7261447522054, via: 1, Ver: 
v1, Flags: 100011, [{"com.cloud.agent.
api.StartCommand":{"vm":{"id":19,"name":"i-2-19-VM","type":"User","cpus":1,"minSpeed":120,"maxSpeed":120,"minRam":13
0023424,"maxRam":130023424,"arch":"x86_64","os":"CentOS 5.5 
(64-bit)","bootArgs":"","rebootOnCrash":false,"enableHA"
:false,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"3387e9e7376b433b","params":{},"uuid":"b6f
b9035-f89c-4a3e-9da1-4771949d7b0a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"c8e6
3655-7046-4d6a-bcee-6ebabbc87a40","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStor
eTO":{"uuid":"1909df7f-7f11-3d62-a691-bd29aa830a40","id":1,"poolType":"NetworkFilesystem","host":"10.223.110.232","p
ath":"/export/home/sangeetha/42-ipv6/primary","port":2049}},"name":"ROOT-19","size":8589934592,"path":"a04d90ec-1e7c
-4e6f-bf55-84e2ebc62b28","volumeId":23,"vmName":"i-2-19-VM","accountId":2,"format":"QCOW2","id":23,"hypervisorType":
"KVM"}},"diskSeq":0,"type":"ROOT"},{"data":{"org.apache.cloudstack.storage.to.TemplateObjectTO":{"id":0,"format":"IS
O","accountId":0,"hvm":false}},"diskSeq":3,"type":"ISO"}],"nics":[{"deviceId":0,"networkRateMbps":200,"defaultNic":t
rue,"uuid":"69bbace7-fe5e-4ea4-995f-cafa74043182","ip":"10.223.136.202","netmask":"255.255.255.192","gateway":"10.22
3.136.193","mac":"06:2a:64:00:00:3b","dns1":"72.52.126.11","dns2":"72.52.126.12","broadcastType":"Vlan","type":"Gues
t","broadcastUri":"vlan://1363","isolationUri":"vlan://1363","isSecurityGroupEnabled":false},{"deviceId":1,"networkR
ateMbps":200,"defaultNic":false,"uuid":"d70fdadc-9ddc-41dd-9687-f3dd852c5d1f","ip":"10.223.136.72","netmask":"255.25
5.255.192","gateway":"10.223.136.65","mac":"06:2d:8e:00:00:35","dns1":"72.52.126.11","dns2":"72.52.126.12","broadcas
tType":"Vlan","type":"Guest","broadcastUri":"vlan://1361","isolationUri":"vlan://1361","isSecurityGroupEnabled":fals
e}]},"hostIp":"10.223.57.194","executeInSequence":false,"wait":0}}] }


 
[root@dual-yello ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 06:2A:64:00:00:3B
          inet addr:10.223.136.202  Bcast:10.223.136.255  Mask:255.255.255.192
          inet6 addr: fc00:3:1363:0:42a:64ff:fe00:3b/64 Scope:Global
          inet6 addr: fe80::42a:64ff:fe00:3b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:54 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7131 (6.9 KiB)  TX bytes:5756 (5.6 KiB)

eth1      Link encap:Ethernet  HWaddr 06:2D:8E:00:00:35
          inet addr:10.223.136.72  Bcast:10.223.136.127  Mask:255.255.255.192
          inet6 addr: fe80::42d:8eff:fe00:35/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13706 (13.3 KiB)  TX bytes:13518 (13.2 KiB)

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:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:796 (796.0 b)  TX bytes:796 (796.0 b)

[root@dual-yello ~]# ip route
10.223.136.192/26 dev eth0  proto kernel  scope link  src 10.223.136.202
10.223.136.64/26 dev eth1  proto kernel  scope link  src 10.223.136.72
169.254.0.0/16 dev eth1  scope link
default via 10.223.136.65 dev eth1
[root@dual-yello ~]#


                
> 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

Reply via email to