3223 Commits

Author SHA1 Message Date
Rohit Yadav
1840805aab server: Introduce Unknown Status to be used in AbstractInvestigatorImpl
The PR #211 introduced changes where the abstract investigator testIpAddress()
would return other Status, which previously only returned null, Up or Down. In
this patch we introduce a new Status "Unknown" that replaces null's semantics.

The important changes #211 introduced was the debugging statements as semantically
the changes would work same as the consumers of testIpAddress() method only used
if returned values were Up or Down and in other cases (null, Alert etc) it would
simply continue to loop through the resources being investigated.

Keeping the debug logs, this commit only replaces the previously returned null
values with Status.Unknown and fixed the debug statements to reflect the same.
In case of trapped exceptions too, we return Unknown status but log the exception
we trapped.

server: add null assertions and remove dead code with testIpAddress usage

This closes #222

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 7a1cb28c9f548ac185dcb7c59eb2fadb7d550718)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-03 15:16:04 +02:00
Rohit Yadav
df3dea58a2 CLOUDSTACK-6139: Fix regression, allow zone level systemvm localstorage config
From b3f18e7d74a0f09db9977554a6c7648b7edbc33d, the zone level systemvm local
storage setting never worked as it needed to be moved to config depot.

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

Conflicts:
	plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2015-05-01 15:27:40 +02:00
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
Ilia Shakitko
fe29998938 GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; backward capabile)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-24 11:34:51 +02:00
Rohit Yadav
79a46fe0b4 CLOUDSTACK-8399: Allow changing hvm flag in updateTemplate API
This allows changing the hvm flag for a template after the template has been
registered.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 3e8b12bbb12554baf7ba2a625bfa064f86bfa9cc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 15:28:22 +02:00
Rohit Yadav
d81e831214 RemoteAccessVpn: fix regression preshared key is not sent to UI/clients
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit c71339569d9d3e8e710a4c2490a50ffa6eff4d7f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:19:24 +02:00
Rajani Karuturi
d5bb2f16fc volume upload: added state transition for a failed volume delete 2015-04-16 17:42:18 +05:30
Rene Moser
4a424500f3 CreateVMSnapshot: fix typo in API description
This closes #161
2015-04-13 20:26:26 +02:00
Rajani Karuturi
5c152e5f3a volume upload: disabled all zones during template upload 2015-04-13 14:43:12 +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
57d0931b49 Adding more tests to cover other possibilities concerning different versions of the XenServer
Adding a better algorithm in order to corver deeper inheritance form the command classes
Removing some unsued variables.
2015-03-31 16:49:48 +02:00
Daan Hoogland
042b99f6bc Merge branch 'hotfix/findbugs-unknownvm-as-null' of https://github.com/DaanHoogland/cloudstack 2015-03-26 15:40:20 +01:00
Rohit Yadav
0eec4ff977 CLOUDSTACK-6353: Fix list to have correct LB IP for each rule
(cherry picked from commit 0fe4acf525824650ea290f09edd5a71ed9e7b053)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-26 18:24:19 +05:30
Daan Hoogland
6a821730ce Boolean -> boolean 2015-03-25 22:20:40 +01:00
Daan Hoogland
de4445845e trailing whitespace 2015-03-25 22:06:26 +01:00
Daan Hoogland
048212b117 findbugs: Boolen function should not return null 2015-03-25 21:46:47 +01:00
Pierre-Luc Dion
a86dbd3c20 remove 'double quotes' from description because it cause problem with integration tests 2015-03-21 21:04:09 -04:00
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
Rajani Karuturi
7d1ca8a55c Fixed NPE with getUploadParamsForTemplate API call
if isdynamicallyscalable optional parameter is not specified, its trying
to cast null to Boolean and throws NPE
2015-03-17 10:35:48 +05:30
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
88129adac1 Implement the new VPC restart
- behaves just like network restart: if clean up is checked, all routers destroyed; if 1 router is gone and no
    clean up, only 1 new router created.
