Commit Graph

6168 Commits

Author SHA1 Message Date
Prachi Damle e6626973ed CLOUDSTACK-1346: Check to see if external devices are used in the network, is hardcoded for specific devices
- Changes the check to list all providers of a network and check if it is an external provider
2013-02-20 15:36:01 -08:00
Prachi Damle 3c02af0cdf CLOUDSTACK-1344 Typo in use.external.dns setting description
Fixed the typo.
2013-02-20 12:01:22 -08:00
Prachi Damle 20a747601c CLOUDSTACK-1331: Upgrade fails for a 2.2.14 Zone having multiple guest networks using network_tags and Public Vlan
Changes:
-We need to update the physical_network_id for public vlans.
-Physical network ID should be retrieved from the network if present.
2013-02-20 11:25:36 -08:00
Rohit Yadav 7ce22fc2b2 db: Fix commas which should be dots in create-schema, fix debug msg
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 44c8a33cf2)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-20 14:57:05 +05:30
Rohit Yadav 12b439baa6 db: Fix Upgrade40to41 and add cleaning path schema-40to410-cleanup.sql
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 46ab973143)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-20 14:52:37 +05:30
Sheng Yang 81db0c2076 IPv6: Add ipv6 for user vm view 2013-02-19 15:49:24 -08:00
Sheng Yang f3dae81daa IPv6: Add IPv6 for domain router view 2013-02-19 15:49:24 -08:00
Prachi Damle 378827efed CLOUDSTACK-1307 Noticed NPE when we put host in maintenance mode in clustered management setup
Changes:
   - Use of class variable of type GenericSearchBuilder causes issues when multiple threads invoke this method to findCapacity
   - Changing the scope of the variable to be local to these methods.
2013-02-19 15:15:00 -08:00
Rohit Yadav 2c102ca0e5 db: Fix upgrade paths to 4.1.0
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit ca432fe6b7)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-19 14:02:48 +05:30
Prasanna Santhanam b51ee1819a CLOUDSTACK-1320: listroutercmd: response should be set to the name of router
host name of router's resident host returned instead of the name of the
router. correcting the setter.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-02-19 13:23:32 +05:30
Rohit Yadav cb83c23484 ApiServer: Get rid of finding system account and user at init() time
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 8094e933b0)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-17 00:24:58 +05:30
Likitha Shetty ed06c16944 CLOUDSTACK-863: Fix Non-printable characters in api call
Non-printable characters results in empty pages for all users loading the
corrupted object in the web interface. It also results in the API call results
getting truncated with an error when it encounters the non-printable characters.
Every decoded parameter value is checked for control character using OWASP's
ESAPI library.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 87b668b71b)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-16 11:56:50 +05:30
Min Chen 2ee16350dd CLOUDSTACK-1253: Remove @author tag. 2013-02-15 10:40:39 -08:00
Likitha Shetty a6427266bf CLOUDSTACK-1207. UpdateNetwork API fails with NPE if the network offering is not being updated and is non-persistent. 2013-02-15 17:24:59 +05:30
Min Chen 24b48f3119 CLOUDSTACK-1137: force reconnect to a disconnected host throws error. 2013-02-14 17:56:45 -08:00
Sheng Yang 5ec29e9608 CLOUDSTACK-1219, CLOUDSTACK-1220: Fix IPv6 error messages 2013-02-14 16:27:53 -08:00
Min Chen 07ce770e97 CLOUDSTACK-1277: populating transit password field to UserVmJoinVO in
converting from UserVm to UserVmJoinVO.
2013-02-14 12:01:40 -08:00
Wei Zhou f95b3c76e8 CLOUDSTACK-1088: EnableStaticNat error will clear the data in database
The issue occur in two conditions

(1) If I use two sessions or browsers to EnableStaticNat on CloudStack
UI. one is successful, the other is failed. However, there is no ip in
database.

(2) If I use API call EnableStaticNat several times The first time
succeed, the second failed, the third succeed. the result is
success-fail-success-fail-success-fail, which it is not correct.

