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

Murali Reddy updated CLOUDSTACK-9598:
-------------------------------------
    Description: 
When a guest instance is created with nic's in a isolated network and a shared 
network (with just DHCP and DNS), with isolated network as default network, 
DHCP lease on shared network from the shared network VR has wrong gateway. 
gateway is pointed to the virtual router IP. 

/etc/cloudstack/dhcpentry.json in shared network VR will have default gateway 
set to 0.0.0.0

root@r-11-VM:~# cat /etc/cloudstack/dhcpentry.json
{
    "10.6.9.165": {
        "default_entry": false,
        "default_gateway": "0.0.0.0",
        "dns_adresses": "10.1.1.1",
        "host_name": "VM-fce34d73-dc99-4559-b077-64711509907a",
        "ipv4_adress": "10.6.9.165",
        "ipv6_duid": "00:03:00:01:06:5a:da:00:00:6a",
        "mac_address": "06:5a:da:00:00:6a",
        "type": "dhcpentry"
    },
    "id": "dhcpentry"

DhcpCommand network element command sent from the management server is like 
below with "defaultRouter":"0.0.0.0"

2016-11-15 19:15:29,319 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-25:ctx-a9aca0bb job-69/job-70 ctx-82c3fd7e) (logid:6ca37cdb) 
Seq 2-4650811040190170578: Sending  { Cmd , MgmtId: 7150818625286, via: 
2(trl-202-k-cs49-mreddy-kvm2), Ver: v1, Flags: 100011, 
[{"com.cloud.agent.api.routing.DhcpEntryCommand":{"vmMac":"06:5a:da:00:00:6a","vmIpAddress":"10.6.9.165","vmName":"VM-fce34d73-dc99-4559-b077-64711509907a","defaultRouter":"0.0.0.0","defaultDns":"10.1.1.1","duid":"00:03:00:01:06:5a:da:00:00:6a","isDefault":false,"executeInSequence":false,"accessDetails":{"zone.network.type":"Advanced","router.guest.ip":"10.6.9.164","router.ip":"169.254.2.18","router.name":"r-11-VM"},"wait":0}}]
 }

NIC details in the DB for the nic in the shared network has correct gateway.

Gateway is set to 0.0.0.0, for every non-default nic [1]

In case where shared network is non default network, then guest VM will end up 
treating VR in the shared network as gateway instead of actual shared network 
gateway.

[1] 
https://github.com/apache/cloudstack/blob/4.9/server/src/com/cloud/network/router/CommandSetupHelper.java#L224


  was:
When a guest instance is created with nic's in a isolated network and a shared 
network (with just DHCP and DNS), with isolated network as default network, 
DHCP lease on shared network from the shared network VR has wrong gateway. 
gateway is pointed to the virtual router IP. 

/etc/cloudstack/dhcpentry.json in shared network VR will have default gateway 
set to 0.0.0.0

