1526 Commits

Author SHA1 Message Date
Daan Hoogland
fa56045665 findbugs: wrapper object comparison (fixed) 2015-03-25 17:12:51 +01:00
Rohit Yadav
caba04d173 engine: add DB upgrade path from 4.4.3 to 4.5.0/4.5.1
Upgrade path extends over upgrade path from 4.4.2 to 4.5.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e3e59c544cc62c53f276595068226d70d5dd87a4)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
2015-03-25 11:38:39 +05:30
Rohit Yadav
694b723899 CLOUDSTACK-8312: Fix NPE regression, copy template can have NULL volume size
The copy command reply can have null size returned, so check and set values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 53ca0b1861c743caf61ec04f776c87eac334f185)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-20 17:27:14 +05:30
Rohit Yadav
3c429ee6b5 Merge remote-tracking branch 'sbp/feature/persisten-systemvm-redundant-vpc-REBASE'
This closes #118

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-17 15:44:57 +05:30
wilderrodrigues
0a133c06f8 Adding nre method to NetworkDao
- listVpcNetworks() to be used for the router check task
2015-03-16 11:40:01 +01:00
wilderrodrigues
e350f1e76f Turn a single VPC into a redundant VPC
- when restarting a VPC, the user can check the option Make Redundant in order to change
    the VPC offering and make it redundant
2015-03-16 11:39:57 +01:00
wilderrodrigues
460204fa9f Fixing CsDhcp.py
Fixing assign IPv4 on GuestNetworkGuru.java
Fixing getRouters() on VpcVirtualRouterElement.java
Fixing Fixing paths on keepalived.conf.templ

Refactor on the other files
2015-03-16 11:39:17 +01:00
wilderrodrigues
40eb579115 TK-3135 fixes for VPC restart
* removed the "is redundant" flag form the addVpcRouterToGuestNetwork() method
* removed the "is redundant" flag from the removeVpcRouterFromGuestNetwork() method
* changed the path of the master.py file in the keepalived.conf.temp file
* the call to routerDao.addRouterToGuestNetwork() in the VpcRouterDeploymentDefinition is not needed. That step will be performed once a VM is created
  - In addition, when restarting a VPC the routers will have the guest net configured, if any exists.

* Pushing the POM.xml as well, to use the old Jetty for now. Could not fix the logging problem. Will replace the POM with master version after VPC is done.
2015-03-16 11:39:17 +01:00
wilderrodrigues
8f9f39fa39 [TK-3119] Fix NPEs and improve exception handling + error messages 2015-03-16 11:39:14 +01:00
Antonio Fornie
09bd847040 Vpc redundancy enabled. Including Vpc & Vpc Offering creation. Marvin tests and UI. 2015-03-16 11:38:05 +01:00
Rajani Karuturi
843f6b1691 CLOUDSTACK-5236 : ability to identify where the user is from (ex. LDAP)
Added a source column to the user table.

Source now has only two values UNKNOWN,LDAP with UNKNOWN being the
default and is an enum is com.cloud.User.

When the source is UNKNOWN, the old method of authenticating against all
the available authenticators is used. If a source is available, only
that particular authenticator will be used.

added overloaded methods in AccountService to createUserAccount and
createUser with source specified.

(cherry picked from commit 5da733072e838c830720909ef5ba27ef6ce6d0b0)
2015-03-16 14:53:53 +05:30
Nitin Mehta
765622658a Avoid distributing private key for realhostip.com
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d94a5720efbadb2e538dc68c45c88288486b68f6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 15:02:27 +05:30
Rohit Yadav
74f9adbe3e engine: Add Upgrade path from 4.5.0 to 4.5.1
Encrypts:
- Remote access vpn preshared key
- StoragePool's user info
- Keystore's key

This closes #112