Reported-by: Wei Zhou <w.zhou@leaseweb.com>
Reviewed-by: https://reviews.apache.org/r/9254/
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-02-14 13:58:07 +05:30
Marcus Sorensen d4d73bfc3f Summary: Fix hanging references to /var/lib/cloud, changed to /var/cloudstack
BUG-ID: CLOUDSTACK-1201
BUG-ID: CLOUDSTACK-1196
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360786749 -0700
2013-02-13 13:31:48 -07:00
Rohit Yadav ce46821b4a CLOUDSTACK-1237: Fix an overriding method that would help find template adapter
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit fcb4b7a6a7)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-13 15:21:24 +05:30
Marcus Sorensen 53ae738d56 Summary: fix cloud-agent KVM calls to cloudstack-agent for centos6.3
BUG-ID: CLOUDSTACK-1234
Bugfix-for: 4.1, master
Reported-by: Rayees Namathponnan
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1360736064 -0700
2013-02-12 23:14:24 -07:00
Sheng Yang 5dbd33d8ab Add missing break to applyRules in FirewallManager
Otherwise it would falling through PortForwarding rule.

Seems like a typo after network refactor.
2013-02-12 20:26:52 -08:00
Sheng Yang 72234efa3e CLOUDSTACK-1242: Fix inline mode
Network refactor dropped many inline mode codes. I've added at least part of
them back. Now I can create LB rule for inline mode.
2013-02-12 20:25:26 -08:00
Rohit Yadav c6b80df289 CLOUDSTACK-1243: Add @Inject to fix NPE in AccountManagerImpl
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit bd034e0b9f)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-12 18:01:43 +05:30
Murali Reddy 513f8b98e9 CLOUDSTACK-1241: Network apply rules logic is broken
added logic to check if the network element is configured service
provider for the network before applying rules
2013-02-12 15:25:07 +05:30
Sheng Yang 4da47c2ffd Fix a typo
CanUseForDeploy() didn't return correct result due to this
2013-02-08 14:41:58 -08:00
Sheng Yang b5860725a1 IPv6: CLOUDSTACK-1107: Add support for createVlanIpRange to extend existed network 2013-02-08 14:41:58 -08:00
Min Chen 94fc648525 CLOUDSTACK-1216: insert UUID when we create "admin" user in DB. 2013-02-08 14:15:15 -08:00
Min Chen ee90b4cad3 CLOUDSTACK-1190: make APIChecker throw one sensible exception. 2013-02-08 11:05:11 -08:00
Murali Reddy 69d24545c4 CLOUDSTACK-1208: Failed to shutdown guest network
Firewall manager was being used instead of LoadBalancingRules manager
while applying the load balancer rules in shut down network. Changing it
to LoadBalancingRules manager.
2013-02-08 18:50:18 +05:30
Rohit Yadav 5d1769335c CLOUDSTACK-1210: Fix pluggable service, apiserver, mgmt server impl, api-discovery
- Mgmt server impl is a pluggable service, fix it's method
- Fix getCommands() to return all cmd api classes supported by this mgmt server
- For api-discovery, get commands from pluggable services only, don't use reflections
- Don't use reflections in ApiServer, iterate pluggableservices
- Fix api discovery unit test
- The fix was done automatically using following python program along with
  following step:

1. Get all apis provided by default mgmt server, all of them are in cloud-api now
   cd api/src/org/apache/cloudstack/api/command
   find . >> apis
2. For all apis, generate java code that adds the class to the cmdList arraylist:
   f = open('apis', 'r')
   data = f.read()
   f.close()
   output = ""
   for a in data.split('\n'):
     output += "cmdList.add(%s);" % a.split('/')[-1].replace('.java', '.class')
   # wrote output to a file, copied content to mgmt server impl's getCommands()
   # similarly, fixed import statements using same code, splitting on /

Testing:
Ran apiserver, put breakpoints in ApiServer's init() where classes are processed
Total cmd classes found by reflections (ReflectUtil) = 354
Total cmd classes found by getCommands for all pluggable services = 354

Next, copied the comma separated values for each set to a string in ipython, a & b
set(a).difference(set(b)) returned null.

The above test implies both set of cmd classes found by both methods, i.e. using
reflections and using getCommands() had same set of apis and all were unique.

Conclusion:
The changes are idempotent and don't break api server's cmd class api discovery
processing.

