29932 Commits

Author SHA1 Message Date
nvazquez
2e77496601 CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS version changeable in UI 2016-09-28 08:51:37 -07:00
Rohit Yadav
3a82636b90
Merge pull request #1602 from nvazquez/clonegranular
CLOUDSTACK-9422: Granular 'vmware.create.full.clone' as Primary Storage setting### Introduction

For VMware, It is possible to decide creating VMs as full clones on ESX HV, adjusting `vmware.create.full.clone` global setting. We would like to introduce this property as a primary storage detail, and use its value instead of global setting's value.

We propose introducing `fullCloneFlag` on `PrimaryDataStoreTO` sent on `CopyCommand`. This way we can reconfigure `VmwareStorageProcessor` and `VmwareStorageSubsystemCommandHandler` similar as it was done for `nfsVersion` but refactoring it to be more general.

* pr/1602:
  CLOUDSTACK-9422: Granular VMware vms creation as full clones on HV

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-21 16:41:35 +05:30
Rajani Karuturi
43f82c991c Merge release branch 4.9 to master
* 4.9:
  fix egress rule incorrect behavior
2016-09-21 15:00:30 +05:30
Rajani Karuturi
cc043e9f8f Merge pull request #1666 from murali-reddy/egress_rules
CLOUDSTACK-9480,  CLOUDSTACK-9495 fix egress rule incorrect behaviorWhen 'default egress policy' is set to 'allow' in the network offering, any egress rule that is added will 'deny' the traffic overriding the default behaviour.

Conversely, when 'default egress policy' is set to 'deny' in the network offering, any egress rule that is added will 'allow' the traffic overriding the default behaviour.

While this works for 'tcp', 'udp' as expected, for 'icmp' protocol its always set to ALLOW. This patch keeps all protocols behaviour consistent.

Results of running test/integration/component/test_egress_fw_rules.py.  With out the patch test_02_egress_fr2 test was failing. This patch fixes the test_02_egress_fr2  scenario.
-----------------------------------------------------------------------------------------------------
Test By-default the communication from guest n/w to public n/w is NOT allowed. ... === TestName: test_01_1_egress_fr1 | Status : SUCCESS ===
ok
Test By-default the communication from guest n/w to public n/w is allowed. ... === TestName: test_01_egress_fr1 | Status : SUCCESS ===
ok
Test Allow Communication using Egress rule with CIDR + Port Range + Protocol. ... === TestName: test_02_1_egress_fr2 | Status : SUCCESS ===
ok
Test Allow Communication using Egress rule with CIDR + Port Range + Protocol. ... === TestName: test_02_egress_fr2 | Status : SUCCESS ===
ok
Test Communication blocked with network that is other than specified ... === TestName: test_03_1_egress_fr3 | Status : SUCCESS ===
ok
Test Communication blocked with network that is other than specified ... === TestName: test_03_egress_fr3 | Status : SUCCESS ===
ok
Test Create Egress rule and check the Firewall_Rules DB table ... === TestName: test_04_1_egress_fr4 | Status : SUCCESS ===
ok
Test Create Egress rule and check the Firewall_Rules DB table ... === TestName: test_04_egress_fr4 | Status : SUCCESS ===
ok
Test Create Egress rule and check the IP tables ... SKIP: Skip
Test Create Egress rule and check the IP tables ... SKIP: Skip
Test Create Egress rule without CIDR ... === TestName: test_06_1_egress_fr6 | Status : SUCCESS ===
ok
Test Create Egress rule without CIDR ... === TestName: test_06_egress_fr6 | Status : SUCCESS ===
ok
Test Create Egress rule without End Port ... === TestName: test_07_1_egress_fr7 | Status : EXCEPTION ===
ERROR
Test Create Egress rule without End Port ... === TestName: test_07_egress_fr7 | Status : SUCCESS ===
ok
Test Port Forwarding and Egress Conflict ... SKIP: Skip
Test Port Forwarding and Egress Conflict ... SKIP: Skip
Test Delete Egress rule ... === TestName: test_09_1_egress_fr9 | Status : SUCCESS ===
ok
Test Delete Egress rule ... === TestName: test_09_egress_fr9 | Status : SUCCESS ===
ok
Test Invalid CIDR and Invalid Port ranges ... === TestName: test_10_1_egress_fr10 | Status : SUCCESS ===
ok
Test Invalid CIDR and Invalid Port ranges ... === TestName: test_10_egress_fr10 | Status : SUCCESS ===
ok
Test Regression on Firewall + PF + LB + SNAT ... === TestName: test_11_1_egress_fr11 | Status : SUCCESS ===
ok
Test Regression on Firewall + PF + LB + SNAT ... === TestName: test_11_egress_fr11 | Status : SUCCESS ===
ok
Test Reboot Router ... === TestName: test_12_1_egress_fr12 | Status : SUCCESS ===
ok
Test Reboot Router ... === TestName: test_12_egress_fr12 | Status : EXCEPTION ===
ERROR
Test Redundant Router : Master failover ... === TestName: test_13_1_egress_fr13 | Status : SUCCESS ===
ok
Test Redundant Router : Master failover ... === TestName: test_13_egress_fr13 | Status : SUCCESS ===
ok
-----------------------------------------------------------------------------------------------------

