Commit Graph

9033 Commits

Author SHA1 Message Date
Rohit Yadav ca99603321 server: NPE checks and improved case checking
- pool allocation checks for both root and data disks
- NPE checks to not add null object in collection or try to migrate null VM
- HA work tries need to increment and be given up when max retries are crossed
- VM creation should check IP address format for IPv4 and IPv6
- If userdata is not supported by a network, then fail early if userdata, ssh key,
  or password enabled template is passed/used

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 24435dd6bc)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:37:03 +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 752d784d92)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:36:52 +05:30
Wido den Hollander 9836ccdcf3 CLOUDSTACK-8313: Allow overprovisioning of local storage pools 2015-04-14 17:30:27 +02:00
Rohit Yadav c0d3e6f5e8 server: ignore params signatureversion and expires when validating API args
(cherry picked from commit d361bf6847)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 16:52:32 +05:30
Sanjay Tripathi 30604e973a CLOUDSTACK-8386: CS is returning sec. storage even if it is full and there are other sec. storage with free space. 2015-04-14 16:10:40 +05:30
Rohit Yadav a07497b373 server: fix NPE case in VolumeApiServiceImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit df934c9541)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:47:51 +05:30
Rohit Yadav 74e0a5f9ec server: fix system account create logs
Don't output scary message, avoid logging network_group table not found and
log sane messages if system/admin account/user already exist.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 5599dee90d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:47:36 +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
Sanjay Tripathi 5f59091418 CLOUDSTACK-8350: Volume attachment failed when user stops the VM during attaching DISK. 2015-03-27 15:26:32 +05:30
Daan Hoogland 6a821730ce Boolean -> boolean 2015-03-25 22:20:40 +01:00
Daan Hoogland 048212b117 findbugs: Boolen function should not return null 2015-03-25 21:46:47 +01:00
Daan Hoogland 05099734fb findbugs: removed redundant null check 2015-03-25 18:12:42 +01:00
Daan Hoogland c49273e3ab findbugs: to many lines removed in last commit 2015-03-25 17:55:11 +01:00
Daan Hoogland 8957dffc0d findbugs: dead store / unused locals removed 2015-03-25 17:54:12 +01:00
Daan Hoogland 61e38a188b findbugs: use explicit default charset encoding 2015-03-25 17:50:29 +01:00
Damodar 27fa8a9453 CLOUDSTACK-7948: Two VOLUME.DELETE Events are being registered instead of one - On Destroying a User VM belonging to a Project 2015-03-23 16:27:21 +05:30
Amogh Vasekar 35b741a1c9 excluded plain text authenticator
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-03-23 11:59:47 +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
Rajani Karuturi e4fe7b3bbc Fixed build failure due to commit 843f6b1691
(cherry picked from commit 31cdb57e6b)
2015-03-17 10:34:00 +05:30
Ian Southam c38f0b91e3 Disable this for now - causes too much grief
Is also the root cause of the status UNKNOWN
2015-03-16 11:40:10 +01:00
wilderrodrigues 8edeca179b Remove the priority checks from the code
- We do not use it anymore
2015-03-16 11:40:09 +01:00
wilderrodrigues 962a62ed5f During the merge I removed by mistake the @Inject tag 2015-03-16 11:40:07 +01:00
wilderrodrigues 20d9715816 One of the routers is not running, so we don't have to continue here since the host will be null any way. Also, there is no need
To check either for sanity of duplicate master. Thus, just update the state and get lost.
2015-03-16 11:40:07 +01:00
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