8679 Commits

Author SHA1 Message Date
Nitin Mehta
31a6517402 CLOUDSTACK-7754: Templates source_template_id is null when it is created from Snapshot with its corresponding volume removed. Fix it by searching for volumes including removed. Also bring the logic of setting source template id to create() method than execute which was wrongly put in.
(cherry picked from commit e1a993d37b1bf9be24edd46f6d3566826692f853)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 12:07:42 +05:30
Nitin Mehta
a6f9411b1e CLOUDSTACK-7771: Throw exception while restoring vm if the template is already deleted. Also fix the usage event being generated from the right template id and fix the log message which sometime showed incorrect template id.
CLOUDSTACK-4201: listServiceOfferings API needs to be able to take virtualmachineid of SystemVM and return service offerings available for the vm to change service offering

(cherry picked from commit ee0f0a1cffb96a8371d9a8c4210b428660f79d4f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 12:05:25 +05:30
Nitin Mehta
be0882b19e CLOUDSTACK-7909: Change the capacity_state in op_host_Capacity table only on explicit enabling/disabling of the host and remove the logic for changing it when cluster/pod/zone is enabled/disabled. Also add the logic in capacity checker thread so that previous changes finally get consistent with this new model and also its good to have it for sanity reasons.
(cherry picked from commit ade305be20021d20a881693625864f46a335ea98)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/capacity/CapacityManagerImpl.java
2015-01-20 11:58:04 +05:30
Nitin Mehta
665aa6b522 CLOUDSTACK-7916: Generate Alerts if System VMs cannot be started.
(cherry picked from commit e87bb20d0c73e6f46f1352e271afec3961067542)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:55:47 +05:30
Nitin Mehta
a12ab8a2b3 CLOUDSTACK-7916: Generate Alerts if System VMs cannot be started.
(cherry picked from commit 3907bc6f9d2b4a61a4d0b32e5c1a15d95210531e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:55:36 +05:30
Nitin Mehta
1aeaf4dcc9 CLOUDSTACK-7920: NPE in the payload was causing the ssvm agent to not connect, fix it and also make sure that template/volume sync are robust that exceptions do not cause ssvm agent disconnect issues.
(cherry picked from commit 5213401ace08f4a5247a325e9d99a4a66bd7df11)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
2015-01-20 11:39:34 +05:30
Saksham Srivastava
6715c6ccfa CLOUDSTACK-7941: CloudStack should log IP address of actual client even if a ReverseProxy is there
(cherry picked from commit f0a4a639de231929bd63f673c4d6adc6bfb5ca80)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:32:09 +05:30
Saksham Srivastava
6e5b9da7d4 CLOUDSTACK-7962: Change state to Volume State
(cherry picked from commit c615aafd7706d3036e5bd1e95671b3aa0c287cea)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:30:05 +05:30
Saksham Srivastava
f88a34dabe CLOUDSTACK-7962: VM Snaptshot should add check for root volume status also
(cherry picked from commit 690a5ded358fe6f4d8671f497049f510d4894b1e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:29:59 +05:30
Sanjay Tripathi
b77cbea0f3 CLOUDSTACK-7964: listAccounts API is not listing correct value of resource limits.
(cherry picked from commit d475b62838878677531d6daab667757baf63604e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 11:29:34 +05:30
amoghvk
57f5d51a11 CLOUDSTACK-7976 : Param validation for global params involving domain name
(cherry picked from commit 95ea20390739a24dad92895b8db712282be31bbb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
2015-01-20 10:36:11 +05:30
amoghvk
3cb4358270 CLOUDSTACK-7977
Fix password generator, add guards for minimum length

(cherry picked from commit 960b7bbf742bbba62cd25bc62b700c6c829e35f2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:31:05 +05:30
Koushik Das
37cdb4ecca CLOUDSTACK-8054: No event generated on host maintenance mode is completed
Added events for host maintenance start and completion

(cherry picked from commit f6854bc9844ce94815b99032d508bda43ac1a0c1)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-20 10:23:37 +05:30
Abhinandan Prateek
a1a601be5a CLOUDSTACK-8164: Look for all host to avoid NPE
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-19 11:29:51 +05:30
Kishan Kavala
1e87f3b80b Bug-Id: CLOUDSTACK-3439: Include dynamically created nics in Prepare for migration command in KVM
(cherry picked from commit f767adfe71dda82c45cf376ba71518e2ad84cc98)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 18:19:24 +05:30
Rajesh Battala
5f117e6be9 CLOUDSTACK-6920 Support listing of LBHealthcheck policy with LBHealthcheck policy ID
(cherry picked from commit c7b23d0a10fa6fc55820f298cce658bff0b8125c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:31:15 +05:30
Saksham Srivastava
a1791cb4a8 CLOUDSTACK-8088: VM scale up is failing in vmware with Unable to execute ScaleVmCommand due to java.lang.NullPointerException
(cherry picked from commit 1df0453d27e8378065c15878067fc9d2dc961e30)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:28:17 +05:30
Sanjay Tripathi
8676ff26e0 CLOUDSTACK-8066: There is not way to know the size of the snapshot created.
(cherry picked from commit 9153b8bede3350750cb7a78891e0479cc72aa2ec)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-18 17:25:41 +05:30
Rohit Yadav
188924751e CLOUDSTACK-7219: Fix NPE, log warning when config item is missing from scope
- Cherry picked from Daan's fix 63fbd16dd11388bd93cdbec4ea7fe6de37aa7fc5
- Added another check if configDepot returned null
- Removed developer prefill values

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-15 19:13:40 +05:30
Pierre-Yves Ritschard
5ea7414746 move ConstantTimeComparator to utils
(cherry picked from commit b2393c31ed8f689e45227f12371fc042c9dbd0e4)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 20:25:32 +05:30
Pierre-Yves Ritschard
162c5af6f8 Use constant-time comparison functions when checking signatures
This limits the likeliness of timing attacks against the API.
See http://codahale.com/a-lesson-in-timing-attacks/ for the
full rationale.

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

Conflicts:
	server/src/com/cloud/api/ApiServer.java
	server/src/com/cloud/user/AccountManagerImpl.java

(cherry picked from commit 9b4e39e837af498599859c4a6687eb8bf9f8ad89)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 20:25:21 +05:30
Rohit Yadav
921ad057de CLOUDSTACK-8155: Remove unwanted whitespaces from json response
This removes extra whitespaces from the JSON serialized response.
After the fix, tested to work with:
- Present UI
- CloudMonkey
- Old buggy json parsers

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-01-14 02:40:00 +05:30
Wei Zhou
1e8476d38a CLOUDSTACK-8140: CS fails to start after secstorage/consoleproxy.service.offering is set to uuid
(cherry picked from commit 84c44b63140e8acf2336549040bda9c0a8f2ff66)
2015-01-06 10:26:04 +01:00
Koushik Das
e0c495d357 Revert "CLOUDSTACK-7872: network getting shutdown inspite of running VM's in the network"
This reverts commit 0bd34d389f93b56e74a6bb04054c8e419bf8571e.

Network GC is broken with out-of-band VM movements due to the original commit, so reverting.
2014-12-23 11:56:40 +05:30
Koushik Das
788fe5a273 CLOUDSTACK-8103: Vmsync marks VM as stopped even after failing to stop it in HV
During vmsync if StopCommand (issued as part of PowerOff/PowerMissing report) fails to stop VM (since VM is running on HV),
don't transition VM state to "Stopped" in CS db. Also added a check to throw ConcurrentOperationException if vm state is not
"Running" after start operation.
2014-12-22 12:31:34 +05:30
Min Chen
c5d3a73c67 CLOUDSTACK-8101: volume sync not working as expected - MS restart during
upload volume leaves volume in hung state.
2014-12-19 16:43:02 -08:00
Min Chen
3506789b0b CLOUDSTACK-8093:Not able to list shared templates by passing id. 2014-12-18 10:27:20 -08:00
Edison Su
1eb20ee095 if concurrent snapshot happening on the same vm, throw invalid parameter
exception to user.
Reviewed-by: Frank
2014-12-17 14:35:42 -08:00
Edison Su
8f2bd45660 if local storage is in maitenance mode or removed, won't change its
status in case of mgt server restart
Reviewed-by:Frank
2014-12-17 14:34:48 -08:00
Edison Su
50d5d488d4 add event for volume migration
Reviewed-by: Frank
2014-12-17 14:33:54 -08:00
Prachi Damle
01ae7120ac CLOUDSTACK-8078: [Automation] Deletion of Affinity Groups - CloudRuntimeException: No Event Pubish can be wrapped within DB Transaction!
Changes:
-     The event of deleteing an affinity group is published on the MessageBus so that IAM Service can listen and process the event, However the publish operation should not be handled within a DB transaction, since it may take longer and hold the DB transaction for long unnecessarily
-    Publish any events to MessageBus outside of the transaction

Conflicts:
	server/src/org/apache/cloudstack/affinity/AffinityGroupServiceImpl.java
2014-12-17 13:53:11 -08:00
Prachi Damle
a7861aa5fa CLOUDSTACK-8079: If the cluster capacity threshold is reached, HA-enabled VM is not migrated on another host during HA
Changes:
-  When there is HA we try to redeploy the affected vm using regular planners and if that fails we retry using the special planner for HA (which skips checking disable threshold)
Now because of job framework the InsufficientCapacittyException gets masked and the special planners are not called. Job framework needs to be fixed to rethrow the correct exception.
- Also the VM Work Job framework is  not setting the DeploymentPlanner to the VmWorkJob.  So the HA Planner being passed by HAMgr was not getting used.
- Now the job framework sets the planner passed in by any caller of the VM Start operation, to the job
2014-12-17 13:48:24 -08:00
Min Chen
9fb654cbad CLOUDSTACK-8077: Not able to deploy VM using a shared template. 2014-12-16 16:40:37 -08:00
Jayapal
aca0f79592 CLOUDSTACK-8072: Fixed NPE in deleting default ACL items in default ACL 2014-12-15 16:44:08 +05:30
Anshul Gangwar
b07c9b7a9c CLOUDSTACK-8067: Fixed NPEs in MS log related to console proxy VM
(cherry picked from commit 1115bc9cc6ebf2b321bb5a3ff6958d649150cfe5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-12 21:41:38 +05:30
Wei Zhou
76dc20a0ee CLOUDSTACK-255: fix NPE in createPortForwardingRule due to no PortForwarding provider
(cherry picked from commit c9d492d7140dd53f1630bc5ea14b948184233612)
2014-12-12 11:15:08 +01:00
Min Chen
fbe54974c5 CLOUDSTACK-8061: Extracting volume when it is in migrating state causes
both the operations to fail.
2014-12-11 11:36:34 -08:00
Rohit Yadav
e59dac201d CLOUDSTACK-8014: Fix NPE searching including removed templates
Steps to reproduce if you have this issue:
- Create a VM's volume snapshot
- Remove VM's template and mark the template as removed with timestamp in DB
- Restart mgmt server and create a volume out of snapshot you should get NPE

Fix: In `storagePoolHasEnoughSpace`, we're only searching for a VM's volume's
snapshot's template by Id and not including removed templates. This is a corner
case and NPE hits when template has been marked removed for a VM's volume's
template so we should search including removed templates.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit f189c105d8dde5491697b171b969e757f8f15858)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-10 19:30:56 +05:30
Jayapal
8278d88f76 CLOUDSTACK-8030: Updated router to come up egress default ALLOW
On default iptables rules are updated to add ACCEPT egress traffic.
    If the network egress default policy is false, CS remove ACCEPT and adds the DROP rule which
    is egress default rule when there are no other egress rules.

    If the CS network egress default policy is true, CS won't configure any default rule for egress because
    router already came up to accept egress traffic. If there are already egress rules for network then the
    egress rules get applied on VR.

    For isolated network with out firewall service, VR default allows egress traffic (guestnetwork --> public network)
2014-12-10 10:13:41 +05:30
Koushik Das
016d009adf CLOUDSTACK-7994: Network rules are not configured in VR after out-of-band movement due to host crash
The last commit 513adab51b53ba1acdea908225cfffab90ca1595 didn't fully fix it. Scenario #1 was not handled, only #2 was handled.
Fixed #1 as part of this commit.
1. If VM is in stopped state in CS due to 'PowerMissing' report from old host (hostId is null) and then there is a 'PowerOn' report from new host
2. If VM is in running state in CS and there is a 'PowerOn' report from new host
2014-12-09 11:46:45 +05:30
Jayapal
2d7f0c693b CLOUDSTACK-8027: Update error msg for enable static nat 2014-12-05 12:55:41 +05:30
Damodar
7ef0f5507d Attach volume events are not correctly shown in events.
Signed-off-by: Koushik Das <koushik@apache.org>
2014-12-04 20:01:41 +05:30
Sheng Yang
feeafa76a4 CLOUDSTACK-5241: Remove Rot13 cipher 2014-12-03 19:30:31 -08:00
Min Chen
344d98e0bd CLOUDSTACK-7981: added back resource tag related columns to user_vm_view to support resource tag related search. 2014-12-03 09:48:07 -08:00
Sheng Yang
c987080c26 CLOUDSTACK-7999: Always override local keystore file with the entry in DB 2014-12-01 18:59:25 -08:00
Koushik Das
513adab51b CLOUDSTACK-7994: Network rules are not configured in VR after out-of-band movement due to host crash
Ensure that VR is re-booted when it is moved to another host out-of-band. This is necessary to re-program all network rules
2014-12-01 18:09:58 +05:30
Rohit Yadav
5241d0faf8 CLOUDSTACK-7903: Fix build regression from previous fix
The previous fix tried to access StatsCollector from UsageManagerImpl
which is not possible due to dependency cycle.

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

Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2014-12-01 16:39:01 +05:30
Ilia Shakitko
e124781445 CLOUDSTACK-7903: Decreased minimal usage aggregation range value
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 9b907902d2d424bc8b3136d97196457f42738fff)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
2014-12-01 15:55:30 +05:30
Rohit Yadav
d28b716d8a CLOUDSTACK-7989: Ignore Auth API calls in unauthenticated HTTP handlers
If an auth API call (such as login, logout) is called on unauthenticated port
such as the 8096 integration server port, we need to ignore such API calls
as calling auth APIs on 8096 is un-necessary and is undefined.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 21a6bef53b05d430f2cff53ae37033432603136d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-28 15:46:17 +05:30
Harikrishna Patnala
cdfdda2051 CLOUDSTACK-6075: Increase the ram size for router service offering
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 488c17858f17f548d907cd72df54e0abdfd439b2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-11-27 16:05:34 +05:30