10258 Commits

Author SHA1 Message Date
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
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
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
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
nvazquez
08a8330633 CLOUDSTACK-10326: Fix for infinite loop on PrepareForMaintenance 2018-06-11 09:53:21 -03:00
nvazquez
cc35f9ddb0 CLOUDSTACK-10326: Prevent hosts fall into Maintenance when there are running VMs on it 2018-06-11 09:53:20 -03:00
Mike Tutkowski
c7d6376964 Removing an old, unused NetApp plug-in 2018-06-08 12:55:39 -06:00
Frank Maximus
68d87d8f2a CLOUDSTACK-10381: Fix password reset / reset ssh key with ConfigDrive 2018-06-08 18:41:47 +02:00
Rohit Yadav
1d132d0e58 Merge branch '4.11' 2018-06-08 13:45:31 +05:30
Nicolas Vazquez
a5856a6447 network: allow advanced zones with security groups and VXLAN isolation type (#2693)
Not possible to deploy an Advanced zone with Security Groups, and VXLAN isolation method on KVM. Exception: "Unable to convert network offering with specified id to network profile" is logged.
2018-06-08 13:13:25 +05:30
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
9146d7b7a0 Merge branch '4.11' 2018-06-06 12:41:18 +05:30
Frank Maximus
8798014ca8 CLOUDSTACK-10377: Fix Network restart for Nuage (#2672)
Changes in PR #2508 have caused network restart to fail in a Nuage setup,
as the new VR takes the same IP as the old one, and the old VR is still running.
Nuage doesn't support multiple VM's having the same IP.
We delay provisioning the interfaces in VSD until the old VR interface is released.
2018-06-06 12:17:10 +05:30
Rafael Weingärtner
9b83337658 Create unit test cases for 'ConfigDriveBuilder' class (#2674)
* Create unit test cases for 'ConfigDriveBuilder' class

* add method 'getProgramToGenerateIso' as suggested by rohit and Daan

* fix encoding for base64 to StandardCharsets.US_ASCII

* fix MockServerTest.testIsMockServerCanUpgradeConnectionToSsl()

This is another method that is causing Jenkins to fail for almost a month
2018-06-04 13:20:09 +02:00
Rohit Yadav
76a4e56ef3 Merge branch '4.11' 2018-05-23 20:42:10 +05:30
dahn
7a3a882d12 server: Fixes #2545 revert dedicate vlan code removal (#2664)
This re-adds logic to allow dedication of public ip/range to a domain and its usage.
2018-05-23 20:40:34 +05:30
Rohit Yadav
ebb22a4818 server: Calculate fresh capacity per VM (#2663)
This fixes and ensures that every VM has its capacity individually
calculated, with the initial override of 1.0f as overcommit ratio.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-23 16:20:07 +02:00
Rohit Yadav
ada1e730c8 Merge branch '4.11' 2018-05-22 17:03:24 +05:30
Rafael Weingärtner
8b09620d77 CLOUDSTACK-10276: listVolumes not working when storage UUID is not a UUID (#2639)
When configuring a pre-setup primary storage we can enter the name-label of the storage that is going to be used by ACS and is already set up in the host. The problem is that we can use any String of characters there, and this String does not need to be a UUID. When listing volumes from a primary storage that has such conditions, the list will return all of the volumes in the cloud because the “API framework” will ignore that value as it is not a UUID type.
2018-05-22 17:02:40 +05:30
Rohit Yadav
9c1eabfc28 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-21 16:27:51 +05:30
Gabriel Beims Bräscher
02ece53375 addNicToVirtualMachine: Fixes #2540 handle invalid MAC address arg (#2653)
Look for the next available MAC address if the given MAC address in command addNicToVirtualMachine is invalid (null, empty, blank). Fixes #2540
2018-05-21 16:24:21 +05:30
Rohit Yadav
7c6777b8d3 Merge branch '4.11': allow config drives on primary storage for KVM (#2651)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-21 14:50:55 +05:30
Rohit Yadav
acc5fdcdbd
CLOUDSTACK-10290: allow config drives on primary storage for KVM (#2651)
This introduces a new global setting `vm.configdrive.primarypool.enabled` to toggle creation/hosting of config drive iso files on primary storage, the default will be false causing them to be hosted on secondary storage. The current support is limited from hypervisor resource side and in current implementation limited to `KVM` only. The next big change is that config drive is created at a temporary location by management server and shipped to either KVM or SSVM agent via cmd-answer pattern, the data of which is not logged in logs. This saves us from adding genisoimage dependency on cloudstack-agent pkg.

The APIs to reset ssh public key, password and user-data (via update VM API) requires that VM should be shutdown. Therefore, in the refactoring I removed the case of updation of existing ISO. If there are objections I'll re-put the strategy to detach+attach new config iso as a way of updation. In the refactored implementation, the folder name is changed to lower-cased configdrive. And during VM start, migration or shutdown/removal if primary storage is enable for use, the KVM agent will handle cleanup tasks otherwise SSVM agent will handle them.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-21 14:27:23 +05:30
Rohit Yadav
93e374599a Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-21 13:23:13 +05:30
Nicolas Vazquez
06f7e495dc Host Affinity plugin (#2630)
This implements a new host-affinity plugin.
2018-05-21 12:49:08 +05:30
Nicolas Vazquez
9aa1743984 registerIso: Fixes #2654 register iso in all zones (#2652)
Fix to register of iso in all zones. Fixes #2654.
2018-05-21 12:26:31 +05:30
Rafael Weingärtner
0afba54cd5 Re-add code that was missed during merge forward of PR#2629 2018-05-16 17:13:50 -03:00
Rafael Weingärtner
15eddf3dd6 Merge forward branch '4.11' PR #2629
Fix primary storage count when deleting volumes (#2629)
2018-05-16 16:59:17 -03:00
Rafael Weingärtner
b9ed42bd29
Fix primary storage count when deleting volumes (#2629)
* Primary Storage count for an account does not decrease when a Data Disk is deleted

When a data disk is created and not attached in a running VM, the "deleteVolume" will not decrement the count for used primary storage in the VMs accounting information. The property that is not being decremented is called "primarystoragetotal"; this information can be retrieved via "listAccounts" API method.

Steps to reproduce this issue:
1 - Create an account, deploy a VM in it
2 - Check the primary storage count for the account with listAccounts API
3 - Create a data disk
4 - Check the primary storage count for the account with listAccounts API
5 - Delete the Data disk
6 - Check the primary storage count for the account with listAccounts API - It is the same as before deleting the data disk (it should not be the same as the value in step 2!)

* formatting and cleanups

* fix imports that were wrongly changed during rebase
2018-05-16 15:28:28 -03:00
Rohit Yadav
a7e248983e Merge branch '4.11': config-drive: use hostname of VM instance of internal VM id (#2645)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-16 13:24:14 +05:30
Rohit Yadav
f663b926c7
config-drive: use hostname of VM instance of internal VM id (#2645)
This fixes config drive to use VM's user provided host-name instead of
the internal VM instance ID for hostname related config in both
cloudstack and openstack metadata bundled in the ISO.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-16 13:19:21 +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
Rohit Yadav
1b10c188f2 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 23:01:55 +05:30
Kui LIU
951f73b107 CLOUDSTACK-10362: Change the "getXXX" method names to "isXXX" (#2600)
These Boolean-return methods are named "getXXX", but other Boolean-return methods are named "isXXX", such as the following two methods. They will return boolean values, rename them as "isXXX" should be more clear than "getXXX".
2018-05-09 21:44:40 +05:30
Nicolas Vazquez
bd89760108 config-drive: support user data on L2 networks (#2615)
Supporting ConfigDrive user data on L2 networks.
Add UI checkbox to create L2 network offering with config drive.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 21:33:11 +05:30
Rohit Yadav
f77b1a7d00 Merge branch '4.11'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 18:04:53 +05:30
Rohit Yadav
253f7d7728
listostypes: Fixes #2529 return boolean than string in response (#2632)
This returns the boolean value of the `isuserdefined` key than
converting it to string. Fixes #2529.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-09 18:03:09 +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
Rafael Weingärtner
bc8a0c1090
Remove "self-injection" of AccountManagerImpl (#2619)
While working on other PRs I noticed that the singleton AccountManagerImpl had a reference for itself. That is not needed. Therefore, I removed it.
2018-05-08 09:42:05 -03:00
Rafael Weingärtner
55f45e75aa
Allow changing disk offering of VMs' root volume (#2607)
Currently, users are not able to change the disk offering of VMs' root volumes. It might be interesting to allow such changes, so users would be able to move a VM initially deployed in shared storage to local storage and vice versa. It is also interesting to enable changing the quality of service offered to root disks.

We are allowing only administrators to execute the change of root volumes disk offerings during volume migration between storage. Therefore, we perform all at once, the migration of storage and the disk offering to reflect the new place.
2018-05-08 09:40:58 -03:00