cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-8759) Destroying VPC router results in a new unusable VPC router
Date Sat, 05 Sep 2015 09:44:46 GMT

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

ASF subversion and git services commented on CLOUDSTACK-8759:
-------------------------------------------------------------

Commit b6e212f2c73e8bcc87ae44cc0be76cce7c5213f2 in cloudstack's branch refs/heads/master from
[~remibergsma]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=b6e212f ]

Merge pull request #773 from ekholabs/fix/vpc_nic-CLOUDSTACK-8759

CLOUDSTACK-8759 - Destroying VPC router results in a new unusable VPC routerHow to reproduce
the problem:

1. Stop/Destroy the VPC router
2. Add a virtual machine to one of the VPC tier - it will trigger a VPC router creation
3. Router is created, but the NICs are not configured

How to recover without this fix:
1. Stop/destroy the VPC router and restart the VPC

Side effects: private gateways could be misconfigured.

Root cause:

In the VpcNetworkHelperImpl.configureDefaultNics() method, the guest network nic was added
in the map prior to the control and public NICs. The order in the map should not matter, however
in the LibvirtComputingResource.createVifs() method, there is a logic that relies on the device
index - the array index - in order to create the  control nic. I advise a refactor on the
data model in order to be able to identify the NIC type instead of relying in the array index.

An integration test was added to cover the fix:
* test_vpc_router_nics.py

Environment:
Management Server running on CentOS 7.1
KVM host running on CentOS 7.1
CloudStack Agent/Common 4.6.0-SNAPSHOT

Executing the test:

```
nosetests --with-marvin --marvin-config=/data/shared/marvin/mct-zone2-kvm2-ISOLATED.cfg -s
-a tags=advanced,required_hardware=true component/test_vpc_router_nics.py
```

Remark: during the SSH there might be stack traces on the console due to the connection retry.
It takes some time to get the PF rules in place and reach the VMs. So, just let the test run
until the end.

```
Test results:

Create a vpc with two networks with two vms in each network ... === TestName: test_01_VPC_nics_after_destroy
| Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 1 test in 774.020s

OK
/tmp//MarvinLogs/test_vpc_router_nics_VH6E9S/results.txt (END)
```

* pr/773:
  CLOUDSTACK-8759 - Fix guets nic allocation
  CLOUDSTACK-8759 - Adding a marvin test in order to cover the fix
  CLOUDSTACK-8759 - The guest nic has to be added after the control nic

Signed-off-by: Remi Bergsma <github@remi.nl>


> Destroying VPC router results in a new unusable VPC router
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-8759
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8759
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.6.0
>         Environment: ACS master/4.6 with XenServer and KVM tested
>            Reporter: Remi Bergsma
>            Assignee: Wilder Rodrigues
>            Priority: Critical
>             Fix For: 4.6.0
>
>
> Deploy VPC
> Deploy VM
> This all works fine
> Shutdown, then destroy VPC
> Expected result:
> A new VPC router is deployed that has the same functionality than before, but with a
new router instance ID.
> Experienced result:
> VPC router is unaccessible for CloudStack due to missing link-local interface:
> root@r-7-VM:~# ifconfig -a
> lo        Link encap:Local Loopback  
>           inet addr:127.0.0.1  Mask:255.0.0.0
>           UP LOOPBACK RUNNING  MTU:16436  Metric:1
>           RX packets:1 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:0 
>           RX bytes:93 (93.0 B)  TX bytes:93 (93.0 B)
> From a first look, the command line info seems OK.
> root@r-7-VM:/etc/cloudstack# cat cmdline.json 
> {
>     "config": {
>         "baremetalnotificationapikey": "pPgegDQwez17eCbRj4Wx8IwFs543rcPpF7Gavvtys_D7w1jnAoyJ4A-21H9Bf58s1ZjC4DTVrD0BHxNA3y7agA",

>         "baremetalnotificationsecuritykey": "Sxv0QbIgRTH-PkeDWBsY-GYsKz2WIz9JIyWTK16mNnIPPZ-Ozo940_8d8bSEx5pHZ4rEdxG5HQMRRcchANHuHg",

>         "disable_rp_filter": "true", 
>         "dns1": "8.8.8.8", 
>         "domain": "cs2cloud", 
>         "eth1ip": "169.254.0.249", 
>         "eth1mask": "255.255.0.0", 
>         "host": "192.168.22.61", 
>         "name": "r-7-VM", 
>         "port": "8080", 
>         "redundant_router": "false", 
>         "template": "domP", 
>         "type": "vpcrouter", 
>         "vpccidr": "10.0.1.0/24"
>     }, 
>     "id": "cmdline"
> [~wilder.rodrigues] Let's have a look when you're back!



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

Mime
View raw message