* pr/1666:
  fix egress rule incorrect behavior

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-21 14:54:31 +05:30
Murali Reddy
a43abbe47b fix egress rule incorrect behavior
CLOUDSTACK-9480: Egress Firewall: Incorrect use of Allow/Deny for ICMP

     fix ensures, ICMP, TCP, UDP are handled similalry w.r.t egress rule action

CLOUDSTACK-9495: Egress rules functionalty broken when protocol=all specified

     when protocol=all specified, CIDR was ignored. Fix ensures if CIDR is specified
     its always used in configuring iptable rules

 2 new test cased to test /32 CIDR
2016-09-20 16:56:06 +05:30
Rajani Karuturi
3f6faeb4c3 Merge pull request #1645 from myENA/feature/convert_rbd_to_qcow
On snapshot backup, this converts the rbd raw format on disk to qcow2 for compression.

* pr/1645:
  CLOUDSTACK-9461

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-16 15:08:12 +05:30
Rajani Karuturi
87ef813753 Merge pull request #1661 from greenqloud/pr-zone-ids-action-events
Export UUID for zone creation event completion.Action events have support for exporting their "first class entities" over the event bus, if it's turned on. This works mostly for BaseAsyncCmds and any synchronous command that operates on already-existing entities. They are populated by the ApiServer and found by ActionEventUtils.

Where it tends to falter is when dealing with synchronous creation commands. This commit makes createZone export the zone UUID over the event bus once the zone has been created.

* pr/1661:
  Export UUID for zone creation event completion.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-14 21:24:33 +05:30
nvazquez
bb275a5ad1 CLOUDSTACK-9422: Granular VMware vms creation as full clones on HV 2016-09-13 09:59:04 -07:00
Rajani Karuturi
f21477a178 Merge pull request #1671 from mike-tutkowski/copy-vol-migration
Adding support for cross-cluster storage migration for managed storage when using XenServerThis PR adds support for cross-cluster storage migration of VMs that make use of managed storage with XenServer.

Managed storage is when you have a 1:1 mapping between a virtual disk and a volume on a SAN (in the case of XenServer, an SR is placed on this SAN volume and a single virtual disk placed in the SR).

Managed storage allows features such as storage QoS and SAN-side snapshots to work (sort of analogous to VMware VVols).

This PR focuses on enabling VMs that are using managed storage to be migrated across XenServer clusters.

I have successfully run the following tests on this branch:

TestVolumes.py
TestSnapshots.py
TestVMSnapshots.py
TestAddRemoveHosts.py
TestVMMigrationWithStorage.py (which is a new test that is being added with this PR)

* pr/1671:
  Adding support for cross-cluster storage migration for managed storage when using XenServer

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-13 17:40:12 +05:30
Koushik Das
f31d2ddce9 Merge pull request #1560 from nvazquez/gcbug
CLOUDSTACK-9386: DS template copies dont get deleted in VMware ESXi with multiple clusters and zone wide storageJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9386

