1877 Commits

Author SHA1 Message Date
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
Koushik Das
d1def0a730 Merge pull request #1287 from DaanHoogland/securityrules-cleanup
SecurityGroupRulesCmd code cleanupWrote a test and cleaned some duplicate code with the objective to evaluate the jenkins pull request process at builds.a.o
worthwhile to keep, IMHO.

* pr/1287:
  SecurityGroupRulesCmd code cleanup review comments handled
  deal with PMD warnings
  code cleanup
  security rules test
  remove autogenerated pydev files

Signed-off-by: Koushik Das <koushik@apache.org>
2016-04-11 21:49:57 +05:30
Will Stevens
c48b6c33c0 Revert "Merge pull request #780 from maneesha-p/pull-19" due code quality issues and lack of CI results.
This reverts commit dc0ba6bd1a774d3ff4bc4a4dcc00e1434ab1f6e3, reversing
changes made to 63f58dd5785ff2515b087d907bdf686347c75727.
2016-03-21 17:38:04 -04:00
Kishan Kavala
dc0ba6bd1a Merge pull request #780 from maneesha-p/pull-19
CLOUDSTACK-8800 : Improved the listVirtualMachines API call to include memory utilization information for a VMfor xenserver,kvm and for vmware.

* pr/780:
  CLOUDSTACK-8800 : Improved the listVirtualMachines API call to include memory utilization information for a VM for xenserver,kvm and for vmware.

Signed-off-by: Kishan Kavala <kishan@apache.org>
2016-03-17 12:35:48 +05:30
Maneesha.P
732a85295d CLOUDSTACK-8800 : Improved the listVirtualMachines API call to include memory utilization information for a VM for xenserver,kvm and for vmware. 2016-03-16 16:13:10 +05:30
nvazquez
76dc2705b7 CLOUDSTACK-9252: Remove duplicates getNfsVersion, refactor 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
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
fac259f0fb Merge release branch 4.7 to master
* 4.7:
  Fix execution counter to support separate counts per thread
  Add test to check that each thread has it's own execution counter
  CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
2016-01-18 16:00:29 +01:00
Remi Bergsma
f0fca60993 Merge pull request #1336 from nitin-maharana/CloudStack-Nitin19_4.7
CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failingEXPECTED BEHAVIOUR:
====================
Root Volume migration within cluster should work.

ACTUAL BEHAVIOUR:
==================
Root volume migration within cluster failed.

This situation arises when there are two management server accessing the same database.
When the migration request comes the command is forwarded from one management server to another because the host is owned by the second management server. So, serialisation of map from one to another fails.

Fix:
===
This is fixed by converting the maps to lists.

* pr/1336:
  CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-18 15:57:05 +01:00
Daan Hoogland
b9b5967d6b SecurityGroupRulesCmd code cleanup review comments handled 2016-01-17 16:24:54 +01:00
Remi Bergsma
75b68c6829 Merge release branch 4.7 to master
* 4.7:
  Fix unable to setup more than one Site2Site VPN Connection
  FIX S2S VPN rVPC: Check only redundant routers in state MASTER
  PEP8 of integration/smoke/test_vpc_vpn
  Add S2S VPN test for Redundant VPC
  Make integration/smoke/test_vpc_vpn Hypervisor independant
  FIX VPN: non-working ipsec commands
  [UI] MADNESS
  [DB] Add force_encap field to s2s_customer_gateway table
  [ROUTER] Add forceencaps field to python router ipsec config method
  [TEST] unittest needs rework
  [MARVIN] Add forceencap field to VpnCustomerGateway class in marvin base
  [CORE] Add Force UDP Encapsulation option to Site2Site VPN
  CLOUDSTACK-9186: Root admin cannot see VPC created by Domain admin user
  CLOUDSTACK-9192: UpdateVpnCustomerGateway is failing
  CLOUDSTACK-6485 prevent ip asignment of private gw iface
  CLOUDSTACK-9204 Do not error when staticroute is already gone
  make both check lines consistent
  CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh
  CLOUDSTACK-9202 Bump ssh timeout
2016-01-16 19:54:41 +01:00
Nitin Kumar Maharana
40e3dfc617 CLOUDSTACK-9231: Root volume migration from one primary to another primary storage within the same cluster is failing
This situation arises when there are two management server accessing the same database.
When the migration request comes the command is forwarded from one management server to another because
the host is owned by the second management server. So, serialization of map from one to another fails.
This is fixed by converting the maps to lists.
2016-01-13 22:42:53 +05:30
Remi Bergsma
b1034ed624 Merge release branch 4.7 to master
* 4.7:
  CLOUDSTACK-9220 Sort list of domains on Domain tab in UI
  Admin cannot see VMs on port forwarding page
  Fix mariadb related listCapacity bug (CLOUDSTACK-8966)
  CLOUDSTACK-9213 - Split the ACL rules using comma instead of dash.
  CLOUDSTACK-9213 - Formatting the code
