34324 Commits

Author SHA1 Message Date
Daniel Augusto Veronezi Salvador
7b752c3077
Externalize KVM Agent storage's timeout configuration (#5239)
* Externalize KVM Agent storage's timeout configuration

* Address @nvazquez review

* Add empty line at the end of the agent.properties file

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-07-28 15:45:27 +02:00
Daniel Augusto Veronezi Salvador
1f5ee5b3e3
Improve logs on ConsoleProxyManagerImpl and refactor a few process (#4959) 2021-07-27 19:56:14 -03:00
Rohit Yadav
c6cb30d1ea Merge remote-tracking branch 'origin/4.15' into main 2021-07-27 17:47:05 +05:30
Abhishek Kumar
6540d9965b
ui: submit form with false boolean params (#5224)
Skip only empty strings while submitting UI form.
Fixes #5223

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-27 15:03:45 +05:30
Abhishek Kumar
8ed5a4fae6
ui: fix create shared network with multi-zone (#5205)
Fixes create shared network form for multi-zone environments.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-27 15:01:54 +05:30
Pearl Dsilva
826e479cf5
api: Fix pagination for list PublicIPAddresses (#5231)
* api: Fix pagination for list PublicIPAddresses

* refactor based on comment
2021-07-27 15:00:56 +05:30
davidjumani
0c6b8fe205
ui: Update header notice if job failed (#5245) 2021-07-27 14:58:59 +05:30
davidjumani
a436869212
ui: Fix comparator for boolean (#5246) 2021-07-27 14:58:18 +05:30
davidjumani
2643854173
ui: Fix current for vmsnapshots (#5247) 2021-07-27 14:57:55 +05:30
Gabriel Beims Bräscher
6cd5b36347
[UI] Add Shift key for noVNC consoles (#5237) 2021-07-27 09:58:34 +02:00
Abhishek Kumar
87ee86679e
ui: vmware vm import-unmanage (#5075)
Adds UI for importing and unmanaging VMs.
A new navigation section - Tools has been added in the UI.

Doc PR: apache/cloudstack-documentation#221

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-27 11:12:37 +05:30
davidjumani
37f3fc30c9 Merge remote-tracking branch 'apache/4.15' into main 2021-07-27 10:23:00 +05:30
Daniel Augusto Veronezi Salvador
3c1219a5e2
Add logs to api removeVpnUser (#4616)
Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-07-26 23:28:06 -03:00
slavkap
446337b4cc
Fix of shrinking volumes with QCOW2 format (#5225)
* Fix of shrinking volumes with QCOW2 format

If the volumes are with QCOW2 format the shrinking will be handled on
the agents side. There are cases in some storage plugins where the
volumes' format is kept in the DB in QCOW2 but the actual format is raw.
Till the current implementation this was limiting the plugins to shrink
the volumes. Now this will be handled by the storage plugins

* Addressed @nvazquez suggested change

Will log the exception instead the exception message
2021-07-26 08:37:47 -03:00
Hoang Nguyen
8efc3ea0f5
UI: Submit the form when press CTRL + ENTER (#4766)
* fixes: submit the form when press enter

* add Enter submit for component missing

* add ctrl+enter event key for submitting form

* add directive.js check keyup event

* fix build test failure

* using directive in main.js

* fix warning show in the test unit

* fix multiple submits

* fix travis run test failures

* fix filter button style

* fix the problem of ctrl+enter keyup on firefox browser

* removed computed function not using

* remove space errror

* add ref for ctrl+enter submit

* resolve conflit and fix build

* add missing directive

* add missing directive & ref button

* fixes errors

* fixes errors

* add preventDefault()

* fix ctrl keypress not support on firefox
2021-07-26 08:29:19 -03:00
Wei Zhou
7678bc1293
ui bug fix: scalevm is disabled when vm is Stopped (#5233)
* ui: scalevm is disabled even if vm is Stopped

* ui: update #5233
2021-07-26 08:28:42 -03:00
Michael
29090fe4ab
Only display information, if they are relevant (#5206) 2021-07-26 08:28:07 -03:00
davidjumani
b065e79ae3
ui: Fix refresh issue (#5232) 2021-07-26 09:58:05 +02:00
DK101010
c23cbdff8d
Remove condition that are prevent resizing for root volumes (vmware) (#5186)
* remove condition that are prevent resizing for root volumes

* adjust tests acordingly

* enable disk resize tests for VMware

Co-authored-by: DK101010 <dirk.klahre@itelligence.de>
Co-authored-by: mib1185 <mail@mib85.de>
2021-07-21 22:33:51 -03:00
SadiJr
eff2da2518
Refactor and improvements for method com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.createVMFromSpec() (#5149)
* Refactor method createVMFromSpec

* Add unit tests

* Fix test

* Extract if block to method for add extra configs to VM Domain XML

* Split travis tests trying to isolate which test is causing an error

* Override toString() method

* Update documentation

* Fix checkstyle error (line with trailing spaces)

* Change VirtualMachineTO print of object

* Add try except to find message error. Remove after test

* Fix indent

* Trying to understanding why is happening in this code

* Refactor method createVMFromSpec

* Add unit tests

* Fix test

* Extract if block to method for add extra configs to VM Domain XML

* Split travis tests trying to isolate which test is causing an error

* Override toString() method

* Update documentation

* Fix checkstyle error (line with trailing spaces)

* Remove unnecessary comment

* Revert travis tests

Co-authored-by: SadiJr <17a0db2854@firemailbox.club>
2021-07-21 15:07:25 -03:00
Daniel Augusto Veronezi Salvador
eb3acc334b
Externalize tls version and security protocols configuration on mail sending (#5119)
* Externalize configs to alert

* Externalize configs to project

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2021-07-21 09:01:11 -03:00
dahn
1f8b34f5c5
add entity-type to message when no UUID is found for a DB ID (#5163)
* add entity-type to message

* Update server/src/main/java/com/cloud/uuididentity/UUIDManagerImpl.java

* update for review comments

* syntax

* Avoid NPE when entity type is null, and throw appropriate exception

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2021-07-21 08:01:08 -03:00
davidjumani
c4388d78e0
ui: Refresh only on current / parent page (#5214) 2021-07-21 11:35:30 +02:00
davidjumani
84e52c9263
ui: Fix async poll job (#5221) 2021-07-21 10:30:32 +02:00
davidjumani
61de48904c
ui: Replace bulk delete icons (#5222) 2021-07-21 09:51:36 +02:00
Pearl Dsilva
1f743e911a
api: Add 'created' field to API response (#5210)
* api: Add 'created' field to API response

* address comments
2021-07-20 18:04:13 -03:00
dahn
6f93e5cd08
Revert "Externalize kvm agent storage timeout configuration (#4585)" (#5218)
This reverts commit 05a978c2495d1c93c798d2b845c5030ad78f6a14.
2021-07-20 09:16:43 +02:00
davidjumani
908bf980a5 ui: Fix title error 2021-07-20 10:32:39 +05:30
davidjumani
27d674df7d Merge branch '4.15' into main 2021-07-20 10:20:31 +05:30
Hoang Nguyen
535761b2b9
UI: Refactor async job polling codebase-wide (#4782)
* refactor async job polling codebase-wide

* fix multiple call fetchData() when async job completed

* remove unnecessary functions

* remove const not use

* move closeaction out of handleResponse

* call closeAction without waiting for all group actions to complete

* refactor polljob network provider

* removed variable not use

* remove await
2021-07-19 08:50:54 -03:00
Daniel Augusto Veronezi Salvador
05a978c249
Externalize kvm agent storage timeout configuration (#4585)
* Externalize KVM Agent storage's timeout configuration

Created a class of constant agent's properties available to configure on "agent.properties".
Created a class to provides a facility to read the agent's properties file and get its properties.

* Refactored KVHAMonitor nested thread and changed some logs

* It has been added the timeout's config in the agent.properties file

* Rename classes

* Rename var and remove comment

* Fix typo with word "heartbeat"

* Extract multiple methods call to variables

* Add unit tests to file handler

* Increase info about the property

* Create inner class Property

* Rename method getProperty to getPropertyValue

* Remove copyright

* Remove copyright

* Extract code to createHeartBeatCommand

* Change method access from protected to private

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-07-19 09:41:50 +02:00
sureshanaparti
f7fdc8a974
Do remove volume only on expunge (#5213) 2021-07-17 12:01:54 +05:30
Spaceman1984
96c9c5a5e2
Added disk provisioning type support for VMWare (#4640)
* Added disk provisioning type support for VMWare

* Review changes

* Fixed unit test

* Review changes

* Added missing licenses

* Review changes

* Update StoragePoolInfo.java

Removed white space

* Review change - Getting disk provisioning strictness setting using the zone id and not the pool id

* Delete __init__.py

* Merge fix

* Fixed failing test

* Added comment about parameters

* Added error log when update fails

* Added exception when using API

* Ordering storage pool selection to prefer thick disk capable pools if available

* Removed unused parameter

* Reordering changes

* Returning storage pool details after update

* Removed multiple pool update, updated marvin test, removed duplicate enum

* Removed comment

* Removed unused import

* Removed for loop

* Added missing return statements for failed checks

* Class name change

* Null pointer

* Added more info when a deployment fails

* Null pointer

* Update api/src/main/java/org/apache/cloudstack/api/BaseListCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Small bug fix on API response and added missing bracket

* Removed datastore cluster code

* Removed unused imports, added missing signature

* Removed duplicate config key

* Revert "Added more info when a deployment fails"

This reverts commit 2486db78dca8e034d8ad2386174dfb11004ce654.

Co-authored-by: dahn <daan.hoogland@gmail.com>
2021-07-16 22:37:42 -03:00
Pearl Dsilva
15d3d39cb2
UI: bulk action support for various resources (#5034)
* ui: support bulk action for various resources

* ui: support bulk action for various resources

* Bulk actions support - progress review

* Extract common code + suppress error notification with bulk actions

* cleanup + suppress notification

* add progress view

* Add routes to notification + add async jobs + refactor progress view

* minor tweaks

* fix group action for vpn users

* Refactor code

* Unique row key

* remove redundant cols

* address comments

* Added the following:
1. Make Cancel as default button for bulk actions
2. Add Filter Filter on the Operation status Column - Progress View
3. For Stop and delete bulk operations - add An alert message(in Red) to inform users that it is a destructive operation

* Add dynamism to column filtering
2021-07-16 10:33:04 +02:00
Gregor Riepl
ff07fee286
api: Fix deprecation of CIDR_LIST parameter (#5211)
* Revert deprecation of CIDR_LIST parameter in CreateFireWallRule

* Deprecate CIDR_LIST parameter in CreateLoadBalancerRule

* Deprecate CIDR_LIST parameter in CreateIpForwardingRule
2021-07-16 12:11:40 +05:30
Daniel Augusto Veronezi Salvador
cbe380a068
Externalize secondary storage capacity threshold (#4790)
* Externalize secondary storage capacity threshold

* Use default value as threshold when config value is lower than 0.0

* Move config to CapacityManager

* Validate config in CapacityManagerImpl

* Use config in StorageOrchestrator

* Change config description

* Remove unused import

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-07-16 08:38:36 +02:00
Abhishek Kumar
5ac184edd6 Merge remote-tracking branch 'apache/4.15' into main 2021-07-15 14:02:49 +05:30
Rohit Yadav
5228fae7b8
kvm: pre-add 32 PCI controller for hot-plug issue on ARM64 (#5193)
On newer libvirt/qemu it seems PCI hot-plugging could be an issue as
seen in:

https://www.suse.com/support/kb/doc/?id=000019383
https://bugs.launchpad.net/nova/+bug/1836065

This was found to be true on ARM64/aarch64 platform (tested on
RaspberryPi4). As per the default machine doc, it advises to
pre-allocate PCI controllers on the machine and pcie-to-pci-bridge based
controller for legacy PCI models:
https://libvirt.org/pci-hotplug.html#x86_64-q35

This patch introduces the concept as a workaround until a proper fix is
done (ideally in the upstream libvirt/qemu projects). Until then client
code can add 32 PCI controllers and a pcie-to-pci-bridge controller for
aarch64 platforms.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-07-15 13:15:10 +05:30
Gabriel Beims Bräscher
1d831a32a9
kvmk: KVM NFS disk IO driver supporting IO_URING (#5012)
Currently there is no disk IO driver configuration for VMs running on KVM. That's OK for most the cases; however, recently there have been added some quite interesting optimizations with the IO driver io_uring.

Note that IO URING requires:

Qemu >= 5.0, and
Libvirt >= 6.3.0.
By using io_uring we can see a massive I/O performance improvement within Virtual Machines running from Local and/or NFS storage.

This implementation enhances the KVM disk configuration by adding workflow for setting the disk IO drivers. Additionally, if the Qemu and Libvirt versions matches with the required for having io_uring we are going to set it on the VM. If there is no support for such driver we keep it as it is nowadays, without any IO driver configured.

Fixes: #4883
2021-07-15 13:02:44 +05:30
Rohit Yadav
cc27c70e5f
systemvmtemplate: use latest LTS kernel from buster-ports (#5073)
* systemvmtemplate: use latest LTS kernel from buster-ports

Use the latest v5.10 Linux kernel (LTS) from buster-ports

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

* Update configure_grub.sh

* changes

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

* fix failing build

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

* Update install_systemvm_packages.sh
2021-07-15 13:00:51 +05:30
Abhishek Kumar
e0141ab348
server: fix network access for addNicToVirtualMachine API (#5184)
New NICs shouldn't added to VM with network from admin account, same as deployment.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-15 12:57:37 +05:30
Abhishek Kumar
50a16979c5
refactor: migrate vm with storage (#5030)
* refactor: migrate with storage host capability check

Refactors Boolean HypervisorCapabilitiesDao::isStorageMotionSupported to boolean HypervisorCapabilitiesDao::isStorageMotionSupported for simplifying callers.
Refactors log messages.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* simplify

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* review comments addressed

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* var rename

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-15 12:57:13 +05:30
Abhishek Kumar
757bc2d917
vmware: fix migrate vm with volume (#5170)
* vmware: fix migrate vm with volume

Recent forward merge of 4.15 branch accidentally brought a bug in VM relocation method for VMware while trying to find datastore for the migrated volume.
This PR fixes it by using either of available target or source host.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2021-07-15 12:56:26 +05:30
Hoang Nguyen
7123269937
ui: deploy VM - FIX missing custom iops field (#5199)
Fixes #5192
2021-07-15 12:53:50 +05:30
Michael
6b5adb7ed5
ui: register vue component Descriptions (#5197) 2021-07-15 12:53:04 +05:30
Hoang Nguyen
476f77a683
ui: change edit traffic type form of VMware (#5178)
Fixes #5177
2021-07-15 12:51:11 +05:30
Wei Zhou
cf0f1feb5e
configdrive: fix some failures in tests/component/test_configdrive.py (#5144)
* server: fix failed to apply userdata when enable static nat

* server: fix cannot expunge vm as applyUserdata fails

* configdrive: fix ISO is not recognized when plug a new nic

* configdrive: detach and attach configdrive ISO as it is changed when plug a new nic or migrate vm

* configdrive test: (1) password file does not exists in recreated ISO; (2) vm hostname should be changed after migration

* configdrive: use centos55 template with sshkey and configdrive support

* configdrive: disklabel is 'config-2' for configdrive ISO

* configdrive: use copy for configdrive ISO and move for other template/volume/iso

* configdrive: use public-keys.txt

* configdrive test: fix (1) update_template ; (2) ssh into vm by keypair
2021-07-15 12:49:37 +05:30
davidjumani
f98d35d4a4
api: Ensure required parameters are not empty (#5136)
* apiserver : Ensure required parameters are not empty

* supported services are not required as they can be empty

* Removing redudndant validators
2021-07-15 12:48:24 +05:30
Abhishek Kumar
0406e27af3
ui: refactor get api params in forms (#5064)
* ui: refactor get api params in forms

Refactor code getting api params for APIs in UI forms.
Added a new util plugin in plugins.js

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-07-15 12:46:54 +05:30
Abhishek Kumar
041948c04f
ui: refactor labels with tooltip in forms (#5133)
* ui: refactor labels with tooltip in forms

Adds new Vue component TooltipLabel for easier re-use

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* moved component in widgets

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* moved TooltipButton in widgets

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* missing change in previous commit

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* changes

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>

* form improvements

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* tooltip icon class fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update ui/src/views/storage/UploadLocalVolume.vue

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>

* Update ui/src/views/storage/CreateVolume.vue

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2021-07-15 12:45:38 +05:30