### Introduction
In some production environments with multiple clusters it was noticed that unused templates were consuming too much storage. It was discovered that template cleanup was not deleting marked templates on ESXi.

### Description of the problem
Suppose we have multiple clusters `(c1, c2,...,cN)` on a data center and template `T` from which we deploy vms on `c1.`
Suppose now that we expunge those vms, and there's no other vm instance from template `T,` so this was the actual workflow:

1. CloudStack marks template for cleanup after `storage.cleanup.interval` seconds, by setting `marked_for_gc = 1` on `template_spool_ref` table, for that template.

2. After another `storage.cleanup.interval` seconds a `DestroyCommand` will be sent, to delete template from primary storage

3. On `VmwareResource`, command is processed, and it first picks up a random cluster, say `ci != c1` to look for vm template (using volume's path) and destroy it. But, as template was on `c1` it cannot be found, so it won't be deleted. Entry on `template_spool_ref` is deleted but not the actual template on hypervisor side.

### Proposed solution
We propose a way to attack problem shown in point 3, by not picking up a random cluster to look for vm but using vSphere data center. This way we make sure vm template will be deleted in every case, and not depending on random cluster selection

* pr/1560:
  CLOUDSTACK-9386: Find vm on datacenter instead of randomly choosing a cluster

Signed-off-by: Koushik Das <koushik@apache.org>
2016-09-13 14:43:34 +05:30
Will Stevens
6b9cd2832b Merge pull request #1658 from swill/api_diff_gen
Added an additional JSON diff output to the ApiXmlDocReaderThe original TXT diff format is very hard to work with if you are trying to programmatically use the output to generate documentation.  Previously, @pdion891 spent a lot of time trying to manually reformat this output in order for it to be represented in the Release Notes.

This pull request adds JSON as an output format as well as the existing TXT to simplify the ability for parsers and generators to use the output.

This new JSON format was used to generate the 4.9.0 release notes (that code will be contributed separately).

Old manually formatted output:
http://docs.cloudstack.apache.org/projects/cloudstack-release-notes/en/4.7.0/api-changes.html

New auto-formatted output using this new JSON output:
http://docs.cloudstack.apache.org/projects/cloudstack-release-notes/en/4.9.0/api-changes.html

I have included the output of the `diff.txt` as well as the `diff.json` to this PR so you can see the resulting output of both file formats (diff between 4.8 and 4.9).

[diff.txt.zip](https://github.com/apache/cloudstack/files/432983/diff.txt.zip)
[diff.json.zip](https://github.com/apache/cloudstack/files/432982/diff.json.zip)

* pr/1658:
  Added JSON diff output to the ApiXmlDocReader in additon TXT for parsability

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-09-12 14:42:16 -04:00
Will Stevens
0e5e602953 Added JSON diff output to the ApiXmlDocReader in additon TXT for parsability 2016-09-12 10:08:09 -04:00
Mike Tutkowski
b508fb8692 Adding support for cross-cluster storage migration for managed storage when using XenServer 2016-09-12 07:39:13 -06:00
Rajani Karuturi
2acb0b7608 Merge pull request #866 from bvbharatk/CLOUDSTACK-8751
CLOUDSTACK-8751 minimise downtime of network when network update is in progress.more info in the bug link below.
https://issues.apache.org/jira/browse/CLOUDSTACK-8751

* pr/866:
  Added license headders
  Added a test to test update router in sequence
  Do not update network if one of the router's state is unknown
  CLOUDSTACK-8751 Added tests
  CLOUDSTACK-8751

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-12 17:15:23 +05:30
Bharat Kumar
8805f955a3 Added license headders 2016-09-12 16:13:32 +05:30
Bharat Kumar
5f4439007c Added a test to test update router in sequence 2016-09-12 15:24:47 +05:30
Bharat Kumar
ba9dcba16d Do not update network if one of the router's state is unknown
Added checks to prevent netwrok update when router state is unknown or when
the new offering removes a service that is in use.

Added a new param forced to the updateNetwork API. The network will
undergo a forced update when this param is set to true.

CLOUDSTACK-8751 Clean network config like firewall rules etc, when network services are removed during network update.
2016-09-12 15:24:47 +05:30
Bharat Kumar
f416332994 CLOUDSTACK-8751 Added tests 2016-09-12 15:24:47 +05:30
Bharat Kumar
75f89c7676 CLOUDSTACK-8751
Minimise network downtime during network updates when redundant VR is being used.
database schema changes
Made changes to the updateNetwork API.
2016-09-12 15:24:47 +05:30
Rajani Karuturi
1f0955d7e4 Merge pull request #1672 from milamberspace/AddMissingPackagesForDocker
In comment, Add missing packages for Docker Ubuntu builds
Please note: No need to wait the results of Jenkins or Travis, this fix only add the missing packages in the docker command line to build CloudStack with Docker (for Ubuntu 14.04 and 16.04)

cc @wido

* pr/1672:
  In comment, Add missing packages for Docker Ubuntu builds

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-09-12 11:07:51 +05:30
nvazquez
1384d748a7 CLOUDSTACK-9386: Find vm on datacenter instead of randomly choosing a cluster 2016-09-11 20:56:09 -03:00
Rafael Weingärtner
744cb2c502 Merge pull request #1605 from nvazquez/fixVram
CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve performance of 3D GPU support in cloud-plugin-hypervisor-vmwareJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9428

### Introduction

On #1310 passing vRAM size to support 3D GPU problem was addressed on VMware. It was found out that it could be improved to increase performance by reducing extra API calls, as we'll describe later

### Improvement
On WMware, `VmwareResource` manages execution of `StartCommand.` Before sending power on command to ESXi hypervisor, vm is configured by calling `reconfigVMTask` web method on vSphere's client `VimPortType` web service.
It was found out that we were using this method 2 times when passing vRAM size, as it implied creating a new vm config spec only editing video card specs and making an extra call to `reconfigVMTask.`

We propose reducing the extra web service call by adjusting vm's config spec. This way video card gets properly configured (when passing vRAM size) in the same configure call, increasing performance.

### Use case (passing vRAM size)
* Deploy a new VM, let its id be X
* Stop VM
* Execute SQL, where X is vm's id and Z is vRAM size (in kB):
````
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 'mks.enable3d', 'true');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 'mks.use3dRenderer', 'automatic');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 'svga.autodetect', 'false');
INSERT INTO cloud.user_vm_details (vm_id, name, value) VALUES (X, 'svga.vramSize', Z);
````
* Start VM

