30371 Commits

Author SHA1 Message Date
Jayapal
1cff18fcfa CLOUDSTACK-9657: Fixed security group ipset issues with long vm name 2017-02-24 15:20:04 +05:30
Rajani Karuturi
987be62b2e Merge pull request #1926 from jayantpatil1234/CS-50157
CLOUDSTACK-9768: Time displayed for events in UI is incorrectTime displayed for events in UI is incorrect. Let's say, when we login using Japanese language the time displayed in the events is GMT instead of JST. However with English language the time is JST, as expected.
Example:
Time is displayed in the event is 10:40, if you are logged in using English language.
Whereas, time in the event shows 19:40 If you login with Japanese language.

* pr/1926:
  CLOUDSTACK-9768: Time displayed for events in UI is incorrect

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-21 05:57:10 +05:30
Rajani Karuturi
1d1b503dec Merge pull request #1924 from niteshsarda/CS-50213
CLOUDSTACK-9766 : Executing deleteSnapshot api with already deleted sIf we try to delete the snapshot which is already deleted, then no proper error appears in the log and it just try to delete the snapshot which is already deleted.

Steps to reproduce :
-------
1-create a snapshot
2-delete the snapshot
3-try to delete snapshot which is deleted in step 2

Expected Result
-------------
Result should show proper error message. Request for deleting already deleted snapshot should not be placed.

* pr/1924:
  CLOUDSTACK-9766 : Executing deleteSnapshot api with already deleted snapshot does not throw any exception or failure message

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-21 05:46:18 +05:30
Rajani Karuturi
3582c653f6 Merge pull request #1874 from Accelerite/RAvpn
CLOUDSTACK-9711: Fixed error reporting while adding vpn user
If configuring vpn user in one of the network fails the failure is ignored, failure should be shown in API response.

* pr/1874:
  CLOUDSTACK-9711: Fixed error reporting while adding vpn user

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-21 05:41:09 +05:30
Rajani Karuturi
74036d01c0 Merge pull request #1333 from nitin-maharana/CloudStack-Nitin16_4.7
CLOUDSTACK-9228: Network update with mistmatch in services require forced option# Steps to reproduce:

1.Bring up CloudStack in advanced zone
2.Create isolated network with sourcenat, pf, lb, firewall services
3.Deploy a VM in the above network
4.Create another network offering with sourcenat, pf, firewall services
5.Try to update the network with offering created in step4
# Result:

The new offering:DefaultIsolatedNetworkOfferingForVpcNetworksNoLB will remove the following services [Lb]along with all the related configuration currently in use. will not proceed with the network update.set forced parameter to true for forcing an update."
# Workaround:

Use api with forced=true
# Fix:

Added a confirmation dialog box to check whether to make force update or not.
The dialog appears only for the Admin. Only admin can make force update.
The new dialog appears after the first CIDR unchanged confirmation dialog.

* pr/1333:
  CLOUDSTACK-9228: Network update with mistmatch in services require forced option

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-20 17:27:47 +05:30
Rajani Karuturi
dafd3938f4 Merge pull request #1758 from nitin-maharana/CloudStack-Nitin-4.9
CLOUDSTACK-9588: Add Load Balancer functionality in Network page is Redundant.Steps to Reproduce:
Network -> Select any network -> Observe Add Load Balancer tab
The "Add Load Balancer" functionality is redundant.
The above is used to create LB rule without any public IP.

Resolution:
There exist similar functionality in Network -> Any Network -> Details Tab -> View IP Addresses -> Any public IP -> Configuration Tab -> Observe Load Balancing.
The above is used to create LB rule with a public IP. This is a more convenient way of creating LB rule as the IP is involved.

* pr/1758:
  CLOUDSTACK-9588: Add Load Balancer functionality in Network page is redundant. The "Add Load Balancer" functionality is redundant. The above is used to create LB rule without any public IP. This commit removes the tab from network page.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-20 17:23:20 +05:30
Rajani Karuturi
ca27394da1 Merge pull request #1786 from nitin-maharana/nitin5
CLOUDSTACK-9618: Load Balancer configuration page does not have "Source" method in the drop down list.If we create an isolated network with NetScaler published service offering for Load balancing service, then the load balancing configuration UI does not show "Source" as one of the supported LB methods in the drop down list. It only shows "Round-Robin" and "LeastConnection" methods in the list. However, It successfully creates LB rule with "Source" as the LB method using API.

