9217 Commits

Author SHA1 Message Date
Rohit Yadav
e5d3084526 CLOUDSTACK-8339: Allow non-root users to add KVM host
This allows non-root users to add KVM hosts, the user should be an admin or
added to sudoers to execute sudo cloudstack-setup-agent.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Signed-off-by: Remi Bergsma <apache@remi.nl>

This closes #288

(cherry picked from commit d2b0c1a32b2d8719eafd6d4574de9a824d46d290)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-25 14:36:29 +02:00
Milamber
87d4086a64 CLOUDSTACK-6181 Specify GB for the value of rootdisksize parameter. Add some Bytes/GB for log or exception messages. Fix Gb->GB. 2015-05-23 17:52:21 +01:00
wilderrodrigues
44057a0f0f Merge branch 'improvement/RFC_3021_31_Bit_Prefixes' of https://github.com/schubergphilis/cloudstack into rfc_3021
Testing PR #292
2015-05-23 10:10:13 +02:00
wilderrodrigues
a83f74d83e CLOUDSTACK-8506
- Changing the implementation of the NetUtils.ipRangesOverlap() a little bit in order to be compliant with RFC 3021
  - 2 unit tests added
  - ranges from 0 to 255 covered by the tests, which also test the negative cases.
2015-05-22 20:08:09 +02:00
Rohit Yadav
cd55413c6a CLOUDSTACK-8243: KVM agent should not use hardcoded string tails
For KVM agent, guid is configurable in agent.properties, this fix allows the
configuration to work by removing string tail (the -LibvirtComputingResource suffix).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #286