* pr/1605:
  CLOUDSTACK-9428: Add marvin test
  CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve performance

Signed-off-by: Rafael Weingärtner <rafael@apache.org>
2016-09-11 08:16:11 -03:00
John Burwell
bdb563e18b Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9470: Fix for SshHelper - test_network_acl was failing on Vmware due to a bug in sshExecute, in which value returned was null and there was still stdout to consume. This fix addresses this problem, consuming stdout peoperly to return expected value in sshExecute
2016-09-10 17:22:53 -04:00
John Burwell
a661a11d76 Signed-off-by: John Burwell <meaux@cockamamy.net> 2016-09-10 17:18:07 -04:00
Milamber
8463fb153a In comment, Add missing packages for Docker Ubuntu builds 2016-09-04 09:34:15 +01:00
Rohit Yadav
95f1de89b4
Merge branch '4.9'
Conflicts:
	engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
	engine/schema/test/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java
	tools/marvin/setup.py

This fixes class names to make things consistent as per the 4.9 PR on master.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-02 23:08:49 +05:30
nvazquez
1190d76a65 CLOUDSTACK-9470: Fix for SshHelper - test_network_acl was failing on Vmware due to a bug in sshExecute, in which value returned was null and there was still stdout to consume. This fix addresses this problem, consuming stdout peoperly to return expected value in sshExecute 2016-09-02 12:16:58 -03:00
Rohit Yadav
de73bdd5a7
Merge pull request #1665 from shapeblue/jsb/4.9.1.0-version
Changes database upgrade script names to be consistent for the 4.9.1.0 release  * Changes the names of the schema-490to491* scripts to
  schema-490to4910*
  * Changes the name of the Upgrade490to491 class to Upgrade490to4910
  * Modifies the Marvin setup.py script to use version 4.9.1.0-SNAPSHOT