(cherry picked from commit cfd45733351afb675e4b7c107a0deb3403629ca2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
2015-03-12 13:02:45 +05:30
Likitha Shetty
d30d5644bb CLOUDSTACK-8320. Upon a failed migration, a dummy volume is created which remains in 'Expunging' state.
Set destination volume path as NULL while duplicating volume during migration.
If migration fails, destination volume will be marked as removed. And if migration succeeds, volume path will be rightly updated.
2015-03-12 11:57:02 +05:30
Likitha Shetty
bdd28a45ed CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume. 2015-03-12 11:57:02 +05:30
Funs
c27c69438b hypervisors: add OVM3 plugin that supports OVM 3.2.1/3.3.x
This is a plugin that puts in ovm3 support ranging from 3.3.1 to 3.3.2. Basic
functionality is in here, advanced networking etc..

Snapshots only work when a VM is stopped now due to the semantics of OVM's raw
image implementation (so snapshots should work on a storage level underneath the
hypervisor shrug)

This closes #113

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 11:33:42 +05:30
Sanjay Tripathi
520d96724a CLOUDSTACK-8312: The storage usage of "Primary Storage Allocated" is incorrect. 2015-03-10 16:52:25 +05:30
Rohit Yadav
9b669f0648 CLOUDSTACK-7639: make cidr updation more efficient
check and update only when required

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b879916f5c64ddbca8713852b2c0ac187e9be1ff)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-09 16:30:08 +05:30
Rohit Yadav
e1cbe6d18a CLOUDSTACK-7639: make cidrlist update when updateNetworkAclItem is called
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b2b9de7fa39825e8ff111353619df4e5aece12e6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-09 16:30:08 +05:30
Rohit Yadav
ef99f01e59 Merge remote-tracking branch 'anshul/CLOUDSTACK-6900'
This closes #68

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-02 16:40:44 +05:30
Rohit Yadav
43cf1da865 CLOUDSTACK-5238: password checks, NPE fixes and minor fixes
- insecure authenticators excluded in configuration
- snapshot response should have zone
- remove vmsnapshots when removing accounts

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 5481485a083957ff58da3b6fea9d7b6d20f06875)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java
	server/src/com/cloud/api/ApiResponseHelper.java
	server/src/com/cloud/storage/download/DownloadActiveState.java
2015-02-27 18:24:46 +05:30
Daan Hoogland
43a39d1eb0 findbugs: possible nullpointer 2015-02-19 10:27:51 +01:00
Daan Hoogland
0f8a055dff findbugs: equals() call on Long instead of =-comparison 2015-02-19 10:23:10 +01:00
Rohit Yadav
1a6df6f978 CLOUDSTACK-7908: Add user_id column to vm_instance table
Design Document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Allow+VM+listing+by+User+ID

- Adds column to VMInstance DAO
- Adds column in vm_instance table
- Adds column in the UserVMJoinVO
- Adds default admin user which has UID = 2
- Adds migration path that sets user_id to first user of the accountId that
  owns the vm in vm_instance table
- Add arg on list VMs API to query by userId, add support in query layer
- Refactor VMInstanceVO and child classes to accept userId
- Add code to let service layer pass userId if loggedIn user belongs to same
  account as the owner executing an API call or use first user from owner account