2016-01-11 16:22:31 +01:00
Michael Andersen
4a08dbe235 [TEST] unittest needs rework 2016-01-07 19:27:42 +01:00
Michael Andersen
6da3bc1237 [CORE] Add Force UDP Encapsulation option to Site2Site VPN 2016-01-07 19:27:37 +01:00
Wilder Rodrigues
94c0dc5dfe CLOUDSTACK-9213 - Split the ACL rules using comma instead of dash.
- The router code no longer deals with parsing the ALC list again. It's not necessary if it's sent in the proper way.
2016-01-06 09:48:53 +01:00
Wilder Rodrigues
61f3706255 CLOUDSTACK-9213 - Formatting the code 2016-01-06 09:48:32 +01:00
Daan Hoogland
d39182f9d4 deal with PMD warnings 2015-12-26 09:02:30 +01:00
Daan Hoogland
d1c1bde01b code cleanup 2015-12-26 09:02:29 +01:00
Daan Hoogland
1ead444cca security rules test 2015-12-26 09:02:28 +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
Remi Bergsma
cdfcea3da2 Merge release branch 4.6 to master
* 4.6:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
2015-12-12 22:29:19 +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
Koushik Das
a4dc271253 CLOUDSTACK-9105: Logging enhancement: Handle/reference to track API calls end to end in the MS logs
Added logid to logging framework, now all API call logs can be tracked with this id end to end
2015-12-04 12:45:57 +05:30
Rohit Yadav
a15187a57a CLOUDSTACK-4787: Allow users to select disk controller for VM/template
- Adds new controller types in the UI, for selecting root disk controller while
  registering templates
- Fixes bug to not override disk controller type if provided in the details (either
  vm details or from template details)

(cherry picked from commit c7d67628b3ff86802a1ac3b58e0bc05d54afd543)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:52:02 +05:30
Sateesh Chodapuneedi
6a9956e0f5 CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
commit #7
    So far only 1 controller (scsi or ide) is supported in Cloudstack for ide or
    scsi, this is existing limitation. Added support for 2nd IDE controller. Support adding IDE
    virtual disk to VM. Also added check if VM is running as IDE virtual disk cannot be attached
    to VM if VM is runnning.If user detaches a virtual disk on lower unit number of controller,
    then subsequent attach operation should find free unit number on the controller and attach
    the virtual disk there.

    commit #6
    Let the controllers of existing VMs continue without flip, current busInfo retrieved from
    chain_info field of volume record from database would be preferred over
    controller settings from all configuration settings.

    commit #5
    Editing global configuration param vmware.root.disk.controller osdefault value results
    in loss of previous root disk controller type. Hence root disk's controller type for legacy
    VMs is unknow post that modificaiton by user. If VM is stop/start then we could get this
    infromation from bus info of existing volume. But if user resets VM and then try to start VM.
    The existing bus info would be lost. Hence existing disk info is not available to depend on.
    Using lsilogic or generic scsi controller for ROOT disk of legacy VMs if reset.

    commit #4
    Avoid adding additional (>1) scsi controllers to system vms. While attaching volume to legacy VM
    don't use osdefault optoin which applicable only for VM created with the option enabled, use
    legacy data disk controller type (lsilogic)

    commit #3
    If root disk's controller type is scsi and data disk controller type condenses
    to any of scsi sub-types then data disk controller type would fall back to root disk controller itself. This
    ensures data volumes would be accessible in all cases as controller of root volume would be reliable
    and it means VM has the supported controller. It also avoids mix of scsi controller sub-types in a user instance.
    Also translating disk controller type scsi to lsilogic.

    commit #2
    Support auto detection of recommended virtual disk controller type for specific guest OS.

    commit #1
    Support granual controller types. Add support for controller types in template registration as well.

    Fix white spaces.
    Removed stale HEAD merge lines
    Removed tail of merge lines
    Fixed VmwareResource, removing storage commands that moved to VmwareStorageProcessor.
    removed stale code of controller that is present in processor
    Fixed check style errors.
    Fixed injection.
    Tested with Linux and windows templates. Unable to run iso based tests due to few bugs in register iso area.

    Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

(cherry picked from commit a4cc987a6f66f20c434942956fffe5951df09e43)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:39:41 +05:30
Devdeep Singh
00522e475b CLOUDSTACK-9081 Migration of vm across clusters fails in clustered MS setup
Storage motion of vm across clusters/xenserver-pools fails in a
clustered management server setup. In xen storage motion we have to send
a migrate_receive command to the destination host, followed by
migrate_send command to the source host. The sr and network detials of
the destination host have to be passed in migrate_send command on the
source. While migrating across clusters the source and destination
resources are seperate objects. To pass this information across
resources we have to send seperate migrate with storage receive and send
commands to the resource. In a clustered ms setup these commands may
have to be forwarded to another ms as the resource may be owned by it.
The serilization of the command and answer objects fails in such case as
it doesn't understand the xapi sr and network objects. Made a change to
serialize these objects in the resource layer and pass the around as
strings in the command and answer objects.  Reviewed-By: Likitha
2015-11-26 11:59:18 +05:30
Remi Bergsma
a6b6f4104d Merge pull request #1102 from rafaelweingartner/master-lrg-cs-hackday-006
Removed unnecessary @Local annotations and their respective importsFollowing @rafaelweingartner 's findings in PR #714 that many spring beans contained an @Local annotation, we've decided to remove said annotations and their imports from the ComponentLifecycleBase class and its subclasses seeking a reduction of a few hundred lines of useless code.