* pr/1786:
  CLOUDSTACK-9618: Load Balancer configuration page does not have "Source" method in the drop down list

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-20 16:29:53 +05:30
Rajani Karuturi
248c3f72c7 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9691: Added test list_snapshots_with_removed_data_store
  CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when a primary store is deleted related to it
2017-02-20 16:28:15 +05:30
Jayapal
a3e6bce8e6 Revert "CLOUDSTACK-9711: Fixed error reporting while adding vpn user"
This reverts commit d7b792c3f91e8a3038d53a51fae700a158f92740.
2017-02-20 16:26:45 +05:30
Rajani Karuturi
e860249e4f Merge pull request #1847 from anshul1886/CLOUDSTACK-9691
CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when a primary store is deleted related to it@mike-tutkowski After support for snapshots on solidifire there are many places which are prone to these NullPointer exceptions resulting in various issues. Root cause for these issues is that we get the primary storage associated with snapshot and then figure out how to handle but if that store is deleted then it results in NullPointer exceptions. Without solidfire we don't need to access primary storage.

Should we handle that as issues are found or could there be other way to fix all of these issues?

* pr/1847:
  CLOUDSTACK-9691: Added test list_snapshots_with_removed_data_store
  CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when a primary store is deleted related to it

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-20 16:25:15 +05:30
Jayapal
d7b792c3f9 CLOUDSTACK-9711: Fixed error reporting while adding vpn user 2017-02-20 15:07:30 +05:30
Nicolas Vazquez
3caedb9ef3 CLOUDSTACK-9691: Added test list_snapshots_with_removed_data_store 2017-02-20 11:30:30 +05:30
Anshul Gangwar
2fd28f2bff CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when
a primary store is deleted related to it
2017-02-20 11:30:02 +05:30
Rajani Karuturi
8bd33d3db6 Merge pull request #1952 from sgoeminn/CLOUDSTACK-9790
CLOUDSTACK-9790: fix NPE in case of Basic zone.This PR fixes the creation of a basic zone.
https://issues.apache.org/jira/browse/CLOUDSTACK-9790

* pr/1952:
  CLOUDSTACK-9790: fix NPE in case of Basic zone.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-19 15:16:53 +05:30
Rajani Karuturi
d84347ba8c Merge pull request #1838 from anshul1886/CLOUDSTACK-9682
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If

the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.

* pr/1838:
  CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If the destination pool is in maintenance mode do not allow a volume to be migrated to the storage pool. Fixed it for volume migration and vm migration with volume.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-17 17:48:32 +05:30
Sigert Goeminne
a01f7e76c3 CLOUDSTACK-9790: fix NPE in case of Basic zone. 2017-02-17 11:05:58 +01:00
Rajani Karuturi
bf2f441211 Merge pull request #1913 from nvazquez/createVolumeOptimization
CLOUDSTACK-9752: [Vmware] Optimization of volume attachness to vm## Description

This optimization aims to reduce volume attach slowness due to vmdk files search on datastore before creating the volume (search for `.vmdk`, `-flat.vmdk` and `-delta.vmdk` files to delete them if they exist). This search is not necessary when attaching a volume in Allocated state, due to volume files don't exist on datastore.

On large datastores, this search can cause volume attachness to be really slow, as we can see in this log lines:

````
13-mgmt.log:2016-11-02 10:16:33,136 INFO  [vmware.mo.DatastoreMO] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Searching file 9ce7731fd38b4045afbb7ce9754abbc1.vmdk in [b5ebda046d613e079b5874b169cd848f]
13-mgmt.log:2016-11-02 10:19:42,567 WARN  [storage.resource.VmwareStorageLayoutHelper] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Unable to locate VMDK file: 9ce7731fd38b4045afbb7ce9754abbc1.vmdk
13-mgmt.log:2016-11-02 10:19:42,719 INFO  [vmware.mo.DatastoreMO] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Search file 9ce7731fd38b4045afbb7ce9754abbc1-flat.vmdk on [b5ebda046d613e079b5874b169cd848f]

13-mgmt.log:2016-11-02 10:19:44,399 INFO  [vmware.mo.DatastoreMO] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Searching file 9ce7731fd38b4045afbb7ce9754abbc1-flat.vmdk in [b5ebda046d613e079b5874b169cd848f]
13-mgmt.log:2016-11-02 10:22:07,581 WARN  [storage.resource.VmwareStorageLayoutHelper] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Unable to locate VMDK file: 9ce7731fd38b4045afbb7ce9754abbc1-flat.vmdk