/cc @rhtyd @karuturi

* pr/1665:
  Renames of 4.9.0->4.9.1.0 upgrade scripts to match the four position version scheme

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-02 16:11:16 +05:30
John Burwell
eabda0eb55 Renames of 4.9.0->4.9.1.0 upgrade scripts to match the four position version scheme
* Renames schema-490to491*.sql to schema490to4910*.sql
    * Renames the Upgrade490to491 class to Upgrade490to4910
    * Removes the unused s_logger contant from Upgrade490to4910
    * Updates the version in tools/marvin/setup to 4.9.1.0-SNAPSHOT
2016-09-01 21:19:29 -04:00
Rohit Yadav
3afc4a176f Merge branch '4.9' 2016-09-02 00:41:26 +00:00
Rohit Yadav
1e0012599c Merge branch '4.8' into 4.9
Conflicts:
	client/WEB-INF/classes/resources/messages_es.properties
2016-09-02 00:38:08 +00:00
Rohit Yadav
9eb8b2e90b Merge pull request #1636 from milamberspace/L10N-update-4.8-20160812-fix-spanish-quote
Fix a quote issue with Spanish L10N (from transifex translation)This fix is for the 4.8 branch.

* pr/1636:
  Fix a quote issue with Spanish L10N (from transifex translation)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-02 00:33:10 +00:00
Rohit Yadav
19549f7b01
Merge branch '4.9' 2016-09-01 17:27:12 +05:30
Rohit Yadav
8ee418b0c3
Merge pull request #1670 from shapeblue/innodb_4_9
CLOUDSTACK-9481: Convert MyISAM table to InnoDB for consistency

* pr/1670:
  CLOUDSTACK-9481: Convert MyISAM table to InnoDB for consistency

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-01 17:25:37 +05:30
Rohit Yadav
da76553f35
Merge branch '4.9' 2016-09-01 17:15:10 +05:30
Rohit Yadav
08edd0c7cd
Merge branch '4.8' into 4.9 2016-09-01 17:01:51 +05:30
Rohit Yadav
f4ae87cb05 Merge pull request #1654 from shapeblue/jsb/4.8.2.0-version
Updating pom.xml version numbers for release 4.8.2.0-SNAPSHOTOften, patch and security releases do not require schema migrations or
data migrations.  However, if an empty upgrade class and associated
scripts are not defined, the upgrade process will break.  With this
change, if a release does not have an upgrade, a noop DbUpgrade is added
to the upgrade path.  This approach allows the upgrade to proceed and
for the database to properly reflect the installed version.  This change
should make the release process simpler as RMs no longer need to
rememeber to create this boilerplate code when starting a new release.

Beginning with the 4.8.2.0 and 4.9.1.0 releases, the project will
formally adopt a four (4) position release number to properly accomodate
rekeases that contain only CVE fixes.  The DatabaseUpgradeChecker and
Version classes made assumptions that they would always parse and
compare three (3) position version numbers.  This change adds the
CloudStackVersion value object that supports both three (3) and four (4)
version numbers.   It encapsulates version comparsion logic, as well as,
the rules to allow three (3) and four (4) to interoperate.

  * Modifies DatabaseUpgradeChecker to handle derive an upgrade path for
  a version that was not explicitly specified.  It determines the
  releases the first release before it with database migrations and uses
  that list as the basis for the list for version being calculated.  A
  noop upgrade is then added to the list which causes no schema changes
  or data migrations, but will update the database to the version.
  * Adds unit tests for the upgrade path calculation logic in
  DatabaseUpgradeChecker
  * Removes dummy upgrade logic for the 4.8.2.0 introduced in previous
  versions of this patch
  * Introduces the CloudStackVersion value object which parses and
  compares three (3) and four (4) position version numbers.  This class
  is intended to replace com.cloud.maint.Version.
  * Adds the junit-dataprovider dependency -- allowing test data to be
  concisely generated separately from the execution of a test case.
  Used extensively in the CloudStackVersionTest.

