9094 Commits

Author SHA1 Message Date
wilderrodrigues
4b6604318d generate random password for redundant VPC 2015-03-16 11:40:06 +01:00
wilderrodrigues
ae6b07af15 Fix state of isolated redundant network router
- once stopped, got to UNKNOWN
2015-03-16 11:40:04 +01:00
wilderrodrigues
aa585e3428 Removing trailing spaces 2015-03-16 11:40:04 +01:00
wilderrodrigues
3af2ce3f50 Fix checkSanity. We do not need to check the priority anymore.
- It's taken care by VRRP.

wip: clean up where priority is still used.
2015-03-16 11:40:03 +01:00
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
ca9deb70f6 Fix the router id on the virtural routers
- Using the VPC id, it is reliable.
   - Tested stopping/destroying/creating a router and VRRP is pretty happy
2015-03-16 11:39:59 +01:00
wilderrodrigues
4c9f4fcdd3 Make virtual router id unique per redundant group
Customise the messages showed during VPC restart based on redundancy
Do not show "Make Redundant" option if VPC is already redundant
Show on VPC details if a VPC is redundant
2015-03-16 11:39:58 +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
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
b7a142800d Adding the router priority when the control interface is created
Adding some logging to the check heartbeat script
2015-03-16 11:39:52 +01:00
wilderrodrigues
ae53d5ede1 Fix router priuority using the same logic as the one for the state
Fix the router state. do not show UNKNOW, but MASTER or BACKUP depending on the type of router
Implement the virtual_router_id to be passed as a boot parameter to the router
  - it is needed for the keepalived configuration
2015-03-16 11:39:51 +01:00
wilderrodrigues
a5d6f90f66 Implementing redundant router arguments to add redundant_state
Implementing the arguments on the python side
2015-03-16 11:39:51 +01:00
wilderrodrigues
be81d2ffa4 Fixing guest network interfaces on redundant routers
- The interfaces were messed up because part of the code was still taking inot account a non-redundant path.
2015-03-16 11:39:49 +01:00
wilderrodrigues
edd839ab10 Fix: allow multiple VIFs per Mac Address
Fix: RTNETLINK errors
     - Management Server health check trying to create already existing interface
     - Changes on update_config.py, cs_guestnetwork.py, merger.py
Fix: replace RRouTER_LOG in the CsRedundant.py per log file location
Fix: Guest Net address association during Router restart
     - Changes on NicProfileHelper, NicProfileHelperImpl
Fix: aggregationExecution() method on VirtualNetworkApplianceManagerImpl
     - Do not send an AggregationControlCommand to a non-configured router

Some classes have been formatted.
2015-03-16 11:39:48 +01:00
wilderrodrigues
eee891be3e Fixing getRouters() to make it call the super method.
- after calling super, if we have routers available, do not call the subclass method.
2015-03-16 11:39:18 +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
66d8b1f13d Fixing Site2Site VPN and private gateway on VpcVirtualRouterElement
Fixing Finalize methods in the VpcVirtualNetworkApplianceManager

Making use ot eh RouterControlHelper instead of duplicating methods in the VirtualNetworkApplianceManager

[witp] - redundant vpc virtual routers have the same mac address, have to fix that.
2015-03-16 11:39:16 +01:00
wilderrodrigues
381c0e1c69 Fixing the priority in the setup guest network command
Fixing the deploy router in VPC method

formatting some classes
2015-03-16 11:39:16 +01:00
wilderrodrigues
84bf46dc2f Java: Fixing the redundant flag for the router control nic and the guest network command;
Python: fix the redundant setup in the CsRedundant class
2015-03-16 11:39:15 +01:00
wilderrodrigues
cfbdbd421d Extracting local variable and formatting the code. 2015-03-16 11:39:15 +01:00
wilderrodrigues
64ab2bf8da Fix createSetupGuestNetworkCommand() method in order to pass the value of the getIsRedundantRouter() method instead of false. 2015-03-16 11:39:15 +01:00
wilderrodrigues
8f9f39fa39 [TK-3119] Fix NPEs and improve exception handling + error messages 2015-03-16 11:39:14 +01:00
wilderrodrigues
014b47f6e6 [TK-3113] fixed CloudRuntimeException: NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION! 2015-03-16 11:39:14 +01:00
wilderrodrigues
a51690be4b Formatting the class: it was a mess!
[wip]- will fix the "com.cloud.utils.exception.CloudRuntimeException: NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION!" problem.
2015-03-16 11:39:13 +01:00
wilderrodrigues
ce3c8c755a [TK-3101] Fix VPCVirtualRouterElement
There were more places were the amount of routers is checked.
    Not throwing exception when routers > 1