13-mgmt.log:2016-11-02 10:22:07,731 INFO  [vmware.mo.DatastoreMO] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Search file 9ce7731fd38b4045afbb7ce9754abbc1-delta.vmdk on [b5ebda046d613e079b5874b169cd848f]
13-mgmt.log:2016-11-02 10:22:09,745 INFO  [vmware.mo.DatastoreMO] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Searching file 9ce7731fd38b4045afbb7ce9754abbc1-delta.vmdk in [b5ebda046d613e079b5874b169cd848f]
13-mgmt.log:2016-11-02 10:25:06,362 WARN  [storage.resource.VmwareStorageLayoutHelper] (DirectAgent-931:ctx-5687d68e uscrlpdcsesx240.ads.autodesk.com, job-8675314/job-8675315, cmd: CreateObjectCommand) Unable to locate VMDK file: 9ce7731fd38b4045afbb7ce9754abbc1-delta.vmdk
````

* pr/1913:
  CLOUDSTACK-9752: [Vmware] Optimization of volume attachness to vm

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-17 12:12:37 +05:30
Rajani Karuturi
12497d04bf Merge pull request #1727 from nvazquez/change-serv-offering
CLOUDSTACK-9539: Support changing Service offering for instance with VM Snapshots## Actual behaviour

CloudStack doesn't support changing service offering for vm instances which have vm snapshots, they should be removed before changing service offering.
## Goal

Extend actual behaviour by supporting changing service offering for vms which have vm snapshots. In that case, previously taken snapshots (if reverted) should use previous service offering, future snapshots should use the newest.
## Proposed solution:
1. Adding `service_offering_id` column on `vm_snapshots` table: This way snapshot can be reverted to original state even though service offering can be changed for vm instance.
   NOTE: Existing vm snapshots are populated on update script by:
   `UPDATE vm_snapshots s JOIN vm_instance v ON v.id = s.vm_id SET s.service_offering_id = v.service_offering_id;`
2. New vm snapshots will use instance vm service offering id as `service_offering_id`
3. Revert to vm snapshots should use vm snapshot's `service_offering_id` value.
## Example use case:
- Deploy vm using service offering A
- Take vm snapshot -> snap1 (service offering A)
- Stop vm
- Change vm service offering to B
- Revert to VM snapshot snap 1
- Start vm

It is expected that vm has service offering A after last step

* pr/1727:
  CLOUDSTACK-9539: Support changing Service offering for instance with VM Snapshots

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-17 12:08:26 +05:30
nvazquez
3a6d98289c CLOUDSTACK-9539: Support changing Service offering for instance with VM Snapshots 2017-02-16 10:49:09 -03:00
Rajani Karuturi
238046fdaa Merge pull request #1834 from Accelerite/CLOUDSTACK-9679
CLOUDSTACK-9679:Allow master user to manage subordinate user uploaded template

* pr/1834:
  CLOUDSTACK-9679:Allow master user to manage subordinate user uploaded template

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-16 15:43:41 +05:30
Rajani Karuturi
c3c9b8f38b Merge pull request #1747 from nvazquez/storageTags
CLOUDSTACK-9574: Redesign storage views## Part 1: Redesign storage tags
### Actual behavior

Primary storage tags are being saved as an entry on `storage_pool_details` with:
* name = TAG_NAME
* value = "true"

When a boolean property is defined in {{storage_pool_details}} and has value = "true", it is displayed as a tag.