Signed-off-by: John Burwell <meaux@cockamamy.net>

/cc @rhtyd @karuturi

* pr/1654:
  Adds support for four position versions and optional db upgrades

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-01 15:11:20 +05:30
Abhinandan Prateek
180406e895 CLOUDSTACK-9481: Convert MyISAM table to InnoDB for consistency
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-09-01 14:02:08 +05:30
nvazquez
2de5b0dc98 CLOUDSTACK-9428: Add marvin test 2016-08-31 18:26:43 -07:00
Rohit Yadav
1d9735c346
Merge branch '4.9' 2016-08-30 22:44:33 +05:30
Rohit Yadav
3e6f49d9e2
Merge pull request #1663 from shapeblue/4.9-dnsreflection-attack
[LTS/blocker] CLOUDSTACK-6432: Prevent DNS reflection attacksCLOUDSTACK-6432: Prevent DNS reflection attacks

    DNS on VR should not be publically accessible as it may be prone to DNS
    amplification/reflection attacks. This fixes the issue by only allowing VR
    DNS (port 53) to be accessible from guest network cidr, as per the fix in:
    https://issues.apache.org/jira/browse/CLOUDSTACK-6432

    - Only allows guest network cidrs to query VR DNS on port 53.
    - Includes marvin smoke test that checks the VR DNS accessibility checks from
      guest and non-guest network.
    - Fixes Marvin sshClient to avoid using ssh agent when password is provided,
      previous some environments may have seen 'No existing session' exception without
      this fix.
    - Adds a new dnspython dependency that is used to perform dns resolutions in the
      tests.

Due to repository commit issues I've created this PR, based on #1653 .

/cc @jburwell @karuturi @NuxRo @ustcweizhou @wido  and others

* pr/1663:
  CLOUDSTACK-6432: Prevent DNS reflection attacks

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 22:43:17 +05:30
Rohit Yadav
14504dc7e3 CLOUDSTACK-6432: Prevent DNS reflection attacks
DNS on VR should not be publically accessible as it may be prone to DNS
amplification/reflection attacks. This fixes the issue by only allowing VR
DNS (port 53) to be accessible from guest network cidr, as per the fix in:
https://issues.apache.org/jira/browse/CLOUDSTACK-6432

- Only allows guest network cidrs to query VR DNS on port 53.
- Includes marvin smoke test that checks the VR DNS accessibility checks from
  guest and non-guest network.
- Fixes Marvin sshClient to avoid using ssh agent when password is provided,
  previous some environments may have seen 'No existing session' exception without
  this fix.
- Adds a new dnspython dependency that is used to perform dns resolutions in the
  tests.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 22:39:33 +05:30
Rohit Yadav
12e698de57
Merge branch '4.9' 2016-08-30 18:32:58 +05:30
Rohit Yadav
0671a80972
Merge pull request #1621 from milamberspace/FixPR1610_addLineReturn
[CLOUDSTACK-9444] Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file

And some improvements about the dir/file using variables

cc @wido @rhtyd

* pr/1621:
  Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file And some improvements about the dir/file using variables

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 18:32:09 +05:30
John Burwell
8d11511b1f Adds support for four position versions and optional db upgrades
Often, patch and security releases do not require schema migrations or
data migrations.  However, if an empty upgrade class and associated
scripts are not defined, the upgrade process will break.  With this
change, if a release does not have an upgrade, a noop DbUpgrade is added
to the upgrade path.  This approach allows the upgrade to proceed and
for the database to properly reflect the installed version.  This change
should make the release process simpler as RMs no longer need to
rememeber to create this boilerplate code when starting a new release.

