5846 Commits

Author SHA1 Message Date
Marcus Sorensen
975021dda1 Summary: adding resizeVolume api call
Detail: This merges the resizevolume feature branch, which provides the
ability to migrate a disk between disk offerings, thereby changing its
size, or specifying a new size if current disk offering is custom.

BUG-ID: CLOUDSTACK-644
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358358209 -0700
2013-01-16 17:43:35 -07:00
Murali Reddy
4b67340d8c Revert "Summary: partical check-in for L4-L7 network services in the
shared"

This reverts commits 0de5a145e4f06420a4eb1867309af674c16ace7c,
28bbf6c52798c9bd298952844250fbc3cb92dce0

Reverting due to IP clearance issues for the commits done as part of CLOUDSTACK-312
2013-01-16 16:43:37 +05:30
Murali Reddy
316c5267cc Revert " Summary: check-in for L4-L7 network services in the shared network in"
This reverts commit 7fcfcdf91e49d64375171c9ae7fe61067aa59b6e.

Reverting due to IP clearance issued for the commit done as part of CLOUDSTACK-312
2013-01-16 16:04:14 +05:30
Murali Reddy
156ed7a336 Revert "Summary: partical check-in for L4-L7 network services in the shared"
Reverting due to IP clearance issued for the commit done as part of
CLOUDSTACK-312

This reverts commit d4c604cfd8ec6b385de7abf694a936e89add0f38.
2013-01-16 15:58:44 +05:30
Murali Reddy
c7840cf91f reverting the earlier commit 432ea9c7d4aff3f7e682f2951f49ed3e95778d9f
done for bug CLOUDSTACK-265 due to IP clearence issues.
2013-01-16 15:10:27 +05:30
Min Chen
8608925216 Consolidate RuntimeCloudException and CloudRuntimeException into one
class CloudRuntimeException, and removed RuntimeCloudException to avoid
confusion.
2013-01-15 18:07:08 -08:00
Sheng Yang
4f889bd426 CLOUDSTACK-985: Make sure RvR would always have same MAC address
Even with newly created RvR using "restartNetwork&cleanup=false" API.
2013-01-15 15:22:41 -08:00
Sheng Yang
c32dbec468 CLOUDSTACK-985: Revert "Using different MAC for a pair of redundant routers"
The different MAC address for a pair of redundant router have issues when short
time network outrage happened. When this happened:

1. BACKUP(r-2) cannot receive the broadcast from MASTER(r-1).
2. Then r-2 would announce it's MASTER after 3 seconds, and send gratuitous ARP
to the gateway of public ip(usually a rack router).
3. The gateway of public ip would update it's ARP cache to associate the public
ip of the network to the MAC of r-2.
4. In the meantime, r-1 still sending out VRRP broadcast(due to network issue,
the broadcast never arrived at r-2), and acting as MASTER.
5. After network outrage, r-2 would receive the higher priority VRRP broadcast
from MASTER again, then receded as BACKUP.
6. But the public gateway would still associate public ip with MAC of r-2, thus
caused the issue. r-1 would no longer able to receive any packets from public
network.

And there is no way for r-1 to send gratuitous ARP again, because it's always
consider itself as MASTER, no state changed, and no hook existed for receiving
lower priority broadcast.

So I would revert this change, and introduce another commit to ensure the newly
create redundant router would share the same MAC as the first one.

This reverts commit 9f257aa60b62f24193bba3f7c902e7779632e01e.
2013-01-15 15:02:21 -08:00
Marcus Sorensen
47251b51a7 Summary: Allow ssh keypairs to be created if developer flag set and user ! cloud
Detail: Previously in the code we allowed the configuration to create ssh
keypairs and put them in the configuration table so that systemvms could have
ssh key auth and work properly if the user was 'cloud' or if the developer
configuration item was set to true. It got changed to requiring both the cloud
user and the developer flag (using an || on a negative) somwhere along the way.
This changes it back to && on a negative to allow us to run as non-cloud users
with the dev flag set, and for cloud to deploy properly without the developer
flag.

Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1358285190 -0700
2013-01-15 14:53:28 -07:00
Min Chen
7f1486e2dc We need to catch PermissionDeniedException in checking if command is
available to an user.
2013-01-15 11:43:59 -08:00
anthony
a6b9027630 default Security rule doesn't apply to system VMs since nic.getIsolationUri is not set
use to.setSecurityGroupEnabled to indicate if securitygroup is enabled on this NIC

