1269 Commits

Author SHA1 Message Date
Rafael da Fonseca
874aa8d15a Fix findbugs RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE in HostVO.java Assert isn't used in prod runtime
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #451
2015-06-15 12:28:00 +03:00
Rafael da Fonseca
117870c121 Fix 3 findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warnings in Upgrade410to420.java There was no risk of sql injection here, nor any need to use PreparedStatement, still this fixes the warnings
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #443
2015-06-15 12:17:51 +03:00
Rafael da Fonseca
4eaa613a0b Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in Upgrade30xBase.java There was no risk of sql injection here, nor any need to use PreparedStatement, still, this fixes the warning
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #442
2015-06-15 12:17:49 +03:00
Rafael da Fonseca
869cc0c9f2 Fix findbugs SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING warning in Upgrade2214to30.java There was no risk of sql injection here, nor any need to use PreparedStatement, still this fixes the warninG
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #441
2015-06-15 12:17:47 +03:00
Rafael da Fonseca
e409bc3e60 Fix findbugs warning in Upgrade421to430.java Was creating Integer to assign to int
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #419
2015-06-15 12:09:27 +03:00
Rafael da Fonseca
a299674831 Fix 4 findbugs warnings in Upgrade218to22.java Was creating boxed Integers when only int is required
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #418
2015-06-15 12:09:26 +03:00
wilderrodrigues
c3b4c7a9cf Coverity issue 1116509 - Assigning the the new returned ResultSet to the rs variable in order to get it closed in the finally block
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:04 +02:00
wilderrodrigues
abe0990259 Formatting the code - Adding final modifier and indenting the code
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
2015-06-04 12:34:04 +02:00
Rohit Yadav
6c1dde8f86 schema: Encode URL safe random vnc password string
/+= may break on some environments, url safe encoded passwords will have -_,
characters which are more acceptable

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 19cc5eb9e6f1b5127bf01e4c1ae061875e61cb4c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-06-01 14:23:42 +02:00
Jayapal
733ac2b728 CLOUDSTACK-8324: Added vm ip fetch logic 2015-05-28 15:42:08 +05:30
Koushik Das
d423df66cc CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Code cleanup, added helper method to get default system offering based on "system.vm.use.local.storage".
2015-05-19 21:32:14 +05:30
Koushik Das
3f7e31ed05 CLOUDSTACK-8301: Enable configuring local storage use for system VMs at zone level
Made system.vm.use.local.storage a zone level configuration.
2015-05-19 21:32:14 +05:30
Devdeep Singh
a99c9d0e68 Implementation for the ability to disable a storage pool for provisioning
... of new volumes. Following changes are implemented 1. Disable or enable a pool with the
updateStoragePool api. A new 'enabled' parameter added for the same. 2. When a
pool is disabled the state of the pool is updated to 'Disabled' in the db. On
enabling it is updated back to 'Up'. Alert is raised when a pool is disabled or
enabled. 3. Updated other storage providers to also honour the disabled state.
4. A disabled pool is skipped by allocators for provisioing of new volumes. 5.
Since the allocators skip a disabled pool for provisioning of volumes, the
volumes are also not listed as a destination for volume migration.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Disabling+Storage+Pool+for+Provisioning

This closes #257

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-19 11:16:49 +01:00
Koushik Das
3100fc1554 CLOUDSTACK-8438: Proper enforcement of hypervisor capability "max. guest limit"
VMs in transition states - Starting, Stopping, Migrating - are also taken into account for enforcing "max. guest limit"
2015-05-01 12:49:56 +05:30
Anshul Gangwar
866cc41145 CLOUDSTACK-8423: [Xenserver] Improved the performance for processing of ClusterVMMetaDataSync command which can cause slowness in DB if there are huge number of VMs
this closes #204
2015-04-30 14:44:36 +05:30
Anshul Gangwar
2133c302f4 CLOUDSTACK-8413: Fixed resource tags on disk are lost when migrate to another storage
During cold volume migration we are duplicating volume entry in volumes table.
When migration is complete, we update the uuid of new entry and expunge the older entry.
This results in removal of resource tags on volume as its resource id still pointing to older volume.
As part of fix while updating uuid for volume, we are updating resource_id for tags also.

This closes #194
2015-04-30 14:34:20 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Rohit Yadav
06e353e5c7 vmware: support vmfs as local storage pool type
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 752d784d92b4ce461ec6a19a6b54220bb967d4d0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:36:52 +05:30
Rohit Yadav
a70947f9b1 CLOUDSTACK-7593: in 450to451 upgrade path copy vm_details from template for vmware
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8e1507078052b8068b828d336f8d0358915047e1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:47:59 +05:30
KC Wang
01864ef77c CLOUDSTACK-6697: bigswitch networking plugin update
1. provide compatibility with the Big Cloud Fabric (BCF) controller
   L2 Connectivity Service in both VPC and non-VPC modes
2. virtual network terminology updates: VNS --> BCF_SEGMENT
3. uses HTTPS with trust-always certificate handling
4. topology sync support with BCF controller
5. support multiple (two) BCF controllers with HA
6. support VM migration
7. support Firewall, Static NAT, and Source NAT with NAT enabled option
8. add VifDriver for Indigo Virtual Switch (IVS)

This closes #151

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-09 13:02:02 +05:30
wilderrodrigues
3d22a16c4f Bump priority stragety is no longer used for redundant virtual routers
- With the changes added by the rVPC work, the bump priority became deprecated.
     This commit includes a refactor to get it removed from the following resources:
     * Java classes
     * domain_router table - removing the is_priority_bumpup column
     * Fixing unit tests

All changes were tested with:

XenServer 6.2 running under our VMWare zone
CloudStack Management Server running on MacBook Pro
MySql running on MackBook Pro
Storage Type: Local
2015-04-02 21:50:49 +02: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
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
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
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
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
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
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
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
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
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
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
Koushik Das
053c160b0f volume upload: management server polling and upload status from agent
MS polling logic to query status for templates that are uploaded
2015-01-16 18:03:36 +05:30
Koushik Das
627f5a62dc volume upload: management server polling and upload status from agent
MS polling logic to query status for volumes that are uploaded
2015-01-14 10:19:12 +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
Kishan Kavala
f767adfe71 Bug-Id: CLOUDSTACK-3439: Include dynamically created nics in Prepare for migration command in KVM 2015-01-07 14:52:42 +05:30
Kishan Kavala
438f90a262 Close transaction while fetching recent events 2015-01-07 14:14:44 +05:30
Kishan Kavala
9eb8d538dd For volumes created from template, do not log offering ID in VOLUME.CREATE in usage_event. Moved offering type to DiskOffering interface 2015-01-07 12:31:41 +05:30
Daan Hoogland
251e88c401 CID-1261671 added null check 2015-01-05 15:55:33 +01:00
Likitha Shetty
15b348632d CLOUDSTACK-8129. Cold migration of VM across VMware DCs leaves the VM behind in the source host.
If VM has been cold migrated across different VMware DCs, then unregister the VM from source host.
2014-12-26 11:07:30 +05:30
Likitha Shetty
5f9e4fddf3 CLOUDSTACK-8112. CS allows creation of VM's with the same Display name when vm.instancename.flag is set to true.
During VM creation, if vm.instancename.flag is set to true and hypervisor type is VMware, check if VM with the same hostname already exists in the zone.
2014-12-23 14:00:32 +05:30