29089 Commits

Author SHA1 Message Date
Abhinandan Prateek
ccd0f22061 CLOUDSTACK-9161: fix the quota marvin test
1. Create a dummy user, as existing user may already have stale quota
  data
  2. fix the tests to use the dummy user
  3. a boundary condition was revealed and fixed for a new user where
  quota service has never run and created bootstrap entries

Quota Marvin: If the quota plugin is not enabled skip tests

Quota Service: Enable quota plugin in zone setup configuration

Quota: Moving test_quota.py the test to test/integration/plugins
    In most automated environment this test case will not run as it
    requires a mangement server restart to enable the plugin. Due to
    this requirement moving it to plugin folder. This condition is
    already documented in the test case.
2015-12-16 16:22:31 +05:30
Daan Hoogland
94a14485f7 license 2015-12-14 17:39:06 +01:00
Boris Schrijver
a00fef8c33 Revert "Merge pull request #1243 from SudharmaJain/cs-9166"
This reverts commit 8d2e031a89f5b7c55e1d139b0d8d57d6b9163aff, reversing
changes made to 1b3a792b1211a670234b8e6a505e18cafcabe38a.

No 2x LGTM where given to this PR.
2015-12-14 16:49:11 +01:00
Daan Hoogland
8d2e031a89 Merge pull request #1243 from SudharmaJain/cs-9166
CLOUDSTACK-9166:Build failed in Jenkins: cloudstack-rat-master #7038With my last PR#1196, I missed to place the license disclaimer into CitrixHelperTest.java. Updated the file with the disclaimer.

* pr/1243:
  CLOUDSTACK-9166:Build failed in Jenkins: cloudstack-rat-master #7038

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-14 12:51:03 +01:00
Daan Hoogland
1b3a792b12 Merge pull request #1216 from maneesha-p/BUG-9103
CLOUDSTACK-9103 : Missing OS Mappings for VMware 6.0Added suitable db entries in tables hypervisor_capabilities and guest_os_hypervisor to support VMware 6.0 by copying from 5.5 and excluding few depricated guest os.And also added entries for guest os RHEL 7 for vmware 5.5 and 6.0.

* pr/1216:
  CLOUDSTACK-9103 : Missing OS Mappings for VMware 6.0

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-14 12:49:55 +01:00
SudharmaJain
601f2dba24 CLOUDSTACK-9166:Build failed in Jenkins: cloudstack-rat-master #7038 2015-12-14 17:13:54 +05:30
Daan Hoogland
2478414d47 Merge pull request #1196 from SudharmaJain/cs-9127
CLOUDSTACK-9127 Missing PV-bootloader-args for "SUSE Linux Enterprise Server 10 SP2 and SP3"

ISSUE
--------
STOP-START of SUSE Linux VMs fail, as PV-bootloader-args are missing during the start command.
DESCRIPTION
----------------------
Repro steps
1. Upload Suse ISO
2. Create a VM with this ISO, and install it.
3. Detach ISO from the VM.
4. Reboot the VM, :>>>> This will work fine, as the pv-bootloader-args are not missing during reboot.
5.Stop the VM from CCP(VM will get destroyed in Xencenter)
6. Start the same VM from CCP , it will try to start but will fail.

Before Applying the fix
--------------------------------
Before applying the starting the VM failed with following exception
com.cloud.utils.exception.CloudRuntimeException: Unable to start VM(i-2-6-VM) on host(7cfd6388-b763-4c09-b3a3-9679db2904a3) due to Task failed! Task record:                 uuid: 21a6799f-9523-7c0e-bb86-1de750a38d74
           nameLabel: Async.VM.start_on
     nameDescription:
   allowedOperations: []
   currentOperations: {}
             created: Wed Dec 09 07:00:29 UTC 2015
            finished: Wed Dec 09 07:00:31 UTC 2015
              status: failure
          residentOn: com.xensource.xenapi.Host@513d238c
            progress: 1.0
                type: <none/>
              result:
           errorInfo: [BOOTLOADER_FAILED, OpaqueRef:0b10b6ac-837d-29af-da9d-6ef1e11a064a, Unable to find partition containing kernel
]
         otherConfig: {}
           subtaskOf: com.xensource.xenapi.Task@aaf13f6f
            subtasks: []