root@r-11-VM:~# cat /etc/cloudstack/dhcpentry.json
{
    "10.6.9.165": {
        "default_entry": false,
        "default_gateway": "0.0.0.0",
        "dns_adresses": "10.1.1.1",
        "host_name": "VM-fce34d73-dc99-4559-b077-64711509907a",
        "ipv4_adress": "10.6.9.165",
        "ipv6_duid": "00:03:00:01:06:5a:da:00:00:6a",
        "mac_address": "06:5a:da:00:00:6a",
        "type": "dhcpentry"
    },
    "id": "dhcpentry"

DhcpCommand network element command sent from the management server is like 
below with "defaultRouter":"0.0.0.0"

2016-11-15 19:15:29,319 DEBUG [c.c.a.t.Request] 
(Work-Job-Executor-25:ctx-a9aca0bb job-69/job-70 ctx-82c3fd7e) (logid:6ca37cdb) 
Seq 2-4650811040190170578: Sending  { Cmd , MgmtId: 7150818625286, via: 
2(trl-202-k-cs49-mreddy-kvm2), Ver: v1, Flags: 100011, 
[{"com.cloud.agent.api.routing.DhcpEntryCommand":{"vmMac":"06:5a:da:00:00:6a","vmIpAddress":"10.6.9.165","vmName":"VM-fce34d73-dc99-4559-b077-64711509907a","defaultRouter":"0.0.0.0","defaultDns":"10.1.1.1","duid":"00:03:00:01:06:5a:da:00:00:6a","isDefault":false,"executeInSequence":false,"accessDetails":{"zone.network.type":"Advanced","router.guest.ip":"10.6.9.164","router.ip":"169.254.2.18","router.name":"r-11-VM"},"wait":0}}]
 }

NIC details in the DB for the nic in the shared network has correct gateway.

Gateway is set to 0.0.0.0, for every non-default nic.

In case where shared network is non default network, then guest VM will end up 
treating VR in the shared network as gateway instead of actual shared network 
gateway.

[1] 
https://github.com/apache/cloudstack/blob/4.9/server/src/com/cloud/network/router/CommandSetupHelper.java#L224



> wrong defaut gateway in guest VM with nics in isolated and a shared network
> ---------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9598
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9598
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.9.0
>            Reporter: Murali Reddy
>             Fix For: 4.10.0.0, 4.9.1.0
>
>
> When a guest instance is created with nic's in a isolated network and a 
> shared network (with just DHCP and DNS), with isolated network as default 
> network, DHCP lease on shared network from the shared network VR has wrong 
> gateway. gateway is pointed to the virtual router IP. 
> /etc/cloudstack/dhcpentry.json in shared network VR will have default gateway 
> set to 0.0.0.0
> root@r-11-VM:~# cat /etc/cloudstack/dhcpentry.json
> {
>     "10.6.9.165": {
>         "default_entry": false,
>         "default_gateway": "0.0.0.0",
>         "dns_adresses": "10.1.1.1",
>         "host_name": "VM-fce34d73-dc99-4559-b077-64711509907a",
>         "ipv4_adress": "10.6.9.165",
>         "ipv6_duid": "00:03:00:01:06:5a:da:00:00:6a",
>         "mac_address": "06:5a:da:00:00:6a",
>         "type": "dhcpentry"
>     },
>     "id": "dhcpentry"
> DhcpCommand network element command sent from the management server is like 
> below with "defaultRouter":"0.0.0.0"
> 2016-11-15 19:15:29,319 DEBUG [c.c.a.t.Request] 
> (Work-Job-Executor-25:ctx-a9aca0bb job-69/job-70 ctx-82c3fd7e) 
> (logid:6ca37cdb) Seq 2-4650811040190170578: Sending  { Cmd , MgmtId: 
> 7150818625286, via: 2(trl-202-k-cs49-mreddy-kvm2), Ver: v1, Flags: 100011, 
> [{"com.cloud.agent.api.routing.DhcpEntryCommand":{"vmMac":"06:5a:da:00:00:6a","vmIpAddress":"10.6.9.165","vmName":"VM-fce34d73-dc99-4559-b077-64711509907a","defaultRouter":"0.0.0.0","defaultDns":"10.1.1.1","duid":"00:03:00:01:06:5a:da:00:00:6a","isDefault":false,"executeInSequence":false,"accessDetails":{"zone.network.type":"Advanced","router.guest.ip":"10.6.9.164","router.ip":"169.254.2.18","router.name":"r-11-VM"},"wait":0}}]
>  }
> NIC details in the DB for the nic in the shared network has correct gateway.
> Gateway is set to 0.0.0.0, for every non-default nic [1]
> In case where shared network is non default network, then guest VM will end 
> up treating VR in the shared network as gateway instead of actual shared 
> network gateway.
> [1] 
> https://github.com/apache/cloudstack/blob/4.9/server/src/com/cloud/network/router/CommandSetupHelper.java#L224



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to