1269 Commits

Author SHA1 Message Date
Daan Hoogland
84b0cf0809 comment on unencryption 2018-06-11 09:19:26 +00:00
Mike Tutkowski
c7d6376964 Removing an old, unused NetApp plug-in 2018-06-08 12:55:39 -06:00
Daan Hoogland
e09069cee7 isisnot= 2018-06-08 17:16:36 +02:00
Daan Hoogland
2bf78e92a5 extra message 2018-06-08 16:45:40 +02:00
Daan Hoogland
82a46d1b8d debug message 2018-06-08 16:30:49 +02:00
Daan Hoogland
40f856181c imports 2018-06-08 13:20:48 +02:00
Daan Hoogland
384bce1a97 update without decrypt doesn't work 2018-06-08 12:55:05 +02:00
Daan Hoogland
5fcadbcc62 set unsensitive attributes as not 'Secure' 2018-06-07 22:26:26 +02:00
Daan Hoogland
935ca766dc remove old config artifacts from update path 2018-06-07 07:52:24 +00:00
Rohit Yadav
72e61bfa1d Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-07 11:26:34 +05:30
Nicolas Vazquez
76367db8fb L2: add default L2 network offerings (#2683)
Adds default L2 network offerings. Adds check for existing default L2 networks.
2018-06-07 11:23:35 +05:30
Rohit Yadav
7ce2c2eaf0 Merge branch '4.11': Fixes #2631 VMware dvs portgroup autogrowth (#2634)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 22:21:44 +05:30
Rohit Yadav
1b3046e376
CLOUDSTACK-9184: Fixes #2631 VMware dvs portgroup autogrowth (#2634)
* CLOUDSTACK-9184: Fixes #2631 VMware dvs portgroup autogrowth

This deprecates the vmware.ports.per.dvportgroup global setting.

The vSphere Auto Expand feature (introduced in vSphere 5.0) will take
care of dynamically increasing/decreasing the dvPorts when running out
of distributed ports . But in case of vSphere 4.1/4.0 (If used), as this
feature is not there, the new default value (=> 8) have an impact in the
existing deployments. Action item for vSphere 4.1/4.0: Admin should
modify the global configuration setting "vmware.ports.per.dvportgroup"
from 8 to any number based on their environment because the proposal
default value of 8 would be very less without auto expand feature in
general. The current default value of 256 may not need immediate
modification after deployment, but 8 would be very less which means
admin need to update immediately after upgrade.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 22:16:13 +05:30
Rohit Yadav
65511c4335 Merge branch '4.11': Reduce VR downtime during network restart (#2508)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 13:09:03 +05:30
Rohit Yadav
a77ed56b86
CLOUDSTACK-9114: Reduce VR downtime during network restart (#2508)
This introduces a rolling restart of VRs when networks are restarted
with cleanup option for isolated and VPC networks. A make redundant option is
shown for isolated networks now in UI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-11 12:48:07 +05:30
Khosrow Moossavi
c60dbfd2c8 engine/schema: enhance and cleanup DatabaseUpgradeChecker (#2584)
Using a hierarchy of database version rather than a flat
list of them. Adding a new schema upgrade path was really
cumbersome and error-prone, because we needed to maintain
a flat map of versions and their corresponding list of
upgrade paths (`DbUpgrade`). Instead we're using a logical
hierarchy structure of versions:

```
DatabaseVersionHierarchy.builder()
    .next("4.0.0"   , new Upgrade40to41())
    .next("4.0.1"   , new Upgrade40to41())
    .next("4.0.2"   , new Upgrade40to41())
    .next("4.1.0"   , new Upgrade410to420())
    .next("4.1.1"   , new Upgrade410to420())
    .next("4.2.0"   , new Upgrade420to421())
    ...
    .next("4.2.1"   , new Upgrade421to430())
    .next("4.9.3.0" , new Upgrade4930to41000())
    .next("4.10.0.0", new Upgrade41000to41100())
    .next("4.11.0.0", new Upgrade41100to41110())
    .build();
```

With this change, when we need to add a new version upgrade
path, we only need to add it in correct place in the hierarchy
rather than add that in dozens of places in `_upgradeMap`.
2018-05-09 21:51:06 +05:30
Rohit Yadav
4534cefa40
backports for 4.11.1 from master (#2621)
* CLOUDSTACK-10147 Disabled Xenserver Cluster can still deploy VM's. Added code to skip disabled clusters when selecting a host (#2442)

(cherry picked from commit c3488a51db4bce4ec32c09e6fef78193d360cf3f)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10318: Bug on sorting ACL rules list in chrome (#2478)

(cherry picked from commit 4412563f19ec8b808fe4c79e2baf658507a84873)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10284:Creating a snapshot from VM Snapshot generates error if hypervisor is not KVM.

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

* CLOUDSTACK-10221: Allow IPv6 when creating a Basic Network (#2397)

Since CloudStack 4.10 Basic Networking supports IPv6 and thus
should be allowed to be specified when creating a network.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
(cherry picked from commit 9733a10ecda5f1af0f2c0fa863fc976a3e710946)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10214: Unable to remove local primary storage (#2390)

Allow admins to remove primary storage pool.
Cherry-picked from eba2e1d8a1ce4e86b4df144db03e96739da455e5

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

* dateutil: constistency of tzdate input and output (#2392)

Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
Signed-off-by: Daan Hoogland <daan.hoogland@shapeblue.com>
(cherry picked from commit 2ad520282319da9a03061b8c744e51a4ffdf94a2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* CLOUDSTACK-10054:Volume download times out in 3600 seconds (#2244)

(cherry picked from commit bb607d07a97476dc4fb934b3d75df6affba47086)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* When creating a new account (via domain admin) it is possible to select “root admin” as the role for the new user (#2606)

* create account with domain admin showing 'root admin' role

Domain admins should not be able to assign the role of root admin to new users. Therefore, the role ‘root admin’ (or any other of the same type) should not be visible to domain admins.

* License and formatting

* Break long sentence into multiple lines

* Fix wording of method 'getCurrentAccount'

* fix typo in variable name

* [CLOUDSTACK-10259] Missing float part of secondary storage data in listAccounts

* [CLOUDSTACK-9338] ACS not accounting resources of VMs with custom service offering

ACS is accounting the resources properly when deploying VMs with custom service offerings. However, there are other methods (such as updateResourceCount) that do not execute the resource accounting properly, and these methods update the resource count for an account in the database. Therefore, if a user deploys VMs with custom service offerings, and later this user calls the “updateResourceCount” method, it (the method) will only account for VMs with normal service offerings, and update this as the number of resources used by the account. This will result in a smaller number of resources to be accounted for the given account than the real used value. The problem becomes worse because if the user starts to delete these VMs, it is possible to reach negative values of resources allocated (breaking all of the resource limiting for accounts). This is a very serious attack vector for public cloud providers!

* [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” (#2404)

* [CLOUDSTACK-10230] User is able to change to “Guest OS type” that has been removed

Users are able to change the OS type of VMs to “Guest OS type” that has been removed. This becomes a security issue when we try to force users to use HVM VMs (Meltdown/Spectre thing). A removed “guest os type” should not be usable by any users in the cloud.

* Remove trailing lines that are breaking build due to checkstyle compliance

* Remove unused imports

* fix classes that were in the wrong folder structure

* Updates to capacity management
2018-05-09 15:20:19 +05:30
Rohit Yadav
d91e20ecdc Merge branch '4.11' (#2628)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-08 09:31:53 +05:30
Rafael Weingärtner
7361649310 schema: create upgrade path from 4.9.3.1 to 4.11.1.0 (#2628)
Adds upgrade path from security release 4.9.3.1, which is treated same as 4.9.3.0.
2018-05-08 09:19:28 +05:30
Rohit Yadav
e7bd73e72b Merge branch '4.11' 2018-05-04 12:39:53 +05:30
Rohit Yadav
05857c717d engine/schema: new 4.11.1 systemvmtemplate
This moves db upgrade paths and checks around a new systemvmtemplate
for 4.11.1. The new systemvmtemplate compared to 4.11.0 template
is slightly smaller and has meltdown/spectre fixes among few other
security fixes from Debian and changes to cloud-early-config.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-04 12:37:23 +05:30
Rohit Yadav
4277b92abe Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-30 08:22:16 +02:00
Rohit Yadav
464551208c
xenserver: Add support for XS 7.3, 7.4 and XCP-ng 7.4 (#2605)
This adds support for XenServer 7.3 and 7.4, and XCP-ng 7.4 version as hypervisor hosts. Fixes #2523.

This also fixes the issue of 4.11 VRs stuck in starting for up-to 10mins, before they come up online.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-30 08:19:10 +02:00
Rafael Weingärtner
d6cbd774b7
[CLOUDSTACK-10323] Allow changing disk offering during volume migration (#2486)
* [CLOUDSTACK-10323] Allow changing disk offering during volume migration

This is a continuation of work developed on PR #2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume.

The API method will have the following parameters:

* storageid (required)
* volumeid (required)
* livemigrate(optional)
* newdiskofferingid (optional) – this is the new parameter

The expected behavior is the following:

* If “newdiskofferingid” is not provided the current behavior is maintained. Override mechanism will also keep working as we have seen so far.
* If the “newdiskofferingid” is provided by the admin, we will execute the following checks
** new disk offering mode (local/shared) must match the target storage mode. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** we will check if the new disk offering tags match the target storage tags. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** check if the target storage has the capacity for the new volume. If it does not have enough space, then an exception is thrown and the operator will receive a message indicating the problem.
** check if the size of the volume is the same as the size of the new disk offering. If it is not the same, we will ALLOW the change of the service offering, and a warning message will be logged.

We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.

* Code formatting

* Adding a test to cover migration with new disk offering (#4)

* Adding a test to cover migration with new disk offering

* Update test_volumes.py

* Update test_volumes.py

* fix test_11_migrate_volume_and_change_offering

* Fix typo in Java doc
2018-04-26 20:05:55 -03:00
brett
4c42aafae0 [CLOUDSTACK-10356] Fix NPE in Cloudstack found with NPEDetector (#2573)
* fix https://issues.apache.org/jira/browse/CLOUDSTACK-10356

* del patch file

* Update ResourceCountDaoImpl.java

* fix some format

* fix code

* fix error message in VolumeOrchestrator

* add check null stmt

* del import unuse class

* use BooleanUtils to check Boolean

* fix error message

* delete unuse function

* delete the deprecated function  updateDomainCount

* add error log and throw exception in ProjectManagerImpl.java
2018-04-26 10:03:46 -03:00
Rohit Yadav
9187392ff9
Merge branch '4.11' 2018-04-20 19:02:40 +05:30
ernjvr
b5abdd306e schema: fix create table only if not exists and remove drop table statements (#2582) 2018-04-20 18:58:12 +05:30
lzh3636
fed3492b57 CLOUDSTACK-10357: Improve log messages in methods (#2580)
Fix several logs that mismatch method.
Add stacktraces for throw new statements.
2018-04-20 00:33:27 +05:30
Rafael Weingärtner
685cc7210c [CLOUDSTACK-10344] bug when moving ACL rules (change order with drag and drop) (#2511)
* Add permission to 'moveNetworkAclItem' API method in default roles
2018-04-16 13:45:29 +02:00
lzh3636
106a9a34e1 Update inconsistent debugging info in catch block (#2553)
* Add stack traces information

* update stack trace info

* update stack trace to make them consistent

* update stack traces

* update stacktraces

* update stacktraces for other similar situations

* fix some other situations

* enhance other situations
2018-04-16 09:07:16 +02:00
dahn
8637a50f4e
Upgrade path 4.11 through 4.11.1 to 4.12 (#2559)
* Create database upgrade from 4.11.0.0 to 4.11.1.0 & VMWare version to OS mappings (#2490)

* Create database upgrade from 4.11.0.0 to 4.11.1.0. Add missing VMWare version to OS mapping SQL in the schema-41100to41110.sql.

* add unit test and add 4.11.0.0 entry to _upgradeMap

* upgrade 4.11.1 to 4.12 definition

* applied Nitin's comments
2018-04-13 11:23:14 +02:00
Rafael Weingärtner
b08f9e053f
[CLOUDSTACK-10301] Allow updating the network ACL list name and Description (#2462)
* [CLOUDSTACK-10301] Allow updating the network ACL list name and description

* Fixes suggested by Daan
2018-04-10 08:46:52 -03:00
ernjvr
6b6b3824aa Create database upgrade from 4.11.0.0 to 4.11.1.0 & VMWare version to OS mappings (#2490)
* Create database upgrade from 4.11.0.0 to 4.11.1.0. Add missing VMWare version to OS mapping SQL in the schema-41100to41110.sql.

* add unit test and add 4.11.0.0 entry to _upgradeMap
2018-04-10 10:25:43 +02:00
Rohit Yadav
41895561a7 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-30 16:21:06 +05:30
Rafael Weingärtner
3868886546
Fix the name of the column used to hold IPv4 range in 'vlan' table. (#2492) 2018-03-29 10:39:19 -03:00
ernjvr
7647e104b2 CLOUDSTACK-10278 idempotent column addition (#2449)
* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request

* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines, that end with a semicolon in existing proc, onto one line because com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in line with a semicolon delimeter at the end.

* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs

* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request

* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines, that end with a semicolon in existing proc, onto one line because com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in line with a semicolon delimeter at the end.

* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs
2018-03-28 11:19:08 +00:00
Rafael Weingärtner
0afcec60f4 [CLOUDSTACK-10307] Remove unused things from HostDaoImpl (#2438)
* Remove unused code from CloudZonesStartupProcessor

* Removed unused @Component annotation from HostDaoImpl And unused method
2018-03-27 10:46:25 +00:00
Rohit Yadav
9753cc3681 Merge branch '4.11'
CLOUDSTACK-10341: VR minor fixes to systemvmtemplate (#2468)
CLOUDSTACK-10340: Add setter to hypervisorType in VMInstanceVO (#2504)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-23 12:00:20 +05:30
Rohit Yadav
2a068696f8
CLOUDSTACK-10340: Add setter to hypervisorType in VMInstanceVO (#2504)
This adds a missing setter to set hypervisorType in VMInstanceVO.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-03-23 11:48:13 +05:30
Khosrow Moossavi
1708838518 CLOUDSTACK-10268: Fix and enhance package script (#2433)
- new flag `-T, --use-timestamp` to use `timestamp` when POM version contains SNAPSHOT
  - in the final artifacts (jar) name
  - in the final package (rpm, deb) name
  - in `/etc/cloudstack-release` file of SystemVMs
  - in the Management Server > About dialog
- if there's a "branding" string in the POM version (e.g. `x.y.z.a-NAME[-SNAPSHOT]`),
the branding name will be used in the final generated pacakge name such as following:
  - `cloudstack-management-x.y.z.a-NAME.NUMBER.el7.centos.x86_64`
  - `cloudstack-management_x.y.z.a-NAME-NUMBER~xenial_all.deb`
- branding string can be overriden with newly added `-b, --brand` flag
- handle the new format version for VR version
- fix long opts (they were broken)
- tolerate and show a warning message for unrecognized flags
- usage help reformat

* Deprecate Version class in favor or CloudStackVersion
2018-03-15 10:55:29 +00:00
Rafael Weingärtner
972b8b71d7
CLOUDSTACK-8855 Improve Error Message for Host Alert State and reconnect host API. (#2387)
* CLOUDSTACK-8855 Improve Error Message for Host Alert State

* [CLOUDSTACK-9846] create column to save the content of alert messages

Remove declaration of throws CloudRuntimeException
I also removed some unused variables and comments left behind

This closes #837

* Isolate a problematic test "smoke/test_certauthority_root"
2018-03-14 15:27:43 -03:00
Rafael Weingärtner
7efdaa65f7
[CLOUDSTACK-10314] Add Text-Field to each ACL Rule (#2475)
* [CLOUDSTACK-10314] Add Text-Field to each ACL Rule

It is interesting to have a text field (e.g. CHAR-256) added to each ACL rule, which allows to enter a "reason" for each FW Rule created. This is valuable for customer documentation, as well as best practice for an evidence towards auditing the system

* Formatting to make check style happy and code clean ups
2018-03-13 11:07:35 -03:00
Rafael Weingärtner
f2efbcecec
[CLOUDSTACK-10240] ACS cannot migrate a local volume to shared storage (#2425)
* [CLOUDSTACK-10240] ACS cannot migrate a volume from local to shared storage.

CloudStack is logically restricting the migration of local storages to shared storage and vice versa. This restriction is a logical one and can be removed for XenServer deployments. Therefore, we will enable migration of volumes between local-shared storages in XenServers independently of their service offering. This will work as an override mechanism to the disk offering used by volumes. If administrators want to migrate local volumes to a shared storage, they should be able to do so (the hypervisor already allows that). The same the other way around.

* Cleanups implemented while working on [CLOUDSTACK-10240]

* Fix test case test_03_migrate_options_storage_tags

The changes applied were:
- When loading hypervisors capabilities we must use "default" instead of nulls
- "Enable" storage migration for simulator hypervisor
- Remove restriction on "ClusterScopeStoragePoolAllocator" to find shared pools
2018-03-07 18:23:15 -03:00
Rafael Weingärtner
5a5b1354bd
Merge pull request #2463 from rafaelweingartner/createPathUpgrade4.12.0.0
[CLOUDSTACK-10302] Create database path upgrade from 4.11.0.0 to 4.12.0.0
2018-02-27 16:27:35 -03:00
Rohit Yadav
0ece15f86e Updating pom.xml version numbers for release 4.11.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-02-26 16:57:48 +01:00
Rafael Weingärtner
06ef61b96d
Merge pull request #2443 from rafaelweingartner/CLOUDSTACK-9338
[CLOUDSTACK-9338] ACS is not accounting resources of VMs with custom service offering properly
2018-02-23 11:07:38 -03:00
Rafael Weingärtner
c8d9754b43 Remove dead code in DatabaseUpgradeChecker 2018-02-20 08:07:14 -03:00
Rafael Weingärtner
0081dca825 Create database path upgrade from 4.11.0.0 to 4.12.0.0 2018-02-20 08:04:35 -03:00
Rafael Weingärtner
e532b574dd Forward merge #2402 merged on '4.11' branch
[CLOUDSTACK-10128] Simplify the search for hosts to execute commands
2018-02-19 18:05:00 -03:00
Rafael Weingärtner
264036bd2c
Merge pull request #2402 from rafaelweingartner/fixCLOUDSTACK-10128
[CLOUDSTACK-10128] Simplify the search for host to execute command
2018-02-19 17:54:01 -03:00