![image](https://cloud.githubusercontent.com/assets/12229259/11678758/bd0fc9aa-9e70-11e5-9687-c77bfecaa4dd.png)

After Applying the fix
--------------------------
After applying the fix I am able to start the vm.
![image](https://cloud.githubusercontent.com/assets/12229259/11678938/6d44f5b0-9e72-11e5-83b0-60a736408b4d.png)

* pr/1196:
  CLOUDSTACK-9127 Missing PV-bootloader-args for "SUSE Linux Enterprise Server 10 SP2 and SP3"

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-14 11:39:32 +01:00
Maneesha.P
626052128b CLOUDSTACK-9103 : Missing OS Mappings for VMware 6.0 2015-12-14 15:30:46 +05:30
SudharmaJain
9ae3c0a5a9 CLOUDSTACK-9127 Missing PV-bootloader-args for "SUSE Linux Enterprise Server 10 SP2 and SP3"
Added Unit test for the new method
2015-12-14 11:26:45 +05:30
Remi Bergsma
7c83e1b240 Merge pull request #1205 from shapeblue/master-9126
QUOTA: Ensuring that the dates displayed are as per user expectations    When querying db we use start of next day to query quota usage for
    today, but while displaying it to user we still need to show it as
    todays date

* pr/1205:
  QUOTA: Ensuring that the dates displayed are as per user expectations

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 21:08:10 +01:00
Remi Bergsma
c1533a1918 Merge pull request #1239 from remibergsma/fix-debian-changelog
build_asf.sh: fix debian changelog alteringThe script already adds a new entry so we shouldn't replace the
previous one. That is done only in the next version script.

As discussed with @DaanHoogland

* pr/1239:
  build_asf.sh: fix debian changelog altering

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 20:47:51 +01:00
Remi Bergsma
97b5e12704 build_asf.sh: fix debian changelog altering
The script already adds a new entry so we shouldn't replace the
previous one. That is done only in the next version script.
2015-12-13 20:41:56 +01:00
Remi Bergsma
7c9a8c1740 Merge pull request #1234 from shapeblue/master-9153
CLOUDSTACK-9153: When negative credits are added to an account theWhen negative credits are added to an account the balance credits can become negative for that account. This will fix will lock the account if quota is enforced.

* pr/1234:
  CLOUDSTACK-9153: When negative credits are added to an account the balance credits can become negative for that account. This will fix will lock the account if quota is enforced.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 20:03:59 +01:00
Remi Bergsma
9862b2c780 Merge pull request #1217 from milamberspace/L10N-update-before-4.7.0RC1
L10N update before 4.7.0 RC1Some sentences (mainly for the new quota plugin) needs to be translated before the 4.7.0 release candidate (planned for 14th december)
https://www.transifex.com/ke4qqq/CloudStack_UI/47xmessagesproperties/

Stats:
German (Germany)            100%
French (France)             100%
Portuguese (Brazil)          98%
Norwegian Bokml (Norway)    98%
Dutch (Netherlands)          98%
Chinese (China)              97%
Japanese (Japan)             97%
Hungarian                    96%
(only languages over 90%)

Ping me after adding the L10N strings into transifex, I will update this PR.

Thanks

cc @remibergsma @agneya2001 @DaanHoogland @nvazquez @barunhalder1234 @K0zka

* pr/1217:
  Update L10N resource files with 4.7 strings from Transifex (20151211)

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 19:41:44 +01:00
Daan Hoogland
50c20dab17 Merge release branch 4.6 to master
* 4.6:
  CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count
2015-12-13 19:04:22 +01:00
Daan Hoogland
5774b965f3 Merge pull request #1209 from ustcweizhou/free-deviceid
CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count
when we restart vpc tiers, the old nics will be removed, and create a new nic.
however, the device_id was set to the nic count, which may be already used.
this commit get the first device_id not in use as the device_id of new nic.

This issue also happen when we add multiple networks to a vm and remove them.

* pr/1209:
  CLOUDSTACK-9134: set device_id as the first device_id not in use instead of nic count

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-13 18:43:30 +01:00
Remi Bergsma
08a1b11c11 Merge release branch 4.6 to master
* 4.6:
  CLOUDSTACK-9155 make sure logrotate is effective
2015-12-13 14:31:24 +01:00
Remi Bergsma
d7b7171870 Merge pull request #1235 from remibergsma/fix-passwd-server-logging
CLOUDSTACK-9155 make sure logrotate is effective for cloud.logMany processes on the VRs log to cloud.log. When log rotate kicks in, the file is rotated but the scripts still write to the old inode (cloud.log.1 after rotate). Tis quickly fills up the tiny log partition.

Using 'copytruncate' is a small tradeoff, there is a slight change of missing a log entry, but in the old situation nothing ended up in cloud.log after rotate (except for stuff that was (re)started) so I think this is the best solution until we properly rewrite the script to either use their own script or syslog.

More details: https://issues.apache.org/jira/browse/CLOUDSTACK-9155

* pr/1235:
  CLOUDSTACK-9155 make sure logrotate is effective

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 14:30:07 +01:00
Remi Bergsma
636efa2da3 CLOUDSTACK-9155 make sure logrotate is effective
Many processes on the VRs log to cloud.log. When logrotate
kicks in, the file is rotated but the scripts still write
to the old inode (cloud.log.1 after rotate). Tis quickly
fills up the tiny log partition.

Using 'copytruncate' is a tradeoff, there is a slight
change of missing a log entry, but in the old situation
we were missing all of them after logrotate.
2015-12-13 12:07:20 +01:00
Abhinandan Prateek
5025011d31 CLOUDSTACK-9153: When negative credits are added to an account the
balance credits can become negative for that account. This will fix will
lock the account if quota is enforced.
2015-12-13 09:28:02 +05:30
Remi Bergsma
90cea824e7 Merge release branch 4.6 to master
* 4.6:
  CLOUDSTACK-9151 - Removes the replacement of the VRID in the CsRedundant file
2015-12-13 00:14:21 +01:00
Remi Bergsma
fcccaaad3f Merge pull request #1231 from ekholabs/fix/vrid-rvpc-CLOUDSTACK-9151
CLOUDSTACK-9151 - As a Developer I want the VRID to be set within the limits of KeepaliveDThis PR fixes a blocker issue!

   - Just like with RVRs, use the VRID 51 instead of making it dependent on the VPCID
   - Reason: arbitary unique number 0..255 used to differentiate multiple instances of vrrpd running on the same NIC (and hence same socket). virtual_router_id 51

* pr/1231:
  CLOUDSTACK-9151 - Removes the replacement of the VRID in the CsRedundant file

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 00:13:37 +01:00
Remi Bergsma
a0ce671c6b Merge branch '4.6'
* 4.6:
  Implement 4.6.1 -> 4.6.2 upgrade path
2015-12-13 00:10:10 +01:00
Remi Bergsma
a7b098ff16 Implement 4.6.1 -> 4.6.2 upgrade path 2015-12-13 00:06:02 +01:00
Daan Hoogland
03ea65a3b7 Mark pom changes in branch '4.6' as merged 2015-12-12 23:24:40 +01:00
Daan Hoogland
1063508003 Merge pull request #1186 from remibergsma/462_version
Updating pom.xml version numbers for release 4.6.2-SNAPSHOTSet next version in 4.6 release branch to version 4.6.2-SNAPSHOT.

Using ` ./tools/build/setnextversion.sh`.

Ping @bhaisaab @DaanHoogland before we merge this, how will we be creating the upgrade paths from 4.6.2 to 4.7? After this PR is merged, we need to manually do a fwd-merge and make sure we keep the pom versions in master/4.7. Much like in #1071.

* pr/1186:
  Fixed typo in iam/pom.xml
  Updating pom.xml version numbers for release 4.6.2-SNAPSHOT

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-12 23:17:19 +01:00
Remi Bergsma
f032c72213 Merge pull request #1233 from DaanHoogland/master-4.6.1
4.6.2 -> 4.7.0 upgrade does not use any scripts above 4.6.1test build:

```
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:45 min
[INFO] Finished at: 2015-12-12T22:15:56+01:00
[INFO] Final Memory: 121M/914M
[INFO] ------------------------------------------------------------------------
 ~/cloudstack/cloudstack [master-4.6.1 21| 18]
```

* pr/1233:
  4.6.2 -> 4.7.0 upgrade does not use any scripts above 4.6.1

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 22:54:43 +01:00
Remi Bergsma
1a463a1478 Merge pull request #1229 from borisroman/CLOUDSTACK-9150
CLOUDSTACK-9150: Remove docs/.tx/configThe config file docs/.tx/config has been replaced with tools/transifex/.tx/config. It's not maintained or used so it must be removed.

Builds ok:
```
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:51.685s
[INFO] Finished at: Sat Dec 12 15:23:38 CET 2015
[INFO] Final Memory: 102M/780M
[INFO] ------------------------------------------------------------------------
```
Running integration tests now! Ping @wido @wilderrodrigues @remibergsma @miguelaferreira

* pr/1229:
  Remove docs/.tx/config The config file docs/.tx/config has been replaced with tools/transifex/.tx/config. It's not maintained or used so it must be removed.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 22:44:38 +01:00
Remi Bergsma
cdfcea3da2 Merge release branch 4.6 to master
* 4.6:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
2015-12-12 22:29:19 +01:00
Remi Bergsma
c456eeb959 Fixed typo in iam/pom.xml 2015-12-12 21:51:48 +01:00
Daan Hoogland
22a5621476 4.6.2 -> 4.7.0 upgrade does not use any scripts above 4.6.1 2015-12-12 21:51:14 +01:00
Remi Bergsma
5147dec4ff Updating pom.xml version numbers for release 4.6.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 21:49:37 +01:00
Remi Bergsma
e7030285a2 Merge pull request #1219 from DaanHoogland/CLOUDSTACK-9139
CLOUDSTACK-9139 make zwps default when defined on zone levelWhen a marvin definition contains a primary storage definition at zone level it will default to zone scope. A test run is underway.
using marvin config:
```
{
    "zones": [
        {
            "name": "MCCT-SHARED-1",
            "guestcidraddress": "10.1.1.0/24",
            "dns1": "8.8.8.8",
            "physical_networks": [
                {
                    "broadcastdomainrange": "Zone",
                    "vlan": "100-200",
                    "name": "mcct-pnet",
                    "traffictypes": [
                        {
                            "typ": "Guest"
                        },
                        {
                            "typ": "Management"
                        },
                        {
                            "typ": "Public"
                        }
                    ],
                    "providers": [
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "VirtualRouter"
                        },
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "VpcVirtualRouter"
                        },
                        {
                            "broadcastdomainrange": "ZONE",
                            "name": "InternalLbVm"
                        }
                    ],
                    "isolationmethods": [
                             "VLAN"
                    ]
                }
            ],
            "ipranges": [
                {
                    "startip": "192.168.23.2",
                    "endip": "192.168.23.20",
                    "netmask": "255.255.255.0",
                    "vlan": "50",
                    "gateway": "192.168.23.1"
                }
            ],
            "networktype": "Advanced",
            "pods": [
                {
                    "endip": "192.168.22.150",
                    "name": "MCCT-POD",
                    "startip": "192.168.22.130",
                    "netmask": "255.255.255.0",
                    "clusters": [
                    ],
                    "clusters": [
                        {
                            "clustername": "MCCT-KVM-1",
                            "hypervisor": "KVM",
                            "hosts": [
                                {
                                    "username": "root",
                                    "url": "http://kvm1",
                                    "password": "password"
                                },
                                {
                                    "username": "root",
                                    "url": "http://kvm2",
                                    "password": "password"
                                }
                            ],
                            "clustertype": "CloudManaged"
                        }
                    ],
                    "gateway": "192.168.22.1"
                }
            ],
            "internaldns1": "8.8.4.4",
            "secondaryStorages": [
                {
                    "url": "nfs://192.168.22.1:/data/storage/secondary/MCCT-SHARED-1",
                    "provider" : "NFS"
                }
            ],
            "primaryStorages": [
                {
                    "url": "nfs://192.168.22.1:/data/storage/primary/MCCT-KVM-1",
                    "name": "MCCT-KVM-1-primary",
                    "hypervisor": "kvm"
                }
            ]
        }
    ],
    "dbSvr": {
        "dbSvr": "localhost",
        "passwd": "cloud",
        "db": "cloud",
        "port": 3306,
        "user": "cloud"
    },
    "logger":
        {
            "LogFolderPath": "/tmp/"
        },
    "globalConfig": [
        {
            "name": "network.gc.wait",
            "value": "60"
        },
        {
            "name": "storage.cleanup.interval",
            "value": "300"
        },
        {
            "name": "vm.op.wait.interval",
            "value": "5"
        },
        {
            "name": "default.page.size",
            "value": "10000"
        },
        {
            "name": "network.gc.interval",
            "value": "60"
        },
        {
            "name": "workers",
            "value": "10"
        },
        {
            "name": "account.cleanup.interval",
            "value": "600"
        },
        {
            "name": "guest.domain.suffix",
            "value": "cloud"
        },
        {
            "name": "expunge.delay",
            "value": "60"
        },
        {
            "name": "vm.allocation.algorithm",
            "value": "firstfitleastconsumed"
        },
        {
            "name": "expunge.interval",
            "value": "60"
        },
        {
            "name": "expunge.workers",
            "value": "3"
        },
        {
            "name": "check.pod.cidrs",
            "value": "true"
        },
        {
            "name": "secstorage.allowed.internal.sites",
            "value": "192.168.22.0/24"
        },
        {
            "name": "direct.agent.load.size",
            "value": "1000"
        }
    ],
    "mgtSvr": [
        {
            "mgtSvrIp": "localhost",
            "passwd": "password",
            "user": "root",
            "port": 8096,
            "hypervisor": "KVM",
            "useHttps": "False",
            "certCAPath":  "NA",
            "certPath":  "NA"
        }
    ]
}
```
deploys succesful:
```
Deploy data center..

==== Log Folder Path: /tmp//MarvinLogs//DeployDataCenter__Dec_11_2015_16_27_55_AM5LVR. All logs will be available here ====

==== Deploy DC Started ====

=== Data Center Settings are dumped to /tmp//MarvinLogs//DeployDataCenter__Dec_11_2015_16_27_55_AM5LVR/dc_entries.obj===

====Deploy DC Successful=====
Fri Dec 11 16:32:02 GMT 2015
```

![screen shot 2015-12-11 at 17 37 12](https://cloud.githubusercontent.com/assets/2486961/11749410/e7d99db4-a02d-11e5-9a5b-e5d554a45945.png)

* pr/1219:
  CLOUDSTACK-9139 make zwps default when defined on zone level

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 21:02:08 +01:00
Milamber
6947afee3a Update L10N resource files with 4.7 strings from Transifex (20151211) 2015-12-12 18:57:10 +00:00
Wilder Rodrigues
2bebb7f8a3 CLOUDSTACK-9151 - Removes the replacement of the VRID in the CsRedundant file
- Just like with RVRs, use the VRID 51 instead of making it dependent on the VPCID
   - Reason: arbitary unique number 0..255 used to differentiate multiple instances of vrrpd running on the same NIC (and hence same socket). virtual_router_id 51
2015-12-12 16:26:00 +01:00
Boris Schrijver
27e23fb11c Remove docs/.tx/config
The config file docs/.tx/config has been replaced with tools/transifex/.tx/config. It's not maintained or used so it must be removed.
2015-12-12 15:13:48 +01:00
Remi Bergsma
1597a4c749 Merge pull request #1211 from ustcweizhou/delete-acl-items
[UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal usersOnly the owner or domain admin/admin can access the page (vpc->Network ACL Lists), they are also able to remove the network ACL lists, which is not allowed on UI.

* pr/1211:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 14:40:17 +01:00
Daan Hoogland
8c78f89c91 Merge pull request #1132 from shapeblue/4.6-vmware-diskcontrollers
[4.6] CLOUDSTACK-4787 - vmware diskcontrollersSame as #1131 (see this for screenshots etc)

* pr/1132:
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-12 14:38:28 +01:00
Remi Bergsma
bdaa60fd6c Merge release branch 4.6 to master
* 4.6:
  Show actual diff in commits after merge
  CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats
2015-12-12 14:03:43 +01:00
Remi Bergsma
65bf2edfa1 Merge pull request #1182 from ustcweizhou/CLOUDSTACK-9113-getVmStats
[4.6] CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStatson KVM, if there is a vm has inconsistent state between hypervisor and db, the getVmStat will terminate and return null, all vm stats will not be updated.
we should skip the vm which has inconsistent state, and continue on others.

* pr/1182:
  CLOUDSTACK-9113: skip vm with inconsistent state when getVmStats/getVmDiskStats

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 13:58:49 +01:00
Remi Bergsma
61ebb53e17 Merge pull request #1227 from remibergsma/git-pr-show-commits
Show actual diff in commits after merge with git-pr / git-fwd-mergeThis shows the diff in commits after using `git-pr` and `git-fwd-merge` tools, like this:

```
44e8c92 Merge pull request #1226 from borisroman/CLOUDSTACK-9148
0554610 Removed .pydevproject from plugin kvm hypervisor.
```

That helps in quickly seeing what change is applied and whether it makes sense. It doesn't touch the actual code base. I'm using this patch for some time already.

* pr/1227:
  Show actual diff in commits after merge

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 13:55:20 +01:00
Remi Bergsma
7fa62a5765 Merge pull request #1221 from ekholabs/improve/test-internal-lb-CLOUDSTACK-9135
CLOUDSTACK-9135 - As a Developer I want the test_internal_lb.py to test Redundant VPCsThis PR refactors the existing tests and adds tests to cover internal LB with Redundant VPCs.

In order to make it possible I had to change the base.py, allowing multiple providers per service. This change requires the changes in the Java side which were dealt with PR #1215 .

* pr/1221:
  CLOUDSTACK-9135 - Makes test compliant with Redundant VPCs
  CLOUDSTACK-9135 - Makes possible to add multiple providers per service
  CLOUDSTACK-9135 - Moves test into smoke directory

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 11:29:29 +01:00
Remi Bergsma
52edbbb6cc Show actual diff in commits after merge 2015-12-12 11:22:32 +01:00
Remi Bergsma
2071a9e395 Merge pull request #1222 from ekholabs/fix/rvr-ha-CLOUDSTACK-4374
CLOUDSTACK-4374 - As a Developer I want to have HA enabled for routers that are part or a redundant network or VPCThis PR fixes the issue we were facing with crashed redundant routers not being picked up by the HA monitor due to an IF statement in the code.

* Redundant Routers are not the same as Haigh Available. Having a router HA is actually saying that the given router will be controlled by the High Availability monitor. Hence fix any problem we might face.

* pr/1222:
  CLOUDSTACK-4374 - Adds HA capabilities to redundant routers

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 09:53:00 +01:00
Remi Bergsma
66d7f413e8 Merge pull request #1188 from kansal/CLOUDSTACK-9086
CLOUDSTACK-9086: ACS allows to create isolated networks with invalide gateway IP address - Fixed and Test cases added

Problem: There was no check for the network and broadcast IP addresses in the case where we provide the gateway and netmask while creating the isolated network. As a result the provided IP gets assigned to the eth0 interface of the VR.

Note: This is in continuation of PR #1125 which I closed.

* pr/1188:
  CLOUDSTACK-9086: ACS allows to create isolated networks with invalide gateway IP address - Fixed and Test cases added

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 09:37:06 +01:00
Remi Bergsma
879b6da4ed Merge pull request #1192 from shapeblue/master-9122
CLOUDSTACK-9122:  latest credit entries should be incorporated when thefuture credit entries should be incorporated when the balance is calculated

1. Some code is refactored so that unit tests (TODO in future) are more comprehensive
2. The fix is to incorporate the credit entries on line 228.

https://issues.apache.org/jira/browse/CLOUDSTACK-9122

* pr/1192:
  CLOUDSTACK-9122: latest credit entries should be incorporated when the balance is calculated

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-12 09:33:54 +01:00
Remi Bergsma
6be2cc78c7 Merge pull request #1215 from ekholabs/improve/mult-providers-CLOUDSTACK-9138
CLOUDSTACK-9138 - Adds multiple providers back to VPC implementation   - It is need and already allowed/used in the current implementation. For example, the Default [redundant] VPC offerings use two LB providers. If we cannot create offerings with 2 LB providers, the whole internal loadbalancer implementation won't work.

* pr/1215:
  CLOUDSTACK-9138 - Adds multiple providers back to VPC implementation

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-11 19:45:15 +01:00
Remi Bergsma
c9985e96a5 Merge pull request #1214 from remibergsma/rfc1918_route
CLOUDSTACK-9143 Setup routes for RFC 1918 ip spaceSetup general route for RFC 1918 space, as otherwise it will be sent to the public gateway and likely to be dropped (internet providers do not route ip space that is meant for internal use). More specific routes that may be set have preference over this generic routes so this works even with private ranges used for public ip space (as shown below).

When using an internal DNS server some hosts may resolve to an RFC 1918 ip address. The SSVM has a default gw to public so if it has no route for this ip address space, it will not work. This PR makes generic RFC 1918 (so all internal ip adresses like 10.0.0.10 etc) to the local management gateway. This makes them reachable. Without this fix, it is sent upstream and it is dropped there.

Should there be a more generic route (smaller prefix), this has preference over the generic routes.

Example in my dev environment:

```
root@v-1-VM:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.23.1    0.0.0.0         UG    0      0        0 eth2
10.0.0.0        192.168.22.1    255.0.0.0       UG    0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
172.16.0.0      192.168.22.1    255.240.0.0     UG    0      0        0 eth1
192.168.0.0     192.168.22.1    255.255.0.0     UG    0      0        0 eth1
192.168.22.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.23.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
```

Route `192.168.0.0/16` goes via `eth1` but `192.168.23.0/24` is more specific and has preference and goes via `eth2`. It works:

```
root@v-1-VM:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 48 data bytes
56 bytes from 8.8.8.8: icmp_seq=0 ttl=49 time=7.179 ms
^C--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 7.179/7.179/7.179/0.000 ms
```

This solves a lot of the 'internal resolving' issues we face.

When the public ip address is RFC1918 itself, we do not set the routes.

* pr/1214:
  Setup routes for RFC 1918 ip space

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-11 19:42:36 +01:00
Remi Bergsma
1ed5c20908 Merge pull request #1197 from ustcweizhou/vpc-router-by-keyword
[4.7] CLOUDSTACK-9129: list vpc routers by keyword in Infrastructure -> Virtual Routers
and two more changes:
(1) add network name/vpc name in the listRouters response
(2) add network name/vpc id, vpc name in the router details page

* pr/1197:
  CLOUDSTACK-9129: list vpc routers by keyword in Infrastructure -> Virtual Routers

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-11 17:14:43 +01:00
Wilder Rodrigues
43ce049d43 CLOUDSTACK-9135 - Makes test compliant with Redundant VPCs 2015-12-11 15:03:50 +01:00