[wip] - we need to refactor VpcViortualRouterElement in order to cope with methods returning true only for the sake of it.
2015-03-16 11:38:18 +01:00
wilderrodrigues
553bf21b37 [TK-3101] Fix VPCVirtualRouterElement
Iterating through the routers list and adding them to the guest networks
Not throwing exception when routers > 1
2015-03-16 11:38:18 +01:00
Hugo Trippaers
b07ff145b3 Call planDeploymentRouters in the same place as we do in master 2015-03-16 11:38:11 +01:00
Hugo Trippaers
87855d6bb7 Fix a problem where virtual routers were deployed multiple times in a network 2015-03-16 11:38:11 +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
Sander Botman
1237ded02e Fix on error reporting (null doesn't say much, so lets return the actual problem) 2015-03-16 11:35:15 +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
Rajani Karuturi
3de5d9db5f volume upload: Restart of MS leads to loss of browser uploaded templates
on restart of management server, template sync runs. It checks for
templates in ssvm using the uniquename. If it doesnt find any, cleans
the directory. In case of uploaded templates, these are getting saved
using name instead on uniquename and hence template sync cant find them
and does cleanup. Using uniquename in template.properties now.
2015-03-16 12:45:24 +05:30
Bharat Kumar
2783cf540b CLOUDSTACK-7348 InvalidParameter Exception while executing scale vm.
We do not throw the exceptions any more, so added info in the logs to say
what happend to this command.

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
(cherry picked from commit 659edb4d9b64377a52eb587ab07039e6badb604e)
2015-03-16 12:37:45 +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
Min Chen
6ccb9b1fc3 Error message exposes domain Id when deployVirtualMachine() is attempted on a shared network to which the user doesnot have access to.
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 0d36f2e4b520ecc85342ab8660e5547f675db12a)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-13 15:02:26 +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
Koushik Das
47a22e0594 volume-upload: Unable to download template which has been uploaded via POST URL
During upload, POST url is saved in template_store_ref DB table. Now during download, same url is incorrectly returned back.
Fixed the code to cleanup POST url from DB on successful template upload.
2015-03-11 17:55:04 +05:30
Rohit Yadav
05d2b0a707 server: remove unused import in ImageStoreJoinDaoImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-11 17:28:32 +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
Koushik Das
1dae3a4a13 volume-upload: Volume resource count is incremented even for failed and abandoned volumes
Added logic to clean up abandoned and failed volume uploads. This is done as part of storage GC.
2015-03-11 16:24:03 +05:30
Sanjay Tripathi
182d770f9f CLOUDSTACK-8315: CS API listVMSnapshot doesn't have tags ‘project’ and ‘projectid’. 2015-03-11 14:38:57 +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
ec2639e8fb CLOUDSTACK-8248: loadCidrs before sending response
Fixes regression from CLOUDSTACK-6582

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit f9090eacd6432856ca7504ebdfce38d65f8d019d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-06 21:44:28 +05:30
Rohit Yadav
25b0bd620a server: last cherry-picked commit failed to remove code
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-06 21:44:24 +05:30
Laszlo Hornyak
7c1590ffd6 kvm: Check the return value of the cloudstack-setup-agent command
Bug-Url: https://issues.apache.org/jira/browse/CLOUDSTACK-8016
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>

This closes #93
2015-03-04 12:42:14 +05:30
Rajani Karuturi
b16520bcec volume upload: added max size check for temaplte/volume post upload
used the existing configuration variables max.template.iso.size and
storage.max.volume.upload.size for templates and volumes respectively.
2015-03-03 17:27:40 +05:30
Rohit Yadav
ed099c3f96 server: check and set sercure cookie flag only after login
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 0f819f1583116d93ca3ebf460b69cd74144a25b2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-28 18:23:05 +05:30
Rohit Yadav
20bcb4b673 CLOUDSTACK-7063, CLOUDSTACK-7064: Add security headers on HTTP response
- Adds X-XSS-Protection header
- Adds X-Content-Type-Options header
- Fixes to use json content type defined from global settings
- Uses secure cookie if enabled in global settings

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit b6b3494782d8bc1033941b802380ba1d5ebd464c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-28 18:14:49 +05:30
Rohit Yadav
3786aa0e67 server: fix unit test to fix build
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit dd5fb2ebd6904026e2ba0b3efcb6c382f860ffdd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-27 19:19:09 +05:30