CLOUDSTACK-983: default Security rule doesn't apply to system VMs
2013-01-15 11:15:42 -08:00
anthony
101f64410a Do not allow add multiple VLANs or subnets into shared network
CS allows to add multiple VLANs and subnets to a shared network, but it doesn't really work, for example , vm on second VLAN or subnet cannot get IP through DHCP
This patch will not allow to add mulitple VLANS or subnets into shared network

CLOUDSTACK-982:Do not allow add multiple VLANs or subnets into shared network
2013-01-15 09:17:12 -08:00
Wido den Hollander
510450b11b Remove duplicate systemUse clausule when fetching service offerings.
A couple of lines back there is:

        if (isSystem != null) {
            sc.addAnd("systemUse", SearchCriteria.Op.EQ, isSystem);
        }

So it was set redundantly, this can be removed.
2013-01-15 12:14:57 +01:00
Rohit Yadav
bca2c928e8 PluggableService: Fix interface definition
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 19:01:26 -08:00
Rohit Yadav
8f27c711e5 ApiServer: Process through chain of api access checker, on failure it will throw exception
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 19:01:26 -08:00
anthony
3aba867e16 only basic network is pod based.
it has nothing to do with shared SG enabled netwokr
2013-01-14 18:29:09 -08:00
Rohit Yadav
896e505da6 APIChecker: Make interface generic, pass user and not just role
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-14 15:08:45 -08:00
Rohit Yadav
ad063ed610 StaticRoleBasedAPIAccessChecker: Throw exception on failed check
Plugin should not be responsible for existence of checking an API, this was wrong.
Throw exception boldly when checkAccess fails.

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 19:24:11 -08:00
Rohit Yadav
0dca44efe8 ApiServer: Debug messages, don't spam with info, remove identity helper in ResponseGenerator
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
83e7214b02 ConsoleProxyManagerImpl: Get rid of IdentityDao
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
8eba0ee0bb ApiDispatcher: Remove helper method that proxies via ApiResponseHelper to get entity by IdentityDao
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:20 -08:00
Rohit Yadav
8cdb40a416 NetworkManagerImpl: Add method to getNetwork by uuid
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Rohit Yadav
24687973a8 ApiServer: Get rid of IdentityDao, reuse domain manager to get domain id
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Rohit Yadav
31dd412626 DomainService: Fix getDomain by uuid string
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-11 18:44:19 -08:00
Rohit Yadav
74bb043c37 APIChecker: Rename refactor and add interface checkExistence
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 18:51:30 -08:00
Rohit Yadav
e63e352508 ApiServer: Log a better message if api access fails and debug it
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 16:08:16 -08:00
Rohit Yadav
8f26e171e6 ManagementServerImpl: Fix missing import of PropertiesUtil
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:02 -08:00
Rohit Yadav
c4e890c55d PluggableService: Refactor method to return map of key value pairs
- Makes plugins self contained so they decide their properties file format
- PluggableService creates the contract that implementing entity will return a
  properties map which is apiname:rolemask (both are strings)

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:02 -08:00
Rohit Yadav
a56f355ceb ApiServer: get role type from account manager using account
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:01 -08:00
Rohit Yadav
1425736c19 AccountManager: Add method to translate account type to role type
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 15:55:01 -08:00
Rohit Yadav
62a42723f9 APIAccessChecker: Make it check based on role type and not user
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-10 11:49:15 -08:00
Kishan Kavala
cd7f771615 CLOUDSTACK-721: Fixed network usage. Send network usage command for isolated guest nic of non VPC VR. Send network usage command for public nic in VPC VR. 2013-01-10 14:56:11 +05:30
Min Chen
7f8262d45e Remove IdentityProxy and IdentityTypeAdapter class.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 17:40:58 -08:00
Rohit Yadav
657fb6ac0b ApiServer: Don't depend on plugin for apiname:cmd class mapping
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:20:46 -08:00
Rohit Yadav
72693ea382 server: Fix ApiServer init method, we won't use cfg files and it's not used there
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 17:20:46 -08:00
Min Chen
9924b64830 commit 3a3cb60e85c0254ebceff55d0b210ca1ff5386a6
Author: Likitha Shetty <likitha.shetty@citrix.com>
Date:   Wed Jan 9 11:54:25 2013 +0530

    CLOUDSTACK-614: ListTemplates API is not returning "Enable SSH Key" attribute for any given template. Update the TemplateResponse by adding 'sshkeyenabled' attribute to it. This attribute is set to the value that the user passes as input for parameter 'sshkeyenabled' while registering the template.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-09 10:42:44 -08:00
