392 Commits

Author SHA1 Message Date
Rohit Yadav
9555492b4d Merge branch '4.9' 2016-08-23 14:16:53 +05:30
Rohit Yadav
f13c224da1 Updating pom.xml version numbers for release 4.9.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-19 13:53:39 +05:30
Will Stevens
62aa3b2bfa Updating pom.xml version numbers for release 4.10.0-SNAPSHOT
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-29 10:11:34 -04:00
Will Stevens
227ff3884d Updating pom.xml version numbers for release 4.9.0
Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-07-25 16:56:04 -04:00
Will Stevens
3c800b4bfe Merge pull request #1518 from nvazquez/testnfs
CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts## Description
JIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9368
This pull request address a problem introduced in #1361 in which NFS version couldn't be changed after hosts resources were configured on startup (for hosts using `VmwareResource`), and as host parameters didn't include `nfs.version` key, it was set `null`.

## Proposed solution
In this proposed solution `nfsVersion` would be passed in `NfsTO` through `CopyCommand` to `VmwareResource`, who will check if NFS version is still configured or not. If not, it will use the one sent in the command and will set it to its storage processor and storage handler. After those setups, it will proceed executing command.

* pr/1518:
  CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-25 23:05:07 -04:00
Will Stevens
6a6e164448 Merge pull request #1360 from greenqloud/pr-refactor-system-vm-network-creation
Refactor system VM default network creationTwo small commits which moves the retrieval of the default network for the console proxy and the SSVM into a separate protected method. It's a small change that makes the code more readable/maintainable and also makes the class more suitable for overriding should one want to do this. It's forward-ported from our 4.2 branch.

No new tests since this should not change any functionality, and thus should be covered by the existing unit tests.

