31561 Commits

Author SHA1 Message Date
Khosrow Moossavi
1960124819 server: Make HTTP handler of embedded server to be configured (#2762)
This is to have the possibility to completely disable HTTP and only use HTTPS.
2018-07-26 12:59:25 +05:30
Dingane Hlaluku
6156b442dd test: Fix test_deploy_virtio_scsi_vm.py smoke test failures (#2752)
Fix failing test cases and proper resource cleanup
2018-07-26 12:57:39 +05:30
Rohit Yadav
7667846bfa
kvm: Fixes #2763 move post-renewal libvirt restart class suitably (#2764)
This fixes #2763 by moving a post cert-renewal class for kvm
plugin/hypervisor to src/main/java. The regression is due to change
in file-system layout due to maven standard refactoring on master and
issue was not caught during forward-merging of a PR from 4.11 branch.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-07-26 12:51:24 +05:30
Khosrow Moossavi
7c6630bca7 Cleanup POMs (#2613)
* Cleaup and code-formatting POM files

* Remove obsolete mycila license-maven-plugin

* Remove obsolete console-proxy/plugin project

* Move console-proxy-rdbconsole under console-proxy parent

* Use correct parent path for rdpconsole

* Order alphabetally items in setnextversion.sh

* Unifiy License header in POMs

* Alphabetic order of modules definition

* Extract all defined versions into parent pom

* Remove obsolete files: version-info.in, configure-info.in

* Remove redundant defaultGoal

* Remove useless checkstyle plugin from checkstyle project

* Order alphabetally items in pom.xml

* Add aditional SPACEs to fix debian build

* Don't execute checkstyle on parent projects

* Use UTF-8 encoding in building checkstyle project

* Extract plugin versions into properties

* Execute PMD plugin on all the projects with -Penablefindbugs

* Upgrade maven plugins to latest version

* Make sure to always look for apache parent pom from repository

* Fix incorrect version grep in debian packaging

* Fix rebase conflicts

* Fix rebase conflicts

* Remove PMD for now to be fixed on another PR
2018-07-25 14:39:37 -03:00
ernjvr
542d4da16c asyncjobs: add endtime to async jobs (#2739)
There is currently no functional mechanism that captures or persists the end time of when an asynchronous job has finished. As a result, users are not able to do any reporting about the duration of various asynchronous jobs in Cloudstack.
Link to FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Add+End+Time+To+Asynchronous+Jobs
2018-07-25 14:48:01 +05:30
Wido den Hollander
443490179c cleanup: Remove unused variables (#2765)
Found some variables throughout the code which are not being used.
They can be removed.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-07-24 21:01:25 -03:00
Rafael Weingärtner
756a7e89cb
Fix limitation on tag matching in 'migrateVolume' with disk offering replacement (#2636)
* Fix limitation on tag matching in 'migrateVolume' with disk offering replacement

When the feature to enable disk offering replacement during volume migration was created, we were forcing the tags of the new disk offering to exact the same as the tags of the target storage poll. However, that is not how ACS manages volumes allocation. This change modifies this validation to make it consistent with volume allocation.

* Address Nitin's suggestions

* Apply Daan's suggestion regarding "doesTargetStorageSupportDiskOffering" method

* fix problem
2018-07-21 07:01:24 -03:00
Marc-Aurèle Brothier
a21ebb1ce8 api: remove empty response parameters (#2751) 2018-07-20 13:38:21 +02:00
Daan Hoogland
c3ff356c15 Merge release branch 4.11 to master
* 4.11:
  register template kvm context ui fix (#2757)
  check volumes for state when retrieving pool for configDrive creation (#2709)
2018-07-20 11:31:53 +00:00
ernjvr
781d6bc051 register template kvm context ui fix (#2757)
On the 'Register Template From URL' screen, when a user selects the KVM option from the Hypervisor dropdown:
1) It incorrectly displays the 'Original XS Version is 6.1' checkbox. This checkbox should be hidden in the KVM context.
2) The 'Root Disk Controller' dropdown should display the default option of 'osdefault' instead of a blank default option.
2018-07-20 09:16:23 +02:00
Wido den Hollander
1ccb32f814 security_group: Use execute() function instead of non-existing bash() (#2732)
In 6233a77d15adde86302a11b2bcda604313833e91 as a part of PR #2432 the
bash() function was replaced by the execute() function.

Somehow this last calling of the bash() function was not caught by testing
and is still in there.

This causes Exceptions to be thrown by the Security Group script.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-07-20 09:07:29 +02:00
Dingane Hlaluku
a6e0204ccc fix provisionCertificate api returns NPE when 'reconnect' parameter is true (#2756)
This PR fixes NPE with the provisionCertificateCmd when reconnect is set to True.

Also fixes the following Marvin test failures:
- test_certauthority_root.py
2018-07-20 09:05:58 +02:00
Rafael Weingärtner
70bd177064
Fix concurrency problem when moving ACL rules with drag&drop (#2703)
There was a concurrency problem with the “moveNetworkAclItem” API method. If two users were changing the ACL rules order at the same time, this could lead to inconsistent actions.
To solve the problem we added a “consistency check ” parameter, which is used to hold the consistency hash. This hash is created using an MD5 hash function on a String that is created with all ACL rules UUIDs concatenated in their order, which is defined via the ‘number’ field.
We also lock the editing of the ACL while executing the upgrade. This allows us to handle race conditions nicely, and present a good feedback for the user.
2018-07-19 12:47:54 -03:00
Dingane Hlaluku
94dedd65f1 Refactor userVmDetailsDao field and remove unusued fields (#2750)
* Refactor userVmDetailsDao field and remove unusued fields

* Setting injected attributes to private instead of protected and amending unit test
2018-07-19 06:53:40 -03:00
dahn
38d0274eb4
check volumes for state when retrieving pool for configDrive creation (#2709)
* only ask for the root volume, removing extensive query

* better name
2018-07-18 13:13:41 +02:00
Mike Tutkowski
99bc0e6677
Merge pull request #2503 from mike-tutkowski/multi-sf-vags
Support multiple volume access groups per compute cluster
2018-07-16 16:39:08 -06:00
Mike Tutkowski
73608dec28 Support multiple volume access groups per compute cluster 2018-07-16 15:13:16 -06:00
Rafael Weingärtner
d0c6cacd06
[CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS) (#2524)
* [CLOUDSTACK-9261] Upgrate jQuery-UI to 1.11 (JQuery UI 1.8.4 prone to XSS)

* fix problems in the UI for lbCertificatePolicy and StaticNAT

* force jenkins build

* Fix about dialog

* Fix position of network service offering
2018-07-16 13:18:55 -03:00
Dingane Hlaluku
40af32b1b9 diagnostics: new diagnostics admin API for system VMs (#2721)
This is a new feature for CS that allows Admin users improved
troubleshooting of network issues in CloudStack hosted networks.

Description: For troubleshooting purposes, CloudStack administrators may wish to execute network utility commands remotely on system VMs, or request system VMs to ping/traceroute/arping to specific addresses over specific interfaces. An API command to provide such functionalities is being developed without altering any existing APIs. The targeted system VMs for this feature are the Virtual Router (VR), Secondary Storage VM (SSVM) and the Console Proxy VM (CPVM).

FS:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API
ML discussion:
https://markmail.org/message/xt7owmb2c6iw7tva
2018-07-13 16:58:45 +05:30
Khosrow Moossavi
07042a67c6 travis: Enhance Travis to do packaging jobs on different stage (#2640)
Two stages are defined in travis job: test and package,
where test runs before package. On package stage we're
going to do the packaging of final artifacts based on
centos7, centos63, ubuntu1804, ubuntu1604 and ubuntu1404.
This is to validate that no PR will break packaging artifacts.
2018-07-13 16:53:29 +05:30
Khosrow Moossavi
4a5fab0573 packaging: Catch error in packaging script and fail the build (#2649)
This is to fix the regression added in #2433. In this fix
we're going to fail the build early if --use-timestamp is
provided and working directory is *not* clean. And also
fail the build if something in the script has returned
non-zero value.
2018-07-13 16:47:34 +05:30
Gabriel Beims Bräscher
2936cb3b41 Fix typo in VirtualMachineManagerImpl.java (#2738)
from "cleanued up" to "cleaned up"
2018-07-11 18:12:59 +02:00
Nicolas Vazquez
9fb36e7c73 db: Update Apache DBCP version (#2718)
* Update Apache DBCP version

* Fix DB connection

* Prevent hang on the db creation
2018-07-10 11:53:59 +05:30
Rohit Yadav
fc1874c1c9 Merge branch '4.11' 2018-07-06 17:29:17 +05:30
Khosrow Moossavi
67860d9f46 maven: Updating pom.xml version numbers for release 4.11.2.0-SNAPSHOT (#2728)
Fixes the version in pom etc. to be consistent with versioning pattern as X.Y.Z.0-SNAPSHOT after a minor release.

Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
2018-07-06 17:27:12 +05:30
Rohit Yadav
4987e3e71c Merge branch 'origin/4.11' 2018-07-06 13:02:38 +05:30
Rohit Yadav
c1ca45a30c
maven: bump up vmware sdk jar to 6.7 (#2727)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-07-06 13:01:52 +05:30
Rohit Yadav
45b986294d Merge branch '4.11' 2018-07-06 12:54:23 +05:30
dahn
85ad2853ca
some formatting and a typo 2018-07-05 09:40:37 +02:00
Wido den Hollander
36f1900281 Add a PendingRelease notes file (#2723)
Also update the CONTRIBUTING file with a description of how to work
with this file.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2018-07-03 21:17:41 +02:00
Frank Maximus
89c2721fbd Fixes: #2725 2018-07-03 10:46:36 +02:00
dahn
d0d3895c39
removed unused code in snapshotDao (#2659)
* removed unused code

* remove sql strings
2018-07-03 09:43:28 +02:00
Paul Angus
8ba318da19 Updating pom.xml version numbers for release 4.11.2-SNAPSHOT
Signed-off-by: Paul Angus <paul.angus@shapeblue.com>
2018-06-26 17:53:54 +01:00
Paul Angus
4ebafc44a9 Updating pom.xml version numbers for release 4.11.2-SNAPSHOT
Signed-off-by: Paul Angus <paul.angus@shapeblue.com>
2018-06-26 17:24:36 +01:00
Paul Angus
2cb2dacbe7 Updating pom.xml version numbers for release 4.11.1.0
Signed-off-by: Paul Angus <paulangus@PA-Ansible-GUI.sblab.local>
4.11.1.0 4.11.1
2018-06-21 15:52:43 +01:00
Daan Hoogland
1d05fead49 Merge branch '4.11' 2018-06-21 13:08:55 +02:00
dahn
52b02de43f vpc: reuse private gateway ip for non redundant VPC (#2712)
As rolling restart does not deallocate an IP before configuring it on a new VR, the code must allow it to be reused on a non-redundant VPCs gateway nic.
In crease ping counts to reduce intermittent failures in smoketests.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-21 15:06:50 +05:30
dahn
f02e402ebb kvm: send unsupported answer only when applicable (#2714)
Throw specific NPE child when command is known not to be known. Add unit tests.
2018-06-21 11:03:43 +05:30
Rohit Yadav
d4e302dcc6
smoketest: Fix test_vm_life_cycle secure migration tests (#2715)
This fixes intermittently failing secure live VM migration tests on KVM.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-20 21:18:38 +05:30
Nicolas Vazquez
539d7e10f3
Merge pull request #2493 from shapeblue/fixmaintenance
CLOUDSTACK-10326: Prevent hosts fall into Maintenance when there are running VMs on it
2018-06-20 12:00:58 -03:00
Rohit Yadav
85750f918b Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-20 12:31:52 +05:30
Rohit Yadav
39471c8c00
configdrive: make fewer mountpoints on hosts (#2716)
This ensure that fewer mount points are made on hosts for either
primary storagepools or secondary storagepools.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-20 12:25:16 +05:30
Slair1
08a59e89c3 Source NAT option on Private Gateway (#2681)
Using Source NAT option on Private Gateway does not work
This fixes #2680 

## Description
<!--- Describe your changes in detail -->
When you use the Source NAT feature of Private Gateways on a VPC.  This should Source NAT all traffic from CloudStack VMs going towards IPs reachable through Private Gateways.

This change in this PR, stops adding the Source CIDR to SNAT rules.  This should be discussed/reviewed, but i can see no reason why the Source CIDR is needed.  There can only be one SNAT IP per interface, except for Static (one-to-one) NATs, which still work with this change in place.  The outbound interface is what matters in the rule.

<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
##### SUMMARY
<!-- Explain the problem/feature briefly -->
There is a bug in the Private Gateway functionality, when Source NAT is enabled for the Private Gateway.  When the SNAT is added to iptables, it has the source CIDR of the private gateway subnet.  Since no VMs live in that private gateway subnet, the SNAT doesn’t work.  

##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.

For new features, show how the feature would be used.
-->

<!-- Paste example playbooks or commands between quotes below -->
Below is an example:

- VMs have IP addresses in the 10.0.0.0/24 subnet.
- The Private Gateway address is 10.101.141.2/30
 
In the outputs below, the SOURCE field for the new SNAT (eth3) only matches if the source is 10.101.141.0/30.  Since the VM has an IP address in 10.0.0.0/24, the VMs don’t get SNAT’d as they should when talking across the private gateway.  The SOURCE should be set to ANYWHERE.
##### BEFORE ADDING PRIVATE GATEWAY
~~~
Chain POSTROUTING (policy ACCEPT 1 packets, 52 bytes)
pkts bytes target     prot opt in     out     source               destination
    2   736 SNAT       all  --  any    eth2    10.0.0.0/24          anywhere             to:10.0.0.1
   16  1039 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18
~~~

<!-- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->

~~~
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination
    0     0 SNAT       all  --  any    eth3    anywhere             anywhere             to:10.101.141.2
    2   736 SNAT       all  --  any    eth2    anywhere             anywhere             to:10.0.0.1
   23  1515 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18
~~~

##### ACTUAL RESULTS
<!-- What actually happened? -->

<!-- Paste verbatim command output between quotes below -->
~~~
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target     prot opt in     out     source               destination
    0     0 SNAT       all  --  any    eth3    10.101.141.0/30      anywhere             to:10.101.141.2
    2   736 SNAT       all  --  any    eth2    10.0.0.0/24          anywhere             to:10.0.0.1
   23  1515 SNAT       all  --  any    eth1    anywhere             anywhere             to:46.99.52.18
~~~
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

## GitHub Issue/PRs
<!-- If this PR is to fix an issue or another PR on GH, uncomment the section and provide the id of issue/PR -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->

Fixes: #2680 

## Screenshots (if appropriate):

## How Has This Been Tested?

<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document.
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
Testing
- [ ] I have added tests to cover my changes.
- [ ] All relevant new and existing integration tests have passed.
- [ ] A full integration testsuite with all test that can run on my environment has passed.
2018-06-19 21:19:26 +02:00
Mike Tutkowski
9776157ea1
Merge pull request #2670 from mike-tutkowski/remove-old-netapp-plug-in
Removing an old, unused NetApp plug-in
2018-06-19 11:09:22 -06:00
Paul Angus
2891662911
Merge pull request #2710 from shapeblue/moveUserDelOldKeys
comply with api key constraint
2018-06-19 15:48:29 +01:00
Rohit Yadav
c87ca1b262 packaging: use libuuid x86_64 package for cloudstack-common (#2706)
* packaging: use libuuid x86_64 package for cloudstack-common

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* 64 bit links is packaged

* post scan filter to exclude libuuid.so.1

* Revert "packaging: use libuuid x86_64 package for cloudstack-common"

This reverts commit b3fb8957fe4e98c85949be2010f0316c89d535a9.

* post scan filter to exclude libuuid.so.1 (centos63)

* revert removal of 32 bit support for vhd-util libs
2018-06-19 13:34:44 +02:00
Daan Hoogland
d126cd21ea comply with api key constraint 2018-06-13 16:45:30 +02:00
nvazquez
faf2a7760d Add unit tests 2018-06-12 11:56:41 -03:00
nvazquez
a22ab69bb6 Set host into ErrorInMaintenance in case of failure trying to enter Maintenance mode 2018-06-12 09:42:09 -03:00
Daan Hoogland
3ff122d824 Merge release branch 4.11 to master
* 4.11:
  comment on unencryption
  ui: fix create VPC dialog box failure when zone is SG enabled (#2704)
  CLOUDSTACK-10381: Fix password reset / reset ssh key with ConfigDrive
  isisnot=
  extra message
  debug message
  imports
  update without decrypt doesn't work
  set unsensitive attributes as not 'Secure'
  remove old config artifacts from update path
2018-06-12 07:41:09 +00:00