BUG-ID: CLOUDSTACK-1210

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-08 16:52:04 +05:30
Min Chen f589d61334 Move Api rate limit configurations from xml file to global
configuration, and also modify listCapabilitiesCmd to also return api
limit interval and max for UI consumption.
2013-02-07 23:48:15 -08:00
Murali Reddy 18bf69696c CLOUDSTACK-1178:DB Commit warning logged for every Deploy VM request
removing the regression that introduced premature transaction commit
2013-02-07 13:20:41 +05:30
Mice Xia 15d6609468 CLOUDSTACK-1176 1) remove 'final' modifier from id attribute in SnapshotVO 2) make state setter method comply with convention 2013-02-07 13:42:41 +08:00
Rohit Yadav f95b0edaff CLOUDSTACK-1181: Fix NPE, ignore if default path is not readable, we're passing props file anyway
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 7c003611d0)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-07 11:10:37 +05:30
Sheng Yang 5adcea209d IPv6: One network can have more than one vlan 2013-02-06 20:02:46 -08:00
Sheng Yang 17212984c9 IPv6: CLOUDSTACK-1141: Fix reboot router with IPv6 assigned VM 2013-02-06 13:59:14 -08:00
Marcus Sorensen 87286d0549 Summary: Add missing ResizeVolumeCommand in VmwareResource.java
Submitted-by: hongtu_zang <hongtu_zang@tcloudcomputing.com>
Signed-off-by: Marcus Sorensen <marcus@betterservers.com>
2013-02-06 07:55:11 -07:00
Rohit Yadav 20b74249d5 ApiServer: Ask pluggable services to return list of apis to ApiServer
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-06 16:56:48 +05:30
Rohit Yadav 2e59bcfd7a ManagementServerImpl: Fix NPE, PluggableService should not return null list
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-06 16:56:48 +05:30
Koushik Das 1c88f3c732 CLOUDSTACK-446 : Host going to alert state, if you are adding already added host
Adding an already added host fails with error but in the process incorrectly updates the status of the host to 'Alert'. Put a check to prevent this.
2013-02-06 13:45:48 +05:30
Sheng Yang 659955483d IPv6: CLOUDSTACK-1153: Fix integer overflow on IPv6 address calcuation
Use BigInteger, which is 128 bits long.
2013-02-05 17:41:12 -08:00
Sheng Yang 5c7ab24b85 IPv6: CLOUDSTACK-1113: Fix the mechanism to find the usable IP in the IPv6
The new policy is:
1. Generate a random IP.
2. Find the next available IP, start from the generated IP.
3. If we cannot find an available IP after certain times(10000 by default,
network.ipv6.search.retry.max) retry, give up.
2013-02-05 14:27:05 -08:00
Sheng Yang 22383d7837 IPv6: Fix ip address in range check 2013-02-05 13:21:41 -08:00
Hugo Trippaers 6dabb5b14c Fix the situation where only a gateway and a netmask is passed with the
createNetwork command.(cherry picked from commit f8a22d7520)

Signed-off-by: Hugo Trippaers <trippie@gmail.com>
2013-02-05 21:12:02 +01:00
Hugo Trippaers 3f064ace39 Remove yet another test where the database was not properly mocked. FIXME
(cherry picked from commit 0495f5309e)

Signed-off-by: Hugo Trippaers <trippie@gmail.com>
2013-02-05 21:05:31 +01:00
Kishan Kavala cffa45f710 CLOUDSTACK-1154: Added @Component annotation to RegionServiceImpl and RegionManagerImpl 2013-02-05 17:17:13 +05:30
Kishan Kavala 7970384f6e CLOUDSTACK-786, CLOUDSTACK-1014: Moved usage APIs to cloud-api. Removed ManagementServerExt. Usage API related implementation is added to UsageServiceImpl 2013-02-05 16:43:40 +05:30
Rohit Yadav 07fa69cac5 CLOUDSTACK-1142: Refactor handleRequest definition, clean redundant code
- Get rid of boolean decode arg
- Method assumes that OTW params have been already decoded
- Remove redundant code that tries to decode again based on boolean arg

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
(cherry picked from commit 2b267c1ceb)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-02-05 10:39:20 +05:30
Mice Xia dcb2e5a8ed CLOUDSTACK-1142 Testing LDAP Auth Failed - due to % being illegal character in queryfilter 2013-02-05 11:30:55 +08:00