Rohit Yadav
0b0752f047 CLOUDSTACK-932: Fix incorrect param that caused casting error while processing api
Reported-by: Kishan Kavala <kishan.kavala@citrix.com>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 04:47:53 -08:00
Rohit Yadav
fc92f04c6b ApiDispatcher: Remove unused methods which were for acl processing
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 04:18:35 -08:00
Rohit Yadav
765504c070 ApiServer: Fix apidiscovery fail case, fix comment
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-09 04:18:35 -08:00
Rohit Yadav
2c04dad529 ApiDiscovery: New plugin to help discover apis on mgmt server
- Introduces api/discovery plugin that helps discover apis on the mgmt server
- It's a pluggable service, therefore has it's own api-discovery_commands.properties
  where the discovery api, listApi can be blacklisted (by removing it), or it's
  role mask can be changed
- By default its response has all the apis
- Changes in other parts of the code to make it work, viz. components.xml, pom.xml,
  and in ApiServer where it is used as an adapter to get apiname, cmd mappings

The ApiDiscoveryService interface is a contract that the implementing class will
provide:

1. A means to get all the apis as a list of response, plugin is free to implement
   the response class, as long as it extends on the BaseResponse:

    ListResponse<? extends BaseResponse> listApis();

2. Provides a map of apiname as the key and cmd class as the value:

    Map<String, Class<?>> getApiNameCmdClassMapping();

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 18:54:29 -08:00
Rohit Yadav
d760271945 ApiDispatcher: Get rid of reflections, reuse utils' ReflectUtil
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 18:54:29 -08:00
Rohit Yadav
539d94b4a6 ApiXmlDocWriter: Reuse methods from ReflectUtil
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-08 18:54:29 -08:00
Min Chen
d22229eb9d Remove updateUuids code in ConfigurationServerImpl (which is not the
right approach to populate uuid column since it will impact upgrade as
well), and populate UUID column in seed data sql script.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-08 17:12:14 -08:00
Min Chen
74c15a22a0 Create DB view for ListStoragePools API performance optimization.
Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-08 12:33:18 -08:00
Min Chen
0894822651 DB view dao cleanup, and introduce global configuration parameter for
entity detail batch query size to remove hard-coded
VM_DETAILS_BATCH_SIZE.

Signed-off-by: Min Chen <min.chen@citrix.com>
2013-01-07 16:40:31 -08:00
Rohit Yadav
a948a89378 Sync updates: Merge branch 'master' into api_refactoring
Conflicts:
	server/src/com/cloud/api/commands/AddTrafficMonitorCmd.java
	server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-07 10:38:43 -08:00
Min Chen
13de3ca253 Enable default sorting for listVirtualMachines and listRouters to keep
back compatible.
2013-01-07 10:26:33 -08:00
Koushik Das
3ffbc4320a CLOUDSTACK-595 : Recreate root volume scenarios doesn't work in vmware
Issue seen during system vm template upgrade and restoreVM command
scenarios for vmware. In these cases CS tries to recreate root disk with
same name as the existing one, in case of vmware this results in creation
of vmdk file with same name for both existing and new root volume.
This results in undesired behavior when storage cleanup thread tries to
cleanup old volume. Made the vmdk file name unique by adding the volume
id to it. This will ensure that during volume recreation in the scenarios
mentioned vmdk will get created with a new name and there will be
no undesired side effects of running the storage cleanup thread.
2013-01-07 16:18:05 +05:30
Kishan Kavala
5502f4b20c Corrected response object in Traffic Monitor APIs Implementation annontation as TrafficMonitorResponse 2013-01-07 12:32:24 +05:30
Rohit Yadav
39b829bffe api: ACL annotation and checkAccess removal refactor for StopVMCmd
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
2013-01-06 17:19:49 -08:00