![](https://issues.apache.org/jira/secure/attachment/12836196/PS-DETAILS.PNG "Screenshot 1 - Primary storage details")
![](https://issues.apache.org/jira/secure/attachment/12836195/PS.PNG "Screenshot 2 - Primary storage view")

### Goal

Redesign `Storage Tags` for Primary Storage view, to list only tags, as it is done in Host Tags (Hosts view).

## Part 2: Remove details from listImageStores API call response and UI

### Description
In Secondary Storage view we propose removing `Details` field, as `Setting` tab list details for a given image store. We also remove details from response on `listImageStores` API method

* pr/1747:
  CLOUDSTACK-9574: Redesign storage tags and remove details from listImageStores response and UI

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-16 12:30:15 +05:30
Rajani Karuturi
c09a9f322e Merge pull request #1833 from Accelerite/CLOUDSTACK-9678
BUG-ID:CLOUDSTACK-9678listNetworkOfferings API is listing all the offerings which has same prefix in their name

* pr/1833:
  BUG-ID:CLOUDSTACK-9678 listNetworkOfferings API is listing all the offerings which has same prefix in their name

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-16 11:39:31 +05:30
Rajani Karuturi
60fd7292da Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9655 The template which is registered in all zones will be deleted by deleting 1 template on any zone
2017-02-16 10:39:12 +05:30
Rajani Karuturi
6dced70aa8 Merge pull request #1818 from Accelerite/CLOUDSTACK-9655
CLOUDSTACK-9655 The template which is registered in all zones will be deleted by deleting 1 template on any zoneadded extra warning message if it's a cross-zone template ("This is a
cross zone template and will be deleted from all the zones. Are you sure
you want to proceed?").

* pr/1818:
  CLOUDSTACK-9655 The template which is registered in all zones will be deleted by deleting 1 template on any zone

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-16 10:38:35 +05:30
Rajani Karuturi
9d8eebf68d Merge pull request #1939 from Accelerite/CLOUDSTACK-8886
CLOUDSTACK-8886: Limitations is listUsageRecords output, listUsageRecAs @kansal  is inactive created new branch and raised the PR. This is continuation of PR #858
This closes #858

Problem: Only domainid is returned by usageReports API call. In cloudstack documention it mentions "domain" as being in the usage response. The API should really be returning the domain as account information has both account and accountid.

Fix: Missing setDomainName at the time of creating response.

* pr/1939:
  CLOUDSTACK-8886: Limitations is listUsageRecords output, listUsageRecords does not return domain - Fixed and tests added

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-15 10:37:50 +05:30
Nitin Kumar Maharana
3dc0eed71d CLOUDSTACK-9618: Load Balancer configuration page does not have "Source" method in the drop down list
Added the source method to supported algorithm list in Netscaler element.
Added a validation check.
2017-02-15 01:16:48 +05:30
Nitin Kumar Maharana
c1bc47c10b CLOUDSTACK-9228: Network update with mistmatch in services require forced option
Added a confirmation dialog box to check whether to make force update or not.
The dialog appears only for the Admin. Only admin can make force update.
The new dialog appears after the first CIDR unchanged confirmation dialog.
2017-02-15 01:09:59 +05:30
Nitin Kumar Maharana
5a5b453a14 CLOUDSTACK-9588: Add Load Balancer functionality in Network page is redundant.
The "Add Load Balancer" functionality is redundant.
The above is used to create LB rule without any public IP.
This commit removes the tab from network page.
2017-02-15 00:11:42 +05:30
Rajani Karuturi
13bfdd71e6 Merge pull request #1741 from swill/strongswanvpn
Updated StrongSwan VPN ImplementationThis PR is a merge of @jayapalu changes in #872 and the changes I had to make to get the functionality working.

I have done pretty extensive testing of this code so far and we are looking to be in pretty good shape.  One thing to note is that a `Diffie-Hellman` group **is required** in order for this feature to work correctly.  It is not highlighted in the tests below, but I have shown that the `PFS` is not required for this feature to work.  In #872 I have shown a more exhaustive set of tests of this code, but I have limited this set of tests to a recommended `IKE` and `ESP` configuration in order to reduce the noise and test the other areas of functionality.

**Test Results**
I am testing this functionality by creating two VPCs with VMs in each and creating a S2S VPN connection between the two VPCs. Then I SSH into a VM in one VPC and I ping the private IP of a VM in the other VPC. Then I tear it down and try a different configuration.

_Setup_

```
VPC 1                          VPC 2
=====                          =====
VPN Gateway                    VPN Gateway
VPN Customer Gateway           VPN Customer Gateway
VPN Connection        <--->    VPN Connection
 - Passive = True               - Passive = False
```

_Legend_
`SKIP` => At least one of the VPN Connections did not come up, so no test was run.
`OK` => The ping test was successful over the S2S VPN connection.
`FAIL` => The ping test failed over the S2S VPN connection.

`Passive` => Specifies if either the `<vpc_1> : <vpc_2>` sides of the VPN Connection is set to passive.
`Conn State` => Specifies the connection status of the `<vpc_1> : <vpc_2>` VPN Connection in the UI.
`Requires Reset` => If the ping test does not result in an `OK`, then a VPN Connection Reset is performed on either `<vpc_1> : <vpc_2>` sides of the VPN Connection based on which side is not showing `Connected`.  The results in the `Status` column is the final result after the reset is performed.

_Results_

```
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| Status | IKE & ESP            | DPD   | Encap | IKE Life | ESP Life | Passive       | Conn State                  | Requires Reset |
+========+======================+=======+=======+==========+==========+===============+=============================+================+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | True  | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False |          | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    |          | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False |          |          | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | False : False | Connected : Connected       | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | False : True  | Connected : Disconnected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | False : False | Connected : Connected       | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | False : True  | Connected : Disconnected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | True  | False | 86400    | 3600     | True : False  | Disconnected : Error        | True : False   |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | False | False | 86400    | 3600     | True : False  | Disconnected : Error        | True : False   |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| FAIL   | aes128-sha1          | True  | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | True : True    |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | True  | False | 86400    | 3600     | False : False | Connected : Error           | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
```

* pr/1741:
  complete implementation of the StrongSwan VPN feature

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-14 17:59:17 +05:30
Rajani Karuturi
2aeca0d34f Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%
2017-02-14 14:45:32 +05:30
Rajani Karuturi
abd7860e68 Merge pull request #873 from karuturi/CLOUDSTACK-8896
CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%This issue occurs when a volume in Ready state is moved across storage
pools.

While finding if the storage pool has enough space, it has a check to
consider the size of non Ready volumes only. This is true if the volume
to be attached to a vm is in the same storage pool. But, if the volume
is in another storage pool and has to be moved to a vm's storage pool,
the size of the volume should be considered in doing the space check.

computing the asking size when volume is not in ready state or when the
volume is on a different storage pool.

Testing:
I couldnt write unittests for it. This class is not in a unittestable state.

manually tested in the below environment
1. xenserver 6.5 setup with 2 clusters and a host each in each of them.
2. added storage tags for the primary storage.
3. created two service offerings with the storage tags.
4. deployed two vms using newly created offerings in step 3.
5. at this stage, there are two vms one on each host with root disks on the corresponding primary.
6. create a data disk and attach it to vm1
7. detach the data disk. now the data disk is in the primary storage of the cluster of vm1 (let us say primary1)
8. attach this data disk to vm2(running on a host in different cluster)
9. the volume should be moved to the primary storage of another cluster and op_host_capacity should be accordingly updated.

* pr/873:
  CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-14 14:43:36 +05:30
Rajani Karuturi
2a2f0cb534 Merge pull request #1794 from Accelerite/guest-os
added more guest oscentos 6.6, centos 6.7, rhel 6.6, rhel 6.7, windows server 2016, rhel
7.2, centos 7.2

This closes #1244

* pr/1794:
  Added more Guest OS and their mappings on the hypervisor

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-14 14:27:11 +05:30
Rajani Karuturi
da66b06e7d Merge pull request #1938 from swill/classpath
CLOUDSTACK-9780: Fixed the default JAVA_HOME value to be Java8 if not setNow that PR-1888 is merged, Java8 is required.  Unfortunately, the file pushed to `/etc/cloudstack/management/classpath.conf` on ACS install will default the version to Java7 instead of Java8 if JAVA_HOME is unset.  This fix sets the default to Java8 if JAVA_HOME is not set.

* pr/1938:
  Fixed the default JAVA_HOME value to be Java8 if not set

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-13 17:44:00 +05:30
Rajani Karuturi
dbb2193641 Merge pull request #1876 from Accelerite/somaxconn
CLOUDSTACK-9715: Update somaxconn value to default valueUpdated the somaxconn value to detault value 65535

* pr/1876:
  CLOUDSTACK-9715: Update somaxconn value to default value

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-13 17:30:55 +05:30
Rajani Karuturi
3c28ce7f4d Merge pull request #928 from karuturi/CLOUDSTACK-8950
CLOUDSTACK-8950 Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API'sAny string is allowed as hypervisor type from the api.
HypervisorType.getType() tries to validates with the enums and if nothing
matches sets the type as None.

Added a check to not allow None hypervisor type when registering.

will update test results and testing done later.

* pr/928:
  CLOUDSTACK-8950 Hypervisor Parameter check is not performed for registerTemplate and getUploadParamsForTemplate API's

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-13 17:28:29 +05:30
Rajani Karuturi
4f124b2775 CLOUDSTACK-9655 The template which is registered in all zones will be
deleted by deleting 1 template on any zone

added extra warning message if it's a cross-zone template ("This is a
cross zone template and will be deleted from all the zones. Are you sure
you want to proceed?").
2017-02-13 16:42:08 +05:30
Kshitij Kansal
f17d27dd93 CLOUDSTACK-8886: Limitations is listUsageRecords output, listUsageRecords does not return domain - Fixed and tests added 2017-02-13 16:41:56 +05:30
Rajani Karuturi
8efdcfc1cd Merge pull request #1183 from sanju1010/tcpports
Marvin test to verify that adding TCP ports 500,4500 and 1701 in vpn should not failPlease refer to JIRA ticket for more details
https://issues.apache.org/jira/browse/CLOUDSTACK-9117

Following is the result info:
Test to add TCP Port Forwarding rule for specific ports(500,1701 and 4500) in VPN ... === TestName: test_08_add_TCP_PF_Rule_In_VPN | Status : SUCCESS ===
ok

---

Ran 1 test in 166.799s

OK

* pr/1183:
  Marvin test to verify that adding TCP ports 500,4500 and 1701 in vpn should not fail Bug-Id: CS-43653 Reviewed-by: Self

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-13 16:07:28 +05:30
Rajani Karuturi
a79c1f6722 Merge pull request #1416 from pritisarap12/CLOUDSTACK-8717-Failed-to-start-instance-after-restoring-the-running-instance
CLOUDSTACK-8717: Failed to start instance after restoring the running instance Changing PR title and commit message
In continuation with PR #1411  and  #667

* pr/1416:
  CLOUDSTACK-8717: Failed to start instance after restoring the running instance

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-13 16:04:41 +05:30
Rajani Karuturi
eee1e1a694 Added more Guest OS and their mappings on the hypervisor 2017-02-13 15:41:43 +05:30
Anshul Gangwar
8ef94819da CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.
2017-02-13 15:29:52 +05:30
Rajani Karuturi
bec9115a61 CLOUDSTACK-8896: allocated percentage of storage pool going beyond 100%
This issue occurs when a volume in Ready state is moved across storage
pools.

While finding if the storage pool has enough space, it has a check to
consider the size of non Ready volumes only. This is true if the volume
to be attached to a vm is in the same storage pool. But, if the volume
is in another storage pool and has to be moved to a vm's storage pool,
the size of the volume should be considered in doing the space check.

computing the asking size when volume is not in ready state or when the
volume is on a different storage pool.
2017-02-13 15:27:11 +05:30
Jayapal
45c3d94d83 CLOUDSTACK-9715: Update somaxconn value to default value 2017-02-13 15:10:10 +05:30
Rajani Karuturi
cc06c5189a CLOUDSTACK-8950 Hypervisor Parameter check is not performed for
registerTemplate and getUploadParamsForTemplate API's

Any string is allowed as hypervisor type from the api.
HypervisorType.getType() tries to validate with the enums and if nothing
matches, sets the type as None.

Added a check to not allow None hypervisor type when registering.
2017-02-13 15:07:06 +05:30
pallavi_dumbre
be554d2cb6 BUG-ID:CLOUDSTACK-9678
listNetworkOfferings API is listing all the offerings which has same prefix in their name
2017-02-13 15:04:35 +05:30
Will Stevens
6ee4a195f2 Fixed the default JAVA_HOME value to be Java8 if not set 2017-02-10 13:42:58 -05:00
nvazquez
49dadc5505 CLOUDSTACK-9752: [Vmware] Optimization of volume attachness to vm 2017-02-10 11:02:44 -03:00
Rajani Karuturi
e02003d653 Merge pull request #844 from ustcweizhou/assignvm-master
[4.10] CLOUDSTACK-7985: assignVM in Advanced zone with Security GroupsThis commit contains the following changes:
(1) implementation of assignVM in Advanced zone with Security Groups
(2) keep the default nic on shared network when assignVM
(3) allow migrate vm from/to project;
(4) UI change for selecting account/project/network

* pr/844:
  CLOUDSTACK-7985: assignVM in Advanced zone with Security Groups
  CLOUDSTACK-7985: keep the default nic on shared network when assignVM
  CLOUDSTACK-7985: (1) allow migrate vm from/to project; (2) UI change for selecting account/project/network

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-09 11:54:40 +05:30
Rajani Karuturi
2d5054f655 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9770: fix missing ip routes in VR
2017-02-08 15:02:30 +05:30
Rajani Karuturi
01e78f980b Merge pull request #1929 from ustcweizhou/VR-missing-route
[4.9] CLOUDSTACK-9770: fix missing ip routes in VRIn network VR, the routes to current subnets are missing in corresponding ip route Table.
It is a typo in commit 6749785caba78a9379e94bf3aaf0c1fbc44c5445
In VPC VR, it works fine.

* pr/1929:
  CLOUDSTACK-9770: fix missing ip routes in VR

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 15:02:09 +05:30