35189 Commits

Author SHA1 Message Date
Rohit Yadav
3ac91aa452 pom: add sonar project properties
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-15 20:44:01 +05:30
Rohit Yadav
2dcdc56115
.github: run coverage on pull request (#6265)
The pull_request_target doesn't seem to work for PRs from forks,
this reverts to use and kick the workflow for pull_request instead.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-15 20:35:22 +05:30
John Bampton
cfa4f33940
.github/linters: Enable flake8 W293 blank line contains whitespace (#6268)
https://www.flake8rules.com/rules/W293.html
2022-04-15 20:32:52 +05:30
Gabriel Beims Bräscher
50b2dc2789
server: Fix #6263 Cannot scale VM with custom offering (#6267)
* When scaling with custom offering, which changes only CPU/Memory and keeps same disk offering an exception is thrown.

This commit fixes such cases by checking if the operation is happening on a custom service offering.

* Improve the unit tests that cover null objects.
2022-04-15 20:28:31 +05:30
Hoang Nguyen
fecc5254de
ui: fixes style ui issues (#6261)
This PR for fixes some UI Bugs

 The project selected color is not displayed after switching project
 Project view, the cards are not separated but stick together
 Dashboard: The color of the selected zone is not displayed
 Dark mode: Hover through row tables that are discolored
2022-04-15 20:27:16 +05:30
Wei Zhou
aa0197c141
kvm: truncate vnc password to 8 chars (#6244)
This PR truncates the vnc password of kvm vms to 8 chars to support latest versions of libvirt.
2022-04-15 20:26:42 +05:30
slavkap
4004dfcfd8
StorPool storage plugin (#6007)
* StorPool storage plugin

Adds volume storage plugin for StorPool SDS

* Added support for alternative endpoint

Added option to switch to alternative endpoint for SP primary storage

* renamed all classes from Storpool to StorPool

* Address review

* removed unnecessary else

* Removed check about the storage provider

We don't need this check, we'll get if the snapshot is on StorPool be
its name from path

* Check that current plugin supports all functionality before upgrade CS

* Smoke tests for StorPool plug-in

* Fixed conflicts

* Fixed conflicts and added missed Apache license header

* Removed whitespaces in smoke tests

* Added StorPool plugin jar for Debian

the StorPool jar will be included into cloudstack-agent package for
Debian/Ubuntu
2022-04-14 11:12:01 -03:00
Rohit Yadav
9067938a0d .github: try kicking coverage via pull_request_target sync
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-14 18:03:36 +05:30
Rohit Yadav
cd24cf2daa
.github: improve coverage run (#6238)
Add support to detect and kick UI builds and run quality
build and report coverage for the PR.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-14 17:51:36 +05:30
Pearl Dsilva
05c907b3a8
ui: Allow editing VM and template settings (#6262) 2022-04-14 10:37:30 +02:00
nvazquez
a1fb44e41f
Merge branch '4.16' 2022-04-14 01:22:09 -03:00
Pearl Dsilva
08bfb4444a
ui: Add project switch to the Kubernetes tab (#6260) 2022-04-14 01:21:05 -03:00
Pearl Dsilva
b4ac98efa3
ui: Display action buttons in Project Accounts Tab view if project Admin (#6257) 2022-04-14 01:20:11 -03:00
Wei Zhou
bbb4ffa593
UI: fix dedicate public ip range to domain (#6258) 2022-04-14 01:19:23 -03:00
nvazquez
3674aff4d4
Merge branch '4.16' 2022-04-14 01:17:38 -03:00
Rakesh
c7941278f7
Allow creating snapshot from VM snapshot (#4739)
If `kvm.snapshot.enabled` is set to false then we cant create snapshot from
VM snapshot. With this change, its possible to create snapshot from VM
snapshot even when the global setting is set to false.
Note that you still cant directly create a snapshot from volume though
2022-04-14 01:16:59 -03:00
Nicolas Vazquez
fbf77978e1
Fix: Allow disabling the login attempts mechanism for disabling users (#6254)
* Fix: Allow disabling the login attempts mechanism for disabling users

* Refactor
2022-04-14 01:11:43 -03:00
Rohit Yadav
fc31b527b1
maven: upgrade to latest spring-framework release (#6250)
Upgrades spring framework and reload4j dependencies

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-13 21:53:12 +05:30
dahn
6140903004
local versions of .env ignored (#6256)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-04-13 09:46:07 -03:00
nvazquez
65dc2df896
Merge branch '4.16' 2022-04-13 08:45:48 -03:00
slavkap
42a92dcdd3
Extract the IO_URING configuration into the agent.properties (#6253)
When using advanced virtualization the IO Driver is not supported. The
admin will decide if want to enable/disable this configuration from
agent.properties file. The default value is true
2022-04-13 08:43:35 -03:00
nvazquez
67002b67ec
Merge branch '4.16' 2022-04-13 07:22:56 -03:00
Wei Zhou
91a5f0e285
server: honor global setting system.vm.default.hypervisor as first option when deploy VRs (#6160) 2022-04-13 07:22:22 -03:00
Wei Zhou
daa13af626
UI: fix icon user-delete-outlined for release dedicated public ip range (#6255) 2022-04-13 09:20:56 +02:00
nvazquez
7e8db7cece
Merge branch '4.16' 2022-04-12 13:28:53 -03:00
Wei Zhou
19a7774cab
VR: add rules for traffic between static nat and private gateway static routes (#6153) 2022-04-12 13:26:51 -03:00
Pearl Dsilva
6ec013718a
ui: Fix uploadCustomCertificate form in infraSummary view (#6248)
* ui: Fix uploadCustomCertificate form in infraSummary view

* vertical form layout

* align buttons

* update form rules
2022-04-12 13:20:19 -03:00
Daniel Augusto Veronezi Salvador
39fad2d9d7
KVM disk-only based snapshot of volumes instead of taking VM's full snapshot and extracting disks (#5297)
* Refactor create volume snapshot with running VM

* Refactor create volume snapshot with stopped VM

* Refactor create volume from snapshot

* Refactor create template from snapshot

* Refactor volume migration (migrateVolume/ migrateVirtualMachineWithVolume)

* Refactor snapshot deletion

* Refactor snapshot revertion

* Adjusts and fix cherry-pick conflicts

* Remove diffuse tests

* Add validation to add flag '--delete' on command 'virsh blockcommand' only if libvirt version is equal or higher 6.0.0

* Expunge temporary snapshot only if template creation is from snapshot

* Extract strings to constant

* Remove unused imports

* Fix error on revert backed up snapshot

* Turn method's return to void as it is not used

* Rename method in SnapshotHelper

* Fix folder creation when using SharedMountPoint pool

* Remove static import

* Remove unnused method

* Cover take snapshot in centos 7

* Handle right snapshot flag according to qemu version

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-04-12 08:14:27 -03:00
Rohit Yadav
72f13a6cea .github: fix incorrect tagging of PR author
Due to github push events and restrictive github action access, the
statement is changed without tagging the author with the assumption
that the PR author is subscribed to the PR events and should get a
notification and/or email.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-12 14:04:40 +05:30
Pearl Dsilva
431c352a6d
Synchronization of network devices on newly added hosts for Persistent Networks (#5977)
* Persistent Network feature & Marvin component tests

* Cleaned up comments and imports

* fixed small error

* add support to add setup persistent networks' resources when a disabled host is enabled

* small fix

* use wildcard instead of hard-coding the bridge name

* allow clean up of resources when removing a host in maintenance mode

* skip test for simulator hypervisor

Co-authored-by: shatoboar <sang-woo.bae@campus.tu-berlin.de>
2022-04-11 23:12:05 -03:00
Nicolas Vazquez
5435b0abfe
Direct download certificates additions and improvements (#6104)
* Add direct download certificates listing

* Restore class to original project

* Small refactor

* Register API

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Refactor after review

* Fix checkstyle

* Add hosts mapping to API response

* Improvements on revoke certificate

* Refactor revoke certificate API

* Fix condition

* Filter only certificates not revoked for revokeCertificate API

* Improve upload certificate and add provision certificate API

* Improve certificate response output

* Address review comments

* Refactor revoke cert test

* Fix marvin test

* Address review comments

* Fix issues

* Improvements

* Refactor upload template API response

* Fix response

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2022-04-11 22:57:23 -03:00
Nicolas Vazquez
177f04839c
UI: Fix protocol reset after changing provider on Add Primary Storage (#6243) 2022-04-11 20:09:45 +02:00
Abhishek Kumar
63a9da9548
ui: use different icon labe for releaseIpAddress action (#6235)
In publicip view, actions disassociateIpAddress and releaseIpAddress actions are shown same which could cause confusion for user.
Added a different icon and label for releaseIpAddress action

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-04-11 11:45:57 -03:00
nvazquez
ed55002795
Merge branch '4.16' 2022-04-11 11:20:10 -03:00
Pearl Dsilva
b6072fc826
Allow expunging a VM on a deleted host when using host cache and ConfigDrive userdata service (#6234) 2022-04-11 11:19:37 -03:00
Hoang Nguyen
5eb2b693e9
fixes login button not work and Single Sign-On tab disabled after logout (#6197) 2022-04-11 10:45:51 -03:00
José Flauzino
16f2896940
Persistence of VM stats (#5984)
* Add persistence of VM stats

* Fix API 'since' attribute

* Add license

* Address GutoVeronezi's reviews

* Fix the order of VM stats in the API response

* Fix msid in VM stats data

* Fix disk stats and add minor improvements

* Add log message

* Build string using ReflectionToStringBuilderUtils

* Rerun checks

Co-authored-by: joseflauzino <jose@scclouds.com.br>
2022-04-11 10:42:21 -03:00
Rohit Yadav
1b46635947 Merge remote-tracking branch 'origin/4.16' into main 2022-04-11 16:13:56 +05:30
dahn
ee2ded8200
potential null pointer in condition; AYAI9l8k5Irk9_td-cXb (#6237)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-04-11 16:07:11 +05:30
Nicolas Vazquez
e0ce0228cc
ui: Fix Add secondary storage (#6241)
This PR fixes the Add secondary storage wizard failing due to a missing parameter
Fixes: #6239
2022-04-11 13:46:36 +05:30
Rohit Yadav
8add4df0fa
.github: fix github actions error
Fixes double wrapping of variable
2022-04-08 19:39:31 +05:30
Rohit Yadav
5b617ba3ff Merge remote-tracking branch 'origin/4.16' 2022-04-08 15:28:20 +05:30
Rohit Yadav
4c89f08ebf .github: fix github event/pr username for conflict msg advice
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-08 15:27:58 +05:30
Pearl Dsilva
c8ce6c0496
ui: Project owner (normal user) unable to perform any operations in the project (#6233) 2022-04-08 15:26:06 +05:30
Rakesh
d2aa13fd78
Display proper gateway length in health check result (#6226)
The output always returns 1 since all gateways are present in one line
but the actual output should be the number of gateways present
in that line

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2022-04-08 15:25:55 +05:30
Abhishek Kumar
e7071ec196
server: increment deviceid while importing vm data volumes (#6123)
Fixes #6121

deviceId for a volume/disk is never used by CloudStack VMware hypervisor plugin. Still it would be correct to increment value for each data volume/disk, behaviour similar to adding data volumes/disks.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-04-08 15:24:10 +05:30
slavkap
2b075ed39e
Storage-based Snapshots for KVM VMs (#3724)
* VM snapshots of running KVM instance using storage providers plugins for disk snapshots

Added new virtual machine snapshot strategy which is using storage providers plugins to take/revert/delete snapshots.
You can take VM snapshot without VM memory on KVM instance, using storage providers implementations for disk snapshots.
Also revert and delete is added as functionality. Added Thaw/Freeze command for KVM instance.
The snapshots will be consistent, because we freeze the VM during the snapshotting. Backup to secondary storage is executed after
thaw of the VM and if it is enabled in global settings.

* Removed duplicated functionality

Set few methods in DefaultVMSnapshotStrategy to protected to reuse them
without duplicating the code. Remove code that is actualy not needed

* Added requirements in global setting kvm.vmstoragesnapshot.enabled

Added more information in kvm.vmstoragesnapshot.enabled global setting,
that it needs installation of:
- qemu version 1.6+
- qemu-guest-agent installed on guest virtual machine

when the option is enabled

* Added Apache license header

* Removed commented code

* If "kvm.vmstoragesnapshot.enabled" is null should be considered as false

* removed unused imports, replaced default template

Removed unused imports which causing failures and replaced template to
CentOS8

* "kvm.vmstoragesnapshot.enabled" set to dynamic

* Getting status of freeze/thaw commands not the return code

Will chacke the status if freeze/thaw of Guest VM succeded, rather than
looking for return code. Code refactoring

* removed "CreatingKVM" VMsnapshot state and events related to it

* renamed AllocatedKVM to AllocatedVM

the states should not be associated to a hypervisor type

* loggin the result of "drive-backup" command

* Check which VM snapshot strategy could handle the vm snapshots

gets the best match of VM snapshot strategy which could handle the vm
snapshots on KVM.
Other storage plugins could integrate with this functionality to support group snapshots

* Added poolId in canHandle for KVM hypervisors

Added poolId into canHandle method used to check if all volumes are on
the same PowerFlex's storage pool

* skip smoke tests if the hypervisor's OS type is CentOS

This PR works with functionality included in qemu-kvm-ev which
does not come by default on CentOS. The smoke tests will be skipped if
the hypervisor OS is CentOS

* Added missed import in smoke test

* Suggested change to use ` org.apache.commons.lang.StringUtils.isNotBlank`

* Fix getting device on Ubuntu

On Ubuntu the device isn't provided and we have to get it from
node-name parameter. For drive-backup command (for Ubuntu) is needed and job-id which
is the value of node-name (this extra param works on Ubuntu and CentOS as well).

* Removed new snapshot states and functionality for NFS

* throw CloudRuntimeException

provide a properer error message when delete VM snapshot fails

* exclude GROUP snapshots when listing snapshots

* Skip tests if there is pool with NFS/Local

* address comments
2022-04-07 21:42:12 -03:00
Pearl Dsilva
c1c381fcd1
api: Prevent modifying acl rules order for default ACLs (#6187) 2022-04-07 21:31:29 -03:00
Pearl Dsilva
daa7bdb046
upgrade: update minreq.sysvmtemplate.version to the latest template version (#6227) 2022-04-07 21:29:23 -03:00
Rohit Yadav
6bf812cdc9 .github: fix github action workflows
(commiting this directly to main, otherwise the PR will kick the actions
of the PR branch)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-07 22:48:34 +05:30