(cherry picked from commit 803b946c2feae193d04219d2360c6d4440f212f1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-22 18:12:10 +01:00
Rohit Yadav
1c81b241e7 CLOUDSTACK-8505: Don't allow non-POST requests for default login API
We add a new contract to pass Http request to authentication plugin system. In
the default login API, we disallow non-POST requests.

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

Conflicts:
	api/src/org/apache/cloudstack/api/auth/APIAuthenticator.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmd.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/GetServiceProviderMetaDataCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmdTest.java
	plugins/user-authenticators/saml2/test/org/apache/cloudstack/api/command/SAML2LogoutAPIAuthenticatorCmdTest.java
	server/src/com/cloud/api/ApiServlet.java
	server/src/com/cloud/api/auth/DefaultLoginAPIAuthenticatorCmd.java
	server/src/com/cloud/api/auth/DefaultLogoutAPIAuthenticatorCmd.java
	server/test/com/cloud/api/ApiServletTest.java
2015-05-22 11:44:34 +01:00
Koushik Das
1cd2e9bc44 Merge branch 'CLOUDSTACK-8301' of https://github.com/apache/cloudstack 2015-05-22 09:47:59 +05:30
Rene Moser
c43e4db4e0 ListFirewallEgressRulesCmd: add interfaces and minor cleanup
This commit does not implement new functionality:

* Fixes duplicate parameter in API docs.
* Fixes a bunch of typos.
* Add interfaces to make it easier for the FirewallService interface.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #249
2015-05-20 17:00:08 +01:00
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
Mike Tutkowski
ac2bccd2a2 Removing unused imports 2015-05-07 13:52:25 -06:00
Daan Hoogland
1c408dec37 Merge branch '4.5' after 4.5.1 vote passes 2015-05-07 16:03:26 +02:00
Rohit Yadav
4ba72a877c Updating pom.xml version numbers for release 4.5.2-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-07 15:33:01 +02:00
Rohit Yadav
069aa4e5f3 CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path
- Removes awsapi db properties usage across codebase
- Removes references from spring xmls, test cases and TransactionLegacy
- Adds sql command to drop database cloudbridge in schema-451to460-cleanup.sql

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-06 15:22:04 +02:00
Rohit Yadav
0eb4eb2370 Updating pom.xml version numbers for release 4.5.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-04 12:17:03 +02:00
Rajani Karuturi
e0721fe976 volume upload: when create template fails, rolling back transaction 2015-05-04 15:15:33 +05:30
Wido den Hollander
329e94828d CLOUDSTACK-1302: Make sure the disk cache mode is passed to the KVM Agent
The StartCommand did not contain the proper cache mode due to VolumeJoinVO
not containing the cache_mode field.
2015-05-04 10:23:00 +02:00
Koushik Das
23bde8ea7a 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"

(cherry picked from commit 3100fc15544bd5bdbe8d2eb0a0e429355657b910)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-03 15:56:10 +02:00
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
7a1cb28c9f 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>
2015-05-03 15:15:29 +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
Rohit Yadav
279efb0432 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.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-01 15:24:53 +02:00
Rajani Karuturi
bd71fcb650 Fixed two coverity reported issues
Dereference after null check
Dm: Dubious method used

This closes #219
2015-05-01 16:08:26 +05:30
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
Wido den Hollander
ab1a6912a9 CLOUDSTACK-1302: Make sure the disk cache mode is passed to the KVM Agent
The StartCommand did not contain the proper cache mode due to VolumeJoinVO
not containing the cache_mode field.
2015-04-30 17:32:52 +02:00
Anshul Gangwar
f46ed59290 CLOUDSTACK-8422: Fixed unable to delete zone from CCP
this closes #202
2015-04-30 14:44:18 +05:30
Jayapal
9642e862d6 CLOUDSTACK-8406: Fixed selecting userdata as VR with dhcp service 2015-04-30 12:24:24 +05:30
Jayapal
4b2ce34bc9 CLOUDSTACK-8406: Fixed selecting userdata as VR with dhcp service 2015-04-30 12:21:15 +05:30
Koushik Das
795f3814f6 CLOUDSTACK-8426: Use a separate thread pool for VR reboot in case of out-of-band movement
Using a cached thread pool for VR reboot task

(cherry picked from commit 1a719afb516164915b973f548c37814b448f0349)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Remi Bergsma
f8b7251b88 return a state instead of null
When a full cluster is down or unreachable,
CloudStack currently reports everything the
same as the last known state, which is usually
Up. When it cannot reach a host and cannot
reach another host in the same cluster either,
it returns null and says "I don't know". This
prevents it from reporting the problem. Now,
we return an Alert or Disconnected state so
proper action can be taken.

Also logging was added, so we know what part
of the code put it to Alert or Disconnected.
2015-04-29 15:05:02 +02:00
Daan Hoogland
97e4fbc294 Merge branch 'investigator_null_state_fix' of https://github.com/remibergsma/cloudstack
This closes #211
2015-04-29 15:00:00 +02:00
Daan Hoogland
1669bb98a4 spaces in log message 2015-04-29 14:54:13 +02:00
Daan Hoogland
22e71be034 space in log message 2015-04-29 14:54:04 +02:00
Remi Bergsma
78e095e64b return a state instead of null
When a full cluster is down or unreachable,
CloudStack currently reports everything the
same as the last known state, which is usually
Up. When it cannot reach a host and cannot
reach another host in the same cluster either,
it returns null and says "I don't know". This
prevents it from reporting the problem. Now,
we return an Alert or Disconnected state so
proper action can be taken.

Also logging was added, so we know what part
of the code put it to Alert or Disconnected.
2015-04-29 08:09:20 -04:00
Koushik Das
1a719afb51 CLOUDSTACK-8426: Use a separate thread pool for VR reboot in case of out-of-band movement
Using a cached thread pool for VR reboot task
2015-04-29 12:29:21 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Santhosh Edukulla
86943da26e Fixed few coverity issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
(cherry picked from commit 0a9742f91462867cc9d5f9321a13a73483fcf149)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:43:48 +02:00
Rajani Karuturi
faaa1365a3 Throwing an exception incase the template service couldnt register template. 2015-04-27 15:12:09 +05:30
Ilia Shakitko
50dd37fcc9 GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; backward capabile)
This closes #191

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-25 02:49:21 +02:00
Rajani Karuturi
75ae90b073 volume-upload: added account level secondary storage resource limit checks 2015-04-24 15:48:44 +05:30
Ilia Shakitko
5c5873edf1 GetUsageRecordsCmd - Removed unnecessary adjust...
ToDayStart/End because ParamProcessWorker.java is taking care of building proper
date format with day start/end

This closes #185

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-24 11:35:00 +02:00
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
3e8b12bbb1 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>
2015-04-23 15:27:43 +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
Rohit Yadav
c71339569d RemoteAccessVpn: fix regression preshared key is not sent to UI/clients
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:04:32 +02:00
Koushik Das
bc399b981f volume-upload: If SSVM is destroyed and started, then partially uploaded volumes/templates remain in
inconsistent state (NotUploaded or UploadInProgress) and doesn't transition to any terminal
state (Uploaded, Uploaded). As a result these volumes/templates cannot be removed. Fix is to handle such
volume/template entries correctly.
2015-04-22 19:28:51 +05:30
Rajani Karuturi
f172fbef8a Bug-Id: CS-39350 Able to upload Volume greater than the Resource limit defined for Primary Storage.
Reviewed-By: Harikrishna Patnala <harikrishna.patnala@citrix.com>
2015-04-20 13:01:19 +05:30
Rajani Karuturi
9be70843fd removed unused static main in ConsoleProxyPasswordBasedEncryptor
This closes #11
This closes #10
This closes #176
2015-04-17 12:07:04 +05:30