Commit Graph

30394 Commits

Author SHA1 Message Date
Rajani Karuturi f9ef6ca667 Merge pull request #1948 from greenqloud/pr-faster-static-nats
[CLOUDSTACK-9793] Faster IP in subnet checkThis change removes the conversion from IPNetwork to list in one of the router scripts. This makes the router faster at processing static NAT rules, which can prevent timeouts when attaching or detaching IPs.

With the `list` conversion, it has to potentially check a list of 65536 IP strings multiple times. We assume that the comparison implemented in the IPNetwork is far more efficient. We have seen speed-up from 218 seconds to enable static NAT with 18 IPs on the router to 2 or 3 seconds by removing this cast. This also fixes a potential bug where adding IPs to a router time out because the scripts are taking too long. 218 seconds, for example, is beyond the timeout on the KVM agent for script execution, and then all enableStaticNat operations will fail.

* pr/1948:
  CLOUDSTACK-9793: Faster ip in subnet check

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:33:38 +05:30
Rajani Karuturi 3d78802ae7 Merge pull request #1954 from myENA/bug/vpc-vr-logrotate
CLOUDSTACK-9795: moved logrotate from cron.daily to cron.hourly for vpcrouter moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config.  This brings 'vpcrouter' inline with 'router'.  We are having issues with cloud.log not rotating fast enough, which filled up /var/log and ultimately caused the VR to stop functioning in such a way that it prevented new VMs from being deployed.

* pr/1954:
  moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-27 16:37:03 +05:30
Rajani Karuturi 1e8126afbf Merge pull request #1927 from wido/ipv6-ssvm-fix
ipv6: Set IPv6 CIDR and Gateway in 'nic' profileWithout this information a NPE might be triggered when starting a VR, SSVM or CP
as this information is read from the 'nics' table and causes a NPE.

During deployment we should set the IPv6 Gateway and CIDR for the NIC object so that
it is persisted to the database.

Signed-off-by: Wido den Hollander <wido@widodh.nl>

* pr/1927:
  ipv6: Set IPv6 CIDR and Gateway in 'nic' profile

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-27 16:34:15 +05:30
Rajani Karuturi cd68e99148 Merge pull request #838 from bvbharatk/CLOUDSTACK-8857
CLOUDSTACK-8857 listProjects doesn't return tags vmstopped or vmrunning when their value is zero listProjects doesn't return tags vmstopped or vmrunning when their value is zero
added the the appropriate tags to response.

tested this manually by creating projects, launching vms from project accounts and then listing the projects.

* pr/838:
  CLOUDSTACK-8857 listProjects doesn't return tags vmstopped or vmrunning when their value is zero

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 12:08:47 +05:30
Rajani Karuturi 75c08c467c Merge pull request #865 from bvbharatk/CLOUDSTACK-8856
CLOUDSTACK-8856 Primary Storage Used(type tag with value 2) related tPrimary Storage Used(type tag with value 2) related tag is not showing in listCapacity api response

* pr/865:
  CLOUDSTACK-8856 Primary Storage Used(type tag with value 2) related tag is not showing in listCapacity api response.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 12:08:18 +05:30
Rajani Karuturi bb274a1865 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used
  CLOUDSTACK-9628: Use correct virtualsize with Swift as secondary storage
2017-02-23 06:07:52 +05:30
Rajani Karuturi c6f0ba76b1 Merge pull request #1947 from ustcweizhou/RemoveSecondaryIP
CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used

* pr/1947:
  CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 06:05:56 +05:30
Rajani Karuturi f3d38be808 Merge pull request #1770 from syed/tmpl-virt-size
CLOUDSTACK-9628: Fix Template Size in Swift as Secondary StorageCloudstack incorrectly uses the physical size as the size of the
template. Ideally, the size should refelct the virtual size. This
PR fixes that issue.

* pr/1770:
  CLOUDSTACK-9628: Use correct virtualsize with Swift as secondary storage

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 06:04:34 +05:30
Rajani Karuturi 87f11044c8 Merge pull request #1379 from jayapalu/configdriveScripts
CLOUDSTACK-8324: config drive data set/get scripts for the guest vmAdded the guest vm scripts for set/get the vm data, password and ssh keys

* pr/1379:
  CLOUDSTACK-8324: updated the mount directory name and kvm virt device
  CLOUDSTACK-8324: config drive data set/get scripts for the guest vm

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 05:40:14 +05:30
Rajani Karuturi 9efd9059ef Merge pull request #1885 from Accelerite/vpctier
CLOUDSTACK-9724: Fixed missing additional public ip on tier network wIn VPC tier network acquire an ip and configure the PF service on it. VR now will have the two ip addresses on the interface.
Now restart the VPC tier network with cleanup option. After router comes up the public interface has only one ip (source nat ip)
Fixed the above issue.

* pr/1885:
  CLOUDSTACK-9724: Fixed missing additional public ip on tier network with cleanup

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-23 05:38:51 +05:30
Rajani Karuturi 50147a4208 Merge pull request #1882 from Accelerite/CLOUDSTACK-8737_CodeCleanup
CLOUDSTACK-8737: Removed the missed out-of-band VR reboot code, not required based on persistent VR changes.

* pr/1882:
  CLOUDSTACK-8737: Removed the missed out-of-band VR reboot code, not required based on persistent VR changes.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-21 17:30:55 +05:30
Rajani Karuturi fe555e194e Merge pull request #1881 from Accelerite/CLOUDSTACK-9721
CLOUDSTACK-9721: Remove deprecated/unused global configuration parameter - consoleproxy.loadscan.interval

* pr/1881:
  CLOUDSTACK-9721: Remove deprecated/unused global configuration parameter - consoleproxy.loadscan.interval

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-21 17:30:30 +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
David Mabry 450deed847 moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config 2017-02-20 09:06:46 -06:00
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 d7b792c3f9.
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
Stefania d5c5eb10f8 CLOUDSTACK-9793: Faster ip in subnet check
This change removes an unnecessary conversion from IPNetwork
to list in one of the router scripts. This makes the router
faster at processing static NAT rules, which can prevent
timeouts when attaching or detaching IPs.
2017-02-17 13:20:11 +00:00
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
Wei Zhou 0f054246b6 CLOUDSTACK-9789: Fix releasing secondary guest IP fails with associated static nat which is actually not used 2017-02-16 14:18:56 +01: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
Jayapal 6518607885 CLOUDSTACK-8324: updated the mount directory name and kvm virt device 2017-02-15 13:58:54 +05:30
Jayapal ea09e6c196 CLOUDSTACK-8324: config drive data set/get scripts for the guest vm 2017-02-15 12:02:58 +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
Jayapal ee726af53b CLOUDSTACK-9724: Fixed missing additional public ip on tier network with cleanup 2017-02-14 14:26:40 +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