2015-03-16 11:39:52 +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
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
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
40f343ff4c api: avoid sending sensitive data in api response
- UI: use post when updating user
- S3: don't send s3 key in the response
- VPN: don't send preshared key in remoteaccessvpn api response
- Snapshot response should set zone id not volume's device id

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 02cadc3fb3fae7f5e8c87b7fafb977fb5eeae6eb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-11 16:34:56 +05:30
Pierre-Luc Dion
d38b6f5f1e CLOUDSTACK-4719: update API description for details, example for xenserver tools 2015-03-08 22:17:45 -04:00
Pierre-Luc Dion
4c0ed3d85d CLOUDSTACK-1359: added (1GB = 1,073,741,824 bytes) 2015-03-07 15:24:04 -05:00
Phillip Kent
d4523c5778 modify description for name parameter in ListVMsCmd.java 2015-03-05 12:30:26 +00:00
René Moser
6fef3ed22b CreatePortForwardingRuleCmd: Fix typos and update descriptions.
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>

This closes #94
2015-03-05 11:03:00 +01:00
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
a75ff23131 CLOUDSTACK-8273: fix baremetal account creation
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e000646790597cb6c245311f57761b41d23a4e34)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalVlanManagerImpl.java
2015-02-27 15:55:09 +05:30
Pierre-Yves Ritschard
1dc0611bcd ensure agent reconciliation triggers events
(cherry picked from commit 0ba75bcebde4e8a4773c7b31e5d8b88bf748a131)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-18 11:15:44 +05:30
Rohit Yadav
2580edbcfb CLOUDSTACK-7908: UserVmResponse returns userid/username information of the creator
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 16:12:22 +05:30
Rohit Yadav
2b7073c73f CLOUDSTACK-7085, CLOUDSTACK-7084: disallow empty passwords
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e5cd75790a64e4ba2e8bef83affabe6db4de8acd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-16 15:34:06 +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
083a4950a9 Fix typos
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit af278fe1ab18a1404b2233f3dbb2c8b1e0edc0be)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 15:54:01 +05:30
Rohit Yadav
1c616392db DeployVmCmd: Fix NPE case
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d2bf21065eb650ae2b58c5ab548c8c72a97b76b9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 14:21:29 +05:30
Daan Hoogland
b586439c9f CLOUDSTACK-8197 create MinVRVersion config item 2015-02-03 13:18:15 +01:00
Rohit Yadav
2f6691c6b9 CLOUDSTACK-8190: Fix xenserver traffic label for backward compatiblity
(cherry picked from commit 48ec9ac11b0772ffb9b7be4947f26aba0ad9b89d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	ui/scripts/system.js
2015-02-02 16:20:50 +05:30
Koushik Das
6ff8752fd0 volume-upload: gc thread to clean partially uploaded files
Fixed multiple issues in the template code path
2015-01-31 17:25:19 +05:30
Koushik Das
2fa4a475aa volume-upload: getUploadParamsForVolume/Template response differs from spec
Fixed the response parameters
2015-01-31 17:23:13 +05:30
Koushik Das
71873c8d41 volume-upload: GetUploadParamsForVolume/Template API response in XML format doesn't have POST URL
The URL response parameter didn't have the right name attribute set on it.
2015-01-31 17:16:58 +05:30
Daan Hoogland
ebd7a7be5a state description c&p fix
cherry-picked from 766f8216a0bc96343a074c66757872052dd7b233, because of merge conflicts
2015-01-24 13:54:29 +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
Koushik Das
cd02ceb7a1 volume-upload: gc thread to clean partially uploaded files
Added state transitions from error/abandoned to destroyed
2015-01-19 18:01:29 +05:30
Rohit Yadav
cecab95cc9 CLOUDSTACK-8167: publish volume uuid on event bus in create snapshot cmd
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit f6564b0b03362093efd1766a64e34184208eec3c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java
2015-01-18 17:42:11 +05:30
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
1f1c96d2ee volume upload: management server polling and upload status from agent
- Added config parameters for upload monitoring interval and operation timeout
- Some updates to the volume state machine
2015-01-16 15:28:17 +05:30