- In case of CPVM and SSVM use system user ID
- Fix unit tests and spring injections

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:02:38 +05:30
Daan Hoogland
7e75f339bc license and format 2015-02-12 14:47:12 +00:00
Daan Hoogland
a9c384fd17 CLOUDSTACK-8238 mocked test to make sure xapi code is called in test for
pingtask
2015-02-10 16:15:24 +01:00
Rohit Yadav
a8f9233377 CLOUDSTACK-8146: close search builder using done()
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a4d24adfb889291bfb3b888555603e66aeee51a1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 18:06:15 +05:30
Rohit Yadav
7c41a1184c agent: don't investigate if host is null, send alert instead
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:42:13 +05:30
Rohit Yadav
a2547ed827 orchestration: allow storage migration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:38:53 +05:30
Rohit Yadav
61dfb2d625 AgentAttache: allow checkonhost command in maintenance, cancel if only allowed
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 16:29:03 +05:30
Rohit Yadav
d4663df7c9 Make volume deletion publish event, removed by 781648fb1003c8c32875e9ff7a6c4ef4694539f7
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-05 15:01:39 +05:30
Daan Hoogland
b586439c9f CLOUDSTACK-8197 create MinVRVersion config item 2015-02-03 13:18:15 +01:00
Mike Tutkowski
31f67c2b3c If the HypervisorType of a storage pool is Any, we need to retrieve hosts in the given zone for each HypervisorType. 2015-01-29 19:18:04 -07:00
Mike Tutkowski
bd6a89939d Adding/updating comments around the volume's hypervisor snapshot reserve field 2015-01-29 15:50:42 -07:00
Mike Tutkowski
1b51bbbf74 Update hypervisor snapshot reserve for the root volume earlier than when it is currently being set 2015-01-29 13:01:51 -07:00
Mike Tutkowski
c2330f48dd Replace synchronized with the use of database locking 2015-01-27 17:36:21 -07:00
Mike Tutkowski
c847831662 Do not allow deletion of the snapshot if the snapshot is being copied 2015-01-26 14:57:28 -07:00
Nitin Mehta
abf4e5c646 CLOUDSTACK-8181: Introducing a new allocator called firstfitleastconsumed. The purpose of this allocator is to find hosts/pools with least capacity usage (in terms of percentage) within the cluster and use those resources first before others. This allocator can be used changing vm.allocation.algorithm. For hosts it would decide the least consumed host through the setting host.capacityType.to.order.clusters to base the usage on cpu or ram.
Reviewed-by: Prachi
2015-01-26 10:48:06 -08:00
Daan Hoogland
29aeed71fc CLOUDSTACK-6485 prevent ipaddress asignment of gateway to gateway-interface on vpc router by setting vpcid to null in network 2015-01-26 16:54:53 +01:00
Mike Tutkowski
8204a44890 When creating a template from a managed-storage snapshot, put the snapshot in the Copying state before performing the copy (don't want to do anything with the snapshot until this process has completed) 2015-01-25 23:29:27 -07:00
Rohit Yadav
f9a8111e17 CLOUDSTACK-8151: Add removeRawUsageRecords API to cleanup old cloud_usage data
Call removeRawUsageRecords with interval (> 0) and it will clean up cloud_usage
table by removing records older than interval no. of days from today (current date)
and in case it runs when the job exec time is near, it will fail alerting
user to try again after a 15 min window.

There is an issue with async job scheduler, if this API were async it tries
to search and remove job from cloud_usage.async_job table and fails which is
why this API is sync and extends BaseCmd.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-23 19:38:32 +05:30
Mike Tutkowski
2094286c8a Adding support for creating a volume from a snapshot when the snapshot is on managed storage 2015-01-21 13:06:05 -07:00
Rohit Yadav
664186f483 CLOUDSTACK-8160: use preferable protocols
(cherry picked from commit debfcdef788ce0d51be06db0ef10f6815f9b563b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-21 18:04:45 +05:30
Mike Tutkowski
0f84e042b9 Adding support for creating a volume from a snapshot when the snapshot is on managed storage 2015-01-20 15:24:33 -07:00
Abhinandan Prateek
d8def3dc0b CLOUDSTACK-8164: Look for all host to avoid NPE
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit a1a601be5a08a42739c3ef999f551db1b7bd7749)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-19 11:30:49 +05:30
Rohit Yadav
d9bd235bf6 engine/storage: add NPE check, break if parent snapshot is null
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit c06ca09b54b053b37db9d4fc47226558bf15c6ba)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:20:56 +05:30
Anshul Gangwar
91e1881be8 CLOUDSTACK-6900: This fixes volume migration failing after that volume is downloaded.
When we download volume then we create entry in volume_store_ref table.
We mark the volume entry to ready state once download_url gets generated.
When we migrate that volume, then again one more entry is created with same volume id.
Its state is marked as allocated. Later we try to list only one dataobject in datastore
for state transition during volume migration. If the listed volume's state is allocated
then migration passes otherwise it fails.

Below fix will remove the randomness and give priority to volume entry which is made for
migration (download_url/extracturl will be null in case of migration). Giving priority to
download volume case is not needed as there will be only one entry in that case so no randomness.
2015-01-16 15:15:14 +05:30
Daan Hoogland
06d4458d0a CID-1256275 regression: resource leak in systemvm update code 2015-01-12 20:40:01 +01:00
Wei Zhou
b528047fb6 CLOUDSTACK-8146: Resource count of primary storage does not consider the detached volumes 2015-01-12 12:25:28 +01:00
Likitha Shetty
4b67a48144 CLOUDSTACK-3439. [VMWARE] While preparing for migration, include dynamically created nics in case of VMware too. 2015-01-08 09:50:19 +05:30