I had already opened a pull request for this (#853) but at some point my commit disappeared from the PR entirely, showing no new changes in code, which caused it to be merged automatically (with no changes).

* pr/1102:
  Removed unnecessary @Local annotations and their respective imports from the ComponentLifecycleBase class and its subclasses.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-23 11:25:43 +01:00
Remi Bergsma
32fa9e6f6f Merge pull request #1051 from Carles-Figuerola/CLOUDSTACK-9048-fix-typo
CLOUDSTACK-9048: Fix typo for public network description

* pr/1051:
  CLOUDSTACK-9048: Fix typo for public network description

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-22 12:57:31 +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
Remi Bergsma
7665bdc815 Merge pull request #1083 from borisroman/CLOUDSTACK-9062
CLOUDSTACK-9062: Improve S3 implementation.The S3 implementation is far from finished, this commit focuses 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 optimizations.

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.

Please review thoroughly, both code inspection and (automated) integration tests. Currently no integration tests are available specifically for S3. Therefore the implementation is needed to be tested manually, for now...

What I tested:
 - Greenfield install -> will download latest systemvm template automatically to S3.
 - Upload a template/iso
 - Download a template/iso
 - Restart of management server -> list available templates -> doesn't download them again if available.

* pr/1083:
  CLOUDSTACK-9062: Improve S3 implementation.

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-20 22:27:17 +01:00
Remi Bergsma
791f9dfe5f Merge pull request #1084 from ekholabs/improvement/remove_scripts-CLOUDSTACK-9067
CLOUDSTACK-9067 - As I developer I want to remove all the unused router-shell scripts from ACSThis PR removes the unused shell scripts that were present in the ACS project. Those script were replaced by the.

Some of the scripts are used by the HyperV Resource, which were hardcoded. I took the opportunity to use the Java constants over there as well, so the next one touching the code will know they exist and won't hardcode anything.

The following task were applied:

* Remove the shell files and the Java constants that were mapping them;
* Apply the use of the Java constants to the HyperV Resource class;
* Wrap the String.format() method in the StringUtils so we can test the changes in the HyperV Resource class.

The last point was added because I do not have a HyperV test environment. Hence, I wanted to make sure the tiny code I changed is covered at least by unit tests.

* pr/1084:
  CLOUDSTACK-9067 - Replaces hardcoded paths with the VRScripts constants.
  CLOUDSTACK-9067 - Fomatting the code of HypervDirectConnectResource class
  CLOUDSTACK-9067 - Remove old script file from the project

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-19 17:58:42 +01: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
Remi Bergsma
95ae7963d5 Merge pull request #801 from nlivens/updated-nuage-vsp-plugin
CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

* pr/801:
  CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 12:09:09 +01:00
Wilder Rodrigues
6477bd8ff7 CLOUDSTACK-9067 - Remove old script file from the project
- Java constants also removed
   - Project still compiling and all unit tests passing.
2015-11-17 15:58:22 +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
Carles Figuerola
2f5a40065c CLOUDSTACK-9048: Fix typo for public network description 2015-11-09 11:18:44 -06:00
Wido den Hollander
ea92fc15ce Use java.io.tmpdir instead of hardcoded /tmp
This was submitted earlier in PR #884 but that did not merge
properly.

This is a new PR with the same change.
2015-10-31 12:03:11 +01:00
Aaron Brady
cacac14425 Pass LbProtocol down to the HAProxyConfigurator 2015-10-28 13:42:51 +00:00
Nick Livens
645f8758df CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2 2015-10-27 14:56:57 +01:00
Wei Zhou
358936ffb7 Add agent name in received response 2015-10-16 11:43:25 +02:00
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
Remi Bergsma
415631ab58 Revert "Merge pull request #884 from wido/test-tmp-dir"
This reverts commit 6841ba61da5e407f7a16c4a575d1a4e8c8345970, reversing
changes made to 13b29bac5a1778e295df7e9fb21c502fcf017183.

Master is currently frozen, no merges without RM approval.
http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201509.mbox/browser

It also broke the build:
[INFO] Apache CloudStack Framework - Jobs ................ SUCCESS [3.448s]
[INFO] Apache CloudStack Cloud Engine Internal Components API  SUCCESS [2.528s]
[INFO] Apache CloudStack Server .......................... FAILURE [24.769s]
[INFO] Apache CloudStack Usage Server .................... SKIPPED
2015-09-25 11:41:03 +02:00