897 Commits

Author SHA1 Message Date
Jayapal
c20e0ef88f CLOUDSTACK-9317: Fixed disable static nat on leaving ips on interface 2017-05-17 11:03:50 +05:30
Rajani Karuturi
339fe4c7bd Merge pull request #1883 from Accelerite/uniqueMac
CLOUDSTACK-9723: Enable unique mac address across the zones
2017-05-17 10:36:19 +05:30
Rajani Karuturi
108361ca95 Merge pull request #1180 from harikrishna-patnala/CLOUDSTACK-9112
CLOUDSTACK-9112: Deploy VM failing frequently due to capacity calculation not synchron…
2017-05-16 11:20:03 +05:30
Rajani Karuturi
6b0e67502c Merge pull request #1992 from Accelerite/CS-9824
CLOUDSTACK-9824:Resource count for Primary storage is considered twice - while creating and while attaching the disk
2017-05-16 11:11:49 +05:30
Mowgli
c2c1f01d2e Merge branch 'master' into CLOUDSTACK-9604 2017-04-26 11:48:56 +05:30
nvazquez
60ff09d4f7 CLOUDSTACK-9764: Delete domain failure due to Account Cleanup task 2017-04-07 12:40:56 -03:00
Harikrishna Patnala
f34469a41b CLOUDSTACK-9112: deployVM thread is holding the global lock on network longer and cause delays and some improvements in the planner
There are some VM deployment failures happening when multiple VMs are deployed at a time, failures mainly due to NetworkModel code that iterates over all the vlans in the pod. This causes each deployVM thread to hold the global lock on Network longer and cause delays. This delay in turn causes more threads to choose same host and fail since capacity is not available on that host.

Following are some changes required to be done to reduce delays during VM deployments which in turn causes some vm deployment failures when multiple VMs are launched at a time.

    In Planner, remove the clusters that do not contain a host with matching service offering tag. This will save some iterations over clusters that dont have matching tagged host
    In NetworkModel, do not query the vlans for the pod within the loop. Also optimized the logic to query the ip/ipv6
    In DeploymentPlanningManagerImpl, do not process the affinity group if the plan has hostId provided.
2017-03-15 15:21:29 +05:30
Anshul And Priyank
ec66256149 CLOUDSTACK-9604: Root disk resize support for VMware and XenServer. 2017-03-09 19:20:38 +05:30
Pranali Mande
616c05e292 CLOUDSTACK-9824:Resource count for Primary storage is considered twice - while creating and while attaching the disk 2017-03-07 17:23:02 +05:30
Jayapal
7eea445703 CLOUDSTACK-9723: Enable unique mac address across the zones 2017-02-23 12:39:31 +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
nvazquez
3a6d98289c CLOUDSTACK-9539: Support changing Service offering for instance with VM Snapshots 2017-02-16 10:49:09 -03:00
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
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
25f1552e37 Merge release branch 4.9 to master
This closes #1644

* 4.9:
  CLOUDSTACK-4858 Honors the snapshot.backup.rightafter configuration variable Unhides snapshot.backup.rightafter from global configuration
2017-02-08 13:43:02 +05:30
Rajani Karuturi
c101817d45 Merge pull request #1697 from myENA/feature/49_observe_snapshot_backup_rightafter
CLOUDSTACK-4858 Honors the snapshot.backup.rightafter configuration variable

Unhides snapshot.backup.rightafter from global configuration

If snapshot.backup.rightafter is set to false (defaults to true), snapshots are
not backed up to secondary storage.

This is the same as PR #1644 applied to 4.9, as per @jburwell

* pr/1697:
  CLOUDSTACK-4858 Honors the snapshot.backup.rightafter configuration variable Unhides snapshot.backup.rightafter from global configuration

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 12:34:17 +05:30
Rajani Karuturi
e303baa1bf Merge pull request #1905 from nvazquez/expungeVmRefactor
CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots## Description
It was noticed that expunging instances with many vm snapshots took a look of time, as hypervisor received as many tasks as vm snapshots instance had, apart from the delete vm task. We propose a way to optimize this process for instances with vm snapshots by sending only one delete task to hypervisor, which will delete vm and its snapshots

## Use cases

1. deleteVMsnapohsot-> no changes to current behavior
2. destroyVM with expunge=false ->  no actions to VMsnaphsot is performed at the moment. When VM cleanup thread is executed it will perform the same sequence as (3). If instance is recovered before expunged by the cleanup thread it will remain intact with VMSnapshot chain present
3. destroyVM with expunge=true:
   * Vmsnaphsot is marked with removed timestamp and state = Expunging in DB
   * VM is deleted in HW

* pr/1905:
  CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 12:28:09 +05:30