Beginning with the 4.8.2.0 and 4.9.1.0 releases, the project will
formally adopt a four (4) position release number to properly accomodate
rekeases that contain only CVE fixes.  The DatabaseUpgradeChecker and
Version classes made assumptions that they would always parse and
compare three (3) position version numbers.  This change adds the
CloudStackVersion value object that supports both three (3) and four (4)
version numbers.   It encapsulates version comparsion logic, as well as,
the rules to allow three (3) and four (4) to interoperate.

  * Modifies DatabaseUpgradeChecker to handle derive an upgrade path for
  a version that was not explicitly specified.  It determines the
  releases the first release before it with database migrations and uses
  that list as the basis for the list for version being calculated.  A
  noop upgrade is then added to the list which causes no schema changes
  or data migrations, but will update the database to the version.
  * Adds unit tests for the upgrade path calculation logic in
  DatabaseUpgradeChecker
  * Removes dummy upgrade logic for the 4.8.2.0 introduced in previous
  versions of this patch
  * Introduces the CloudStackVersion value object which parses and
  compares three (3) and four (4) position version numbers.  This class
  is intended to replace com.cloud.maint.Version.
  * Adds the junit-dataprovider dependency -- allowing test data to be
  concisely generated separately from the execution of a test case.
  Used extensively in the CloudStackVersionTest.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-30 13:32:32 +05:30
Milamber
6051fa503a Fix a little issue from PR1610 if the db.properties file hasn't EOL character at the end of file
And some improvements about the dir/file using variables
2016-08-30 08:29:06 +01:00
Rohit Yadav
fcc8dcd5d7
Merge branch '4.9' 2016-08-29 12:15:53 +05:30
Rohit Yadav
b9801ef475 Merge pull request #1648 from shapeblue/4.9-fixmarvintest
test/integration: fix tearDown order in list_acl_ teststest/integration: fix tearDown order in list_acl_ tests

    In several of the list_acl_tests, the tests run for simulator only where
    in the (class) setup domains and accounts are created for the test. When the
    tests end the (class) teardown methods would delete and remove these resources.
    Due to dependence of one of the resources on the other, domain2 on domain1,
    domain2 needs to be removed/cleaned up before domain1. Due to this issue,
    several Travis test runs have failed in the past such as:

    https://travis-ci.org/apache/cloudstack/jobs/152610967
    https://travis-ci.org/apache/cloudstack/jobs/152610968

    Changing the order of cleanup fixes the tests.

/cc @jburwell @karuturi

The fix is specific to tests that run 'only' on simulator with Travis. A passing Travis run should be enough to validate the changes.

* pr/1648:
  test/integration: fix tearDown order in list_acl_ tests

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-29 12:10:34 +05:30
Rohit Yadav
38259a9a8c
Merge branch '4.9' 2016-08-26 23:49:35 +05:30
Rohit Yadav
f7d6fea821
Merge pull request #1647 from apache/4.9-systemdubuntupkging
[lts] CLOUDSTACK-9462: Systemd support for Ubuntu 16.04Created this based on @wido 's origin PR #1541 .

Requesting for review and testing -- @jburwell @karuturi @wido @vincentbernat
@wido I think this change only brings systemd support to agent and usage packages, or does cloudstack-management pkg has systemd support too?

@blueorangutan package

- systemd: Add a /etc/sysconfig/cloudstack-* file

  This allows users to easily override variables passed to Java when
  starting up.

  It also creates a foundation for sharing the systemd service profile
  between CentOS and Ubuntu since it only requires the environment file
  to be changed.

- deb: Add Ubuntu 16.04 support

  Ubuntu 16.04 differs from Ubuntu 14.04 in a few ways:
  - systemd instead of sysvinit / upstart
  - Java 8 support

  The packaging now detects on which distribution it is being
  build and based on that it installs different files in the
  packages, but it also changes the Dependencies.

* pr/1647:
  CLOUDSTACK-9462: Refactor systemd scripts
  CLOUDSTACK-9462: Systemd support for Ubuntu 16.04

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-08-26 23:47:44 +05:30