Now on the master branch (#1359 was on the wrong branch).

* pr/1360:
  Refactor ssvm default network retrieval.
  Refactor console proxy default network retrieval.

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-25 23:03:32 -04:00
Nick Livens
02c5d44f0b Dynamic loading of DB driver + support for other DB providers 2016-05-23 15:50:28 +02:00
nvazquez
2d2819974e CLOUDSTACK-9368: Fix for Support configurable NFS version for Secondary Storage mounts 2016-05-20 07:31:16 -07:00
Will Stevens
88cd182272 Forward merged 4.8 to master and fixed conflicts in #1331 2016-05-19 12:08:08 -04:00
Will Stevens
8f330b0b92 Merge release branch 4.7 to 4.8
* 4.7:
  Fix Sync of template.properties in Swift
  Configure rVPC for router.redundant.vrrp.interval advert_int setting
  Have rVPCs use the router.redundant.vrrp.interval setting
  Resolve conflict as forceencap is already in master
  Split the cidr lists so we won't hit the iptables-resture limits
  Check the existence of 'forceencap' parameter before use
  Do not load previous firewall rules as we replace everyhing anyway
  Wait for dnsmasq to finish restart
  Remove duplicate spaces, and thus duplicate rules.
  Restore iptables at once using iptables-restore instead of calling iptables numerous times
  Add iptables copnversion script.
2016-05-18 15:54:32 -04:00
Syed
f5ac8ddded Fix Sync of template.properties in Swift 2016-05-13 22:08:16 +00:00
Rohit Yadav
4347776ac6 CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker
This feature allows root administrators to define new roles and associate API
permissions to them.

A limited form of role-based access control for the CloudStack management server
API is provided through a properties file, commands.properties, embedded in the
WAR distribution. Therefore, customizing API permissions requires unpacking the
distribution and modifying this file consistently on all servers. The old system
also does not permit the specification of additional roles.

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack

DB-Backed Dynamic Role Based API Access Checker for CloudStack brings following
changes, features and use-cases:
- Moves the API access definitions from commands.properties to the mgmt server DB
- Allows defining custom roles (such as a read-only ROOT admin) beyond the
  current set of four (4) roles
- All roles will resolve to one of the four known roles types (Admin, Resource
  Admin, Domain Admin and User) which maintains this association by requiring
  all new defined roles to specify a role type.
- Allows changes to roles and API permissions per role at runtime including additions or
  removal of roles and/or modifications of permissions, without the need
  of restarting management server(s)

Upgrade/installation notes:
- The feature will be enabled by default for new installations, existing
  deployments will continue to use the older static role based api access checker
  with an option to enable this feature
- During fresh installation or upgrade, the upgrade paths will add four default
  roles based on the four default role types
- For ease of migration, at the time of upgrade commands.properties will be used
  to add existing set of permissions to the default roles. cloud.account
  will have a new role_id column which will be populated based on default roles
  as well

Dynamic-roles migration tool: scripts/util/migrate-dynamicroles.py
- Allows admins to migrate to the dynamic role based checker at a future date
- Performs a harder one-way migrate and update
- Migrates rules from existing commands.properties file into db and deprecates it
- Enables an internal hidden switch to enable dynamic role based checker feature

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-05-11 09:45:19 +05:30
Daan Hoogland
101668994d further maven dependency updates from Daan
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-22 16:36:37 +05:30
Rohit Yadav
bb29b1d063 maven: Upgrade dependency versions
Updated most dependencies to latest minor releases, EXCEPT:

- Gson 2.x
- Major spring framework version
- Servlet version
- Embedded jetty version
- Mockito version (beta)
- Mysql lib minor version upgrade (breaks mysql-ha plugin)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-22 16:20:16 +05:30
Will Stevens
f530a4c63a Merge pull request #1200 from koushik-das/CLOUDSTACK-9130
CLOUDSTACK-9130: Make RebootCommand similar to start/stop/migrate agent commands w.r.t. "execute in sequence" flag

RebootCommand now behaves in the same way as start/stop/migrate agent commands w.r.t. to sequential/parallel execution.

* pr/1200:
  CLOUDSTACK-9130: Make RebootCommand similar to start/stop/migrate agent commands w.r.t. "execute in sequence" flag RebootCommand now behaves in the same way as start/stop/migrate agent commands w.r.t. to sequential/parallel execution.

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-04-21 16:35:27 -04:00
jeff
897187515b Refactor ssvm default network retrieval.
It is now broken into separate methods based on zone. Each zone type
(basic, advanced) has its own method to select the default network
when starting the VM.
2016-03-31 10:41:43 +00:00
weingartner
b3de01a8dc Fix findbugs slow build 3455 2016-03-13 10:16:47 -03:00
nvazquez
db3e18df31 CLOUDSTACK-9252: Last refactor, passing nfs version to ssvm 2016-02-15 08:13:22 -08:00
nvazquez
64c6debf00 CLOUDSTACK-9252: Little refactor 2016-02-05 06:56:08 -08:00
nvazquez
3fb18bd494 CLOUDSTACK-9252: New refactor 2016-02-03 07:08:39 -08:00
nvazquez
cc50c20b4b CLOUDSTACK-9252: Remove static dependencies, refactor 2016-02-01 12:58:51 -08:00
nvazquez
76dc2705b7 CLOUDSTACK-9252: Remove duplicates getNfsVersion, refactor 2016-02-01 12:50:58 -08:00
nvazquez
e524f65570 CLOUDSTACK-9252: Support configurable nfs version 2016-02-01 12:50:58 -08:00
nvazquez
0bc1b2727a CLOUDSTACK-9252: Add nfs version to commands 2016-02-01 12:50:58 -08:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
a4ac9d3fff Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:33:56 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
8f5a2920e8 Updating pom.xml version numbers for release 4.8.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 22:09:31 +01:00
Remi Bergsma
5b112408c7 Updating pom.xml version numbers for release 4.7.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-21 19:55:04 +01:00
Remi Bergsma
2f26a859a9 Updating pom.xml version numbers for release 4.7.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-13 21:09:53 +01:00
Koushik Das
5b3ffeb6cd CLOUDSTACK-9130: Make RebootCommand similar to start/stop/migrate agent commands w.r.t. "execute in sequence" flag
RebootCommand now behaves in the same way as start/stop/migrate agent commands w.r.t. to sequential/parallel execution.
2015-12-09 15:19:10 +05:30
Daan Hoogland
afe1130920 Merge pull request #1057 from DaanHoogland/CWE-190
Cwe 190coverity warnings of this type adressed. Some where dismissed and maybe with reason but it seemed possible to remove them and hence obligatory ;p

* pr/1057:
  move back to original contract of isNetworksOverlap()
  Changed the behavior of methods that use NetUtils.cidrToLong(String)
  CWE-190 unit test for extremes of long netMaskFromCidr(long)
  CWE-190 netmask as long form cidr-size as method
  CID-1116482 cidrToLong cleanup of bitshift problem
  CID-1116483 cidr to netmask bitshifts guarded with casts
  CID-1116484 cast to long and use long as cidrsize type  and simpel test
  CID-1116485: cast cidr during bit shifting  and simple test included
  CID-1175714 casts before bit shift

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-06 20:10:57 +01:00
Remi Bergsma
4ecfc29267 Merge release branch 4.6 to master
* 4.6:
  Use version for RC branch name instead of branch
  make sure all files are updates with new version
  Update L10N resource files with 4.6 strings from Transifex (20151129)
  Fix secondary storage not working with swift
  CLOUDSTACK-9083: Add disk serial to kvm virt xml
2015-11-30 22:30:52 +01:00
Syed
1e67a5d2c8 Fix secondary storage not working with swift 2015-11-27 13:48:18 -05:00
Daan Hoogland
329b3a5611 CID-1339965 handle retrun value on failure 2015-11-27 10:30:11 +01:00
cirstofolini
1a64c247ad Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses. 2015-11-21 18:31:11 -02:00
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +01:00
Daan Hoogland
b5625c05d0 CID-1175714 casts before bit shift 2015-11-16 18:25:31 +01:00
Remi Bergsma
33fb5efd0c more poms didn't get updated with script 2015-11-15 21:07:45 +01:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Remi Bergsma
b38c3bed0c Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-13 21:27:57 +01:00
Remi Bergsma
e31ade03c6 Updating pom.xml version numbers for release 4.6.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 15:45:34 +01:00
Rohit Yadav
8922707076 CLOUDSTACK-9019: Add storage network offering in ssvm only if storage network is defined
During creation of SSVM, checks and adds NetworkOffering.SystemStorageNetwork to
offerings only if storage network exists for the target datacenter

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-03 13:47:23 +05:30
Rajani Karuturi
1056171aca CLOUDSTACK-8808: Successfully registered VHD template is downloaded
again due to missing virtualsize property in template.properties

We have multiple file processors to process different types of image
formats. The processor interface has two methods getVirtualSize() and
process().

    1. getVirtualSize() as the name says, returns the virtual size of
the file and is used at get the size while copying files from NFS to s3
    2. process() returns FormatInfo struct which has fileType, size,
virutalSize, filename.  on successfully downloading a template, each
file is passed to all the processors.process() and whichever returns a
FormatInfo, that will be used to create template.properties file.  If
process() throws an InternalErrorException, template installation fails.
But, if process() returns null, template registration is successful with
template.properties missing some attributes like virtualSize, file
format etc. which results in this bug on restart of ssvm/cloud
service/management server.

failing the template download if virutalsize or some other properties
cannot be determined.

The following changes are done:
getVirtualSize() to always return size(if it can calculate, get virtual
size else return file size). This would mean the following changes

    1. QCOW2Processor.getVirtualSize() to return file size if virtual
size calculation fails
    2. VHDProcessor.getVirtualSize() to return file size if virtual size
calculation fails

process() to throw InternalErrorException if virtual size calculation
fails or any other exceptions occur. This would mean the following
changes

    1. OVAProcessor to throw InternalErrorException if untar fails
    2. QCOW2Processor to throw InternalErrorException if virtual size
calculation fails
    3. VHDProcessor to throw InternalErrorException if virtual size
calculation fails
2015-09-30 15:43:51 +05:30
Boris Schrijver
4a770fc63a Fixed Findbugs issue introduced by 1c6378ec0056e8c75990a4a0c15e99b2df162a75 PR #795. 2015-09-14 10:56:11 +02:00
Boris Schrijver
1971614e31 Added QCOW2 virtual size checking for S3.
- Cleaned up S3TemplateDownloader
- Created static QCOW2 utils class.
- Reformatted some parts of DownloadManagerImpl
2015-09-10 16:45:48 +02:00
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Wei Zhou
0f70833dd8 CLOUDSTACK-8783: specify ciphersuite SSL_DH_anon_WITH_3DES_EDE_CBC_SHA in MockServerTest.java 2015-08-28 12:25:00 +02:00