Rajani Karuturi
202b92f243 Merge pull request #1767 from nvazquez/userVmAndTemplatesDetails
CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UIJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9457

### Goal
This PR proposes list/add/update/delete user vm and vm template details via API and UI.

### VM UI Screenshots
Setting tab is added on Instances page. Actions allowed are: Add/Edit/Remove
![](https://issues.apache.org/jira/secure/attachment/12844858/VMDetails1.JPG "Screenshot 1 - VM Details")

Settings tab is only shown if instance is Stopped:
![](https://issues.apache.org/jira/secure/attachment/12844859/VMDetailsRunning.JPG "Screenshot 2 - VM Details Hidden Running VM")
![](https://issues.apache.org/jira/secure/attachment/12844860/VMDetailsStopped.JPG "Screenshot 3 - VM Details Stopped VM")

### Templates UI Screenshots
Setting tab is added on Templates page. Actions allowed are: Add/Edit/Remove:
![](https://issues.apache.org/jira/secure/attachment/12844857/TemplateDetails1.JPG "Screenshot 4 - Template Details")

* pr/1767:
  CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UI

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-08 12:12:37 +05:30
nvazquez
6ce6cf67f0 CLOUDSTACK-9738: [Vmware] Optimize vm expunge process for instances with vm snapshots 2017-02-06 23:39:01 -03:00
Nitesh Sarda
f8ad3e8115 CLOUDSTACK-9766 : Executing deleteSnapshot api with already deleted snapshot does not throw any exception or failure message 2017-02-01 11:59:45 +05:30
Wei Zhou
a2428508e2 CLOUDSTACK-8746: vm snapshot implementation for KVM
(1) add support to create/delete/revert vm snapshots on running vms with QCOW2 format
(2) add new API to create volume snapshot from vm snapshot
(3) delete metadata of vm snapshots before stopping/migrating and recover vm snapshots after starting/migrating
(4) enable deleting of VM snapshot on stopped vm or vm snapshot is not listed in qcow2 image.
(5) enable smoke tests for vmsnaphsots on KVM
2017-01-24 21:47:30 +01:00
Koushik Das
bc86baeaa0 Signed-off-by: Koushik Das <koushik@apache.org> 2017-01-10 14:46:52 +05:30
nvazquez
e8049af153 CLOUDSTACK-9457: Allow retrieval and modification of VM and template details via API and UI 2016-12-27 23:33:50 -03:00
Wei Zhou
a1d2fba1d2 CLOUDSTACK-7985: (1) allow migrate vm from/to project; (2) UI change for selecting account/project/network 2016-12-27 11:58:25 +01:00
Rohit Yadav
0dce1c50c1 CLOUDSTACK-9456: Update Spring version in maven poms
- Bump spring-framework version to 4.x and Jetty to version that runs with JDK8
- Bump servet dependency version
- Migrate spring xmls to version 4, fixes schema locations that are 3.0
  dependent in various xmls.
- Fix failing tests due to spring upgrade
  (Thanks @marcaurele Marc-Aurèle Brothier for fixing them)
    * Fix test DeploymentPlanningManagerImplTest
    * Fix GloboDNS test

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-16 21:21:20 +05:30
Frank Maximus
4c91c9c519 CLOUDSTACK-9403: Support for shared networks in Nuage VSP plugin
BUG-ID: CLOUDSTACK-9403
Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>
Co-Authored-By: Rahul Singal <rahul.singal@nuagenetworks.net>
Co-Authored-By: Sigert Goeminne <sigert.goeminne@nuagenetworks.net>
Co-Authored-By: Nick Livens <nick.livens@nuagenetworks.net>
2016-12-07 10:03:28 +01:00
Koushik Das
97ffe0711e CLOUDSTACK-9650: Allow starting VMs regardless of cpu/memory cluster.disablethreshold setting
Introduced a global configuration flag 'cluster.threshold.enabled'. By default the flag is true.
If the value is false, then a VM can be started in a cluster even if the cluster thresholds are
crossed. However, for a new VM deployment the cluster threshold will always be honoured.
2016-12-02 23:08:32 +05:30
Nick Livens
62e858131f CLOUDSTACK-9321 : Multiple Internal LB rules (more than one Internal LB rule with same source IP address) are not getting resolved in the corresponding InternalLbVm instance's haproxy.cfg file
CLOUDSTACK-9321 : Adding component tests for VPC Network functionality - Internal LB rules

CLOUDSTACK-9321 : Extending Nuage VSP Internal LB Marvin tests

Co-Authored-By: Prashanth Manthena <prashanth.manthena@nuagenetworks.net>, Frank Maximus <frank.maximus@nuagenetworks.net>
2016-11-22 15:51:22 +01:00
Eric Waegeman
4e6c7e179a CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin 2016-11-14 14:39:48 +01:00
Rohit Yadav
96213f9096
Merge branch '4.9' 2016-11-03 09:14:59 +05:30
Rohit Yadav
25b6990e22
server: Fix build regression caused by 32a39
A constructor signature has changed between 4.8 and 4.9+ branches which caused
failure in a unit test introduced by PR #1694. This fixes the unit test by
passing null as the additional parameter (the test does not need instantiated
object).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-03 09:14:35 +05:30
Rohit Yadav
0a2798c6be
Merge branch '4.9' 2016-11-02 23:12:28 +05:30
Rohit Yadav
19951346ad
Merge branch '4.8' into 4.9 2016-11-02 23:03:31 +05:30
Rohit Yadav
68f22e2a43
Merge pull request #1694 from shapeblue/kvm-no-storage-failfast
CLOUDSTACK-9509: Host Connects Without StorageKVM hosts on shared storage failure was accepted by mgmt server with the
host state as Up, even though there was no primary/shared storage available on
it. This patch offers a quick fix by throwing an exception in the storage monitor
which connects storage pool on host. The failure is trapped by agent manager
that disconnects the agent without any investigation.

Based on Lab tests, KVM agent may take upto 2 minutes to attempt NFS mount when
the storage is inaccessible (firewalled, or shutdown) before returning back with
an error. It is safe to assume that this won't add pressure on mgmt server due to
several reconnection attempts, and KVM agent would retry reconnection every 2
minutes.

For such KVM hosts, where failure happens due to storage issues; they will be
briefly put in Alert state but will be mostly be in Connecting state during which
the KVM host attempts to mount/reconfigure NFS storage pool.

/cc @jburwell @karuturi
@blueorangutan package

* pr/1694:
  CLOUDSTACK-9509: Host Connects Without Storage

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-02 22:57:51 +05:30
Syed
f46651e672 Support Backup of Snapshots for Managed Storage
This PR adds an ability to Pass a new parameter, locationType,
    to the “createSnapshot” API command. Depending on the locationType,
    we decide where the snapshot should go in case of managed storage.

    There are two possible values for the locationType param

    1) `Standard`: The standard operation for managed storage is to
    keep the snapshot on the device. For non-managed storage, this will
    be to upload it to secondary storage. This option will be the
    default.

    2) `Archive`: Applicable only to managed storage. This will
    keep the snapshot on the secondary storage. For non-managed
    storage, this will result in an error.

    The reason for implementing this feature is to avoid a single
    point of failure for primary storage. Right now in case of managed
    storage, if the primary storage goes down, there is no easy way
    to recover data as all snapshots are also stored on the primary.
    This features allows us to mitigate that risk.
2016-10-30 23:19:58 -06:00
Rajani Karuturi
c9e7ccf46e Merge pull request #1615 from nvazquez/nfsConfigKey
CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS version changeable in UIJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9438

### Introduction

From #1361 it was possible to configure NFS version for secondary storage mount.
However, changing NFS version requires inserting an new detail on `image_store_details` table, with `name = 'nfs.version'` and `value = X` where X is desired NFS version, and then restarting management server for changes to take effect.

Our improvement aims to make NFS version changeable from UI, instead of previously described workflow.

### Proposed solution
Basically, NFS version is defined as an image store ConfigKey, this implied:
* Adding a new Config scope: **ImageStore**
* Make `ImageStoreDetailsDao` class to extend `ResourceDetailsDaoBase` and `ImageStoreDetailVO` implement `ResourceDetail`
* Insert `'display'` column on `image_store_details` table
* Extending `ListCfgsCmd` and `UpdateCfgCmd` to support **ImageStore** scope, which implied:
** Injecting `ImageStoreDetailsDao` and `ImageStoreDao` on `ConfigurationManagerImpl` class, on `cloud-server` module.

### Important
It is important to mention that `ImageStoreDaoImpl` and `ImageStoreDetailsDaoImpl` classes were moved from `cloud-engine-storage` to `cloud-engine-schema` module in order to Spring find those beans to inject on `ConfigurationManagerImpl` in `cloud-server` module.

We had this maven dependencies between modules:
* `cloud-server --> cloud-engine-schema`
* `cloud-engine-storage --> cloud-secondary-storage --> cloud-server`

As `ImageStoreDaoImpl` and `ImageStoreDetailsDao` were defined in `cloud-engine-storage`, and they needed in `cloud-server` module, to be injected on `ConfigurationManagerImpl`, if we added dependency from `cloud-server` to `cloud-engine-storage` we would introduce a dependency cycle. To avoid this cycle, we moved those classes to `cloud-engine-schema` module

* pr/1615:
  CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS version changeable in UI

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-10-27 11:48:23 +05:30
Rajani Karuturi
d360ededed Merge release branch 4.9 to master
* 4.9:
  Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
2016-10-24 11:15:26 +05:30
Rajani Karuturi
72612f79cd Merge release branch 4.8 to 4.9
* 4.8:
  Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
2016-10-24 11:13:06 +05:30
nnesic
d989c5d8be Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
Currently the logic about volume deletion seems to be that an event
should be emitted when the volume delete is requested, not when the
deletion completes.

The VolumeStateListener specifically ignores destroy events for ROOT
volumes, assuming that the ROOT volume only gets deleted when the
instance is destroyed and the UserVmManager should take care of it.

When deleting an account, all of its resources get destroyed, but the
instance expunging circumvents the UserVmManager, and thus we miss the
VOLUME_DESTROY usage event. The account manager now attempts to
propperly destroy the vm before expunging it. This way the destroy
logic is respected, including the event emission.
2016-10-21 09:26:59 +00:00
Rohit Yadav
32a397aa93 CLOUDSTACK-9509: Host Connects Without Storage
KVM hosts on shared storage failure was accepted by mgmt server with the
host state as Up, even though there was no primary/shared storage available on
it. This patch offers a quick fix by throwing an exception in the storage monitor
which connects storage pool on host. The failure is trapped by agent manager
that disconnects the agent without any investigation.

Based on Lab tests, KVM agent may take upto 2 minutes to attempt NFS mount when
the storage is inaccessible (firewalled, or shutdown) before returning back with
an error. It is safe to assume that this won't add pressure on mgmt server due to
several reconnection attempts, and KVM agent would retry reconnection every 2
minutes.

For such KVM hosts, where failure happens due to storage issues; they will be
briefly put in Alert state but will be mostly be in Connecting state during which
the KVM host attempts to mount/reconfigure NFS storage pool.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-21 10:22:32 +05:30
Nathan Johnson
1a55a93f04 CLOUDSTACK-4858 Honors the snapshot.backup.rightafter configuration variable
Unhides snapshot.backup.rightafter from global configuration

If snapshot.backup.rightafter is set to false (defaults to true), snapshots are
not backed up to secondary storage
2016-09-30 09:39:27 -05:00
nvazquez
2e77496601 CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS version changeable in UI 2016-09-28 08:51:37 -07:00
Bharat Kumar
ba9dcba16d Do not update network if one of the router's state is unknown
Added checks to prevent netwrok update when router state is unknown or when
the new offering removes a service that is in use.

Added a new param forced to the updateNetwork API. The network will
undergo a forced update when this param is set to true.

CLOUDSTACK-8751 Clean network config like firewall rules etc, when network services are removed during network update.
2016-09-12 15:24:47 +05:30
Bharat Kumar
f416332994 CLOUDSTACK-8751 Added tests 2016-09-12 15:24:47 +05:30
Bharat Kumar
75f89c7676 CLOUDSTACK-8751
Minimise network downtime during network updates when redundant VR is being used.
database schema changes
Made changes to the updateNetwork API.
2016-09-12 15:24:47 +05:30
Will Stevens
20f779298d merging 4.8 -> master 2016-05-27 15:19:33 -04:00
Will Stevens
cd5f3320c8 Merge pull request #1564 from greenqloud/pr-emit-template-uuid-on-delete-4.7
Emit template UUID and class type over event bus when deleting templatesNew version of #1378 for the 4.7b branch instead of 4.6.

* pr/1564:
  Emit template UUID and class type over event bus when deleting templates.

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-27 15:02:17 -04:00
Rohit Yadav
566e7d9fac CLOUDSTACK-9369: Restrict default login to ldap/native users
- Restricts default login auth handler to ldap and native-cloudstack users
- Refactors and create re-usable method to find domain by id/path
- Adds unit test for refactored method in DomainManagerImpl
- Adds smoke test for login handler

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-27 15:00:05 -04:00
jeff
7aec943ef8 Emit template UUID and class type over event bus when deleting templates.
The behavior is now consistent with template creation. This commit
also adds a unit test for this functionality to make sure that it will
always happen.
2016-05-26 11:20:39 +00:00
Will Stevens
3c800b4bfe Merge pull request #1518 from nvazquez/testnfs
CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts## Description
JIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9368
This pull request address a problem introduced in #1361 in which NFS version couldn't be changed after hosts resources were configured on startup (for hosts using `VmwareResource`), and as host parameters didn't include `nfs.version` key, it was set `null`.

## Proposed solution
In this proposed solution `nfsVersion` would be passed in `NfsTO` through `CopyCommand` to `VmwareResource`, who will check if NFS version is still configured or not. If not, it will use the one sent in the command and will set it to its storage processor and storage handler. After those setups, it will proceed executing command.

* pr/1518:
  CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-25 23:05:07 -04:00