4527 Commits

Author SHA1 Message Date
Nicolas Vazquez
36d37f70a8
Display associated resource name on storage pools objects (#9449) 2024-09-05 09:39:07 +05:30
Rohit Yadav
60c9c9adb6 Merge remote-tracking branch 'origin/4.19'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-09-04 13:20:42 +05:30
Suresh Kumar Anaparti
b78aede2b7
Updated listStoragePools response - added new managed parameter (#9588) 2024-09-04 11:54:33 +05:30
Abhishek Kumar
5a496e725b Merge remote-tracking branch 'apache/4.19' 2024-08-28 16:07:31 +05:30
Suresh Kumar Anaparti
c05edc40f4
Updated invalid parameter/value to com.cloud.exception.InvalidParameterValueException (#9455) 2024-08-28 08:54:43 +02:00
Lucas Martins
70131be8c2
Fix deleteAccount API to prevent deletion of the caller (#8743)
* Fix API deleteAccount deleting caller's account

* Remove extra line

* Add unit tests and change message

* apply suggestion

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

* remove extra parentheses

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

* Update server/src/test/java/com/cloud/user/AccountManagerImplTest.java

Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>

---------

Co-authored-by: Lucas Martins <lucas.martins@scclouds.com.br>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2024-08-27 16:13:30 -03:00
Nicolas Vazquez
d32ace6731
New Feature: Enable/Disable Roles (#9549)
* New feature: Enable/Disable Roles

* Fixes

* Fix unit tests
2024-08-27 14:32:07 -03:00
Suresh Kumar Anaparti
674129cd58
Update project account for all the events with project account owner, except for create project event (#9572) 2024-08-27 12:37:28 +02:00
Wei Zhou
f5efe56fb5
Merge remote-tracking branch 'apache/4.19' 2024-08-26 17:34:15 +02:00
Harikrishna
de3537c98a
Added domain path to all entities (#9540) 2024-08-26 11:04:00 +02:00
Abhishek Kumar
1e12a80210
orchestration,hypervisor: allow custom manufacture, product for vm (#9163)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-08-22 17:19:04 +02:00
dahn
1a403f1a9d
open up extra-config to all users (#9422) 2024-08-22 08:54:35 +02:00
Gabriel Pordeus Santos
9b22cd590d
Download Volume Snapshots (#8878)
Co-authored-by: Rodrigo D. Lopez <19981369+RodrigoDLopez@users.noreply.github.com>
2024-08-21 09:38:56 +02:00
Nicolas Vazquez
296a44e932
Fix main branch issues (#9553) 2024-08-20 15:26:41 +02:00
ahmedali6
2ba64f2521
fix removeSecondaryStorageSelector response for docs (#9264)
Co-authored-by: Ahmed Awlaqi <ahmed.awlaqi@sue.nl>
2024-08-19 13:39:51 +02:00
GaOrtiga
8ca1843efa
Allow deletion of system VM templates (#8556)
* allow delete system VM templates

* Add isSystem parameter

* add authorized

---------

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2024-08-15 14:29:25 -03:00
Bernardo De Marco Gonçalves
01c721fcda
Improvements to quota tariffs APIs and UI (#9225)
* reface quotaTariffList process and add listOnlyRemoved parameter

* add unit tests for createQuotaTariffResponse and isUserAllowedToSeeActivationRules methods

* update QuotaTariffListCmdTest

* refactor quota tariffs creation

* refactor quota tariffs update

* fix unit test in JsInterpreter

* remove unused import

* refactor quota listing and add quota deletion

* add functionality to create tariff from UI, not working when specifying dates

* fix date parsing

* add labels

* fix details view of tariffs

* new update tariff view

* fix filter placeholder

* remove debug html

* add labels

* make value field to be required when updating a tariff

* add labels

* add portuguese labels

* remove unused label

* fix updating tariff when there was no enddate specified

* refactor dates

* refactor dates

* clear code

* update disabled dates in date picker

* clear ListView component

* fix unnecessary updates when the new end date was equal to the exising end date

* fix when today was selected to start date

* add keyword to filter

* change usage type response

* add keyword and usagetype filter on UI

* fix disabled end dates in date picker

* modify datepickers to use datetime

* small fixes

* make value an unrequired field on update form

* remove duplicate import

* remove unused css classes

* add UI support for position parameter

* resize input fields to fill all available horizontal space

* remove console.log()

* remove unnecessary fully qualified names

* replace `usagetypeid` property name to `id` on `listUsageTypes` API call

* replace `usagetypeid` property name to `id` on `listUsageTypes` API call
2024-08-15 14:16:44 -03:00
Felipe
cf1428ddcc
Fix column from op_dc_ip_address_alloc not being referenced correctly by its ORM class (#8812)
* refactored field instanceId to nicId in DataCenterIpAddressVO and AcquirePodIpCmdResponse

* refactored ocurrences of "instanceId" in DataCenterDaoImpl and DataCenterIpAddressDaoImpl
2024-08-13 16:26:55 -03:00
Suresh Kumar Anaparti
161d156af1
Support user resource name / displaytext with emoji, unicode chars, and some sql exception msg improvements (#9340)
* Added API arg validator for RFC compliance domain name, to validate VM's host name

* Added unit tests for vm host/domain name validation

* Don't send sql exception/query from dao to upper layer, log it and send only the error message

* Updated user resources name / displayname(/text) column's charset to utf8mb4 to support emojis / unicode chars

* Check and update char set for affinity group name to utf8mb4, from the data migration in upgrade path

* Added smoke test to check resource name for vm, volume, service & disk offering, template, iso, account(first/lastname)

* Updated resource annotation charset to utf8mb4

* Updated some resources description charset to utf8mb4

* Updated sql stmt with constant

* Updated modify columns char set with idempotent procedure

* Removed delimiter (for creating procedures)
2024-08-07 14:50:29 +05:30
nvazquez
b73f634ea6
Merge branch '4.19' 2024-08-06 12:39:13 -03:00
Vishesh
5baac44139
ui: add UI too to view and download usage records (#8615)
This PR adds a new UI tool for admins for viewing and downloading usage records.

This PR also makes startdate and enddate as non required params for generateUsageRecords. (Fixes: #7133)
2024-07-30 14:38:17 +05:30
Vishesh
f0ba90568d
api: Fix missing keys in listZonesMetrics response (#9419)
This PR fixes #9379
Fix missing keys in listZonesMetrics.

We use BeanUtils.copyProperties to copy the properties of ZoneResponse to ZoneMetricsResponse. Fields with missing getters are skipped from the response because of this.
2024-07-29 10:54:54 +05:30
Rohit Yadav
f358813e1d Merge remote-tracking branch 'origin/4.19' into main
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-07-26 12:32:40 +00:00
Fabricio Duarte
49cd5ba64a
Fix link to removed volumes being shown in info card and list view (#8833)
* Framework for validating links in the front-end

* Rename valid links map in the list view
2024-07-24 09:09:07 -03:00
Suresh Kumar Anaparti
3faf7cd2f1
Updating pom.xml version numbers for release 4.19.2.0-SNAPSHOT
Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2024-07-19 10:29:26 +05:30
Vishesh
35fd17c62e
Merge branch '4.19' 2024-07-17 17:43:40 +05:30
Suresh Kumar Anaparti
9f4c895974
Updating pom.xml version numbers for release 4.19.1.0
Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2024-07-15 17:19:29 +05:30
Vishesh
a53365d1c7
Merge release branch 4.18 to 4.19
* 4.18:
  Fix list backups after backup vm is expunged (#9392)
2024-07-15 17:07:36 +05:30
Suresh Kumar Anaparti
8a00e25de9
Fix list backups after backup vm is expunged (#9392) 2024-07-15 17:03:59 +05:30
Alain-Christian Courtines
afdf4d7d46
Add limit configuration for number of projects (#9172) 2024-07-15 08:47:14 +02:00
Felipe
a87778be9a
Refactor KubernetesClusterResourceModifierActionWorker (#8801)
Co-authored-by: dahn <daan.hoogland@gmail.com>
2024-07-14 16:02:04 +02:00
John Bampton
c923e673cf
pre-commit: add XML files to the trailing-whitespace check (#9131) 2024-07-12 09:42:54 +02:00
Abhishek Kumar
3c9bc07d06 Merge remote-tracking branch 'apache/4.19' 2024-07-06 13:01:50 +05:30
Abhishek Kumar
2cf838cc1d framework/cluster: improve cluster service, integration API server
- mTLS implementation for cluster service communication
- Listen only on the specified cluster node IP address instead of all interfaces
- Validate incoming cluster service requests are from peer management servers based on the server's certificate dns name which can be through global config - ca.framework.cert.management.custom.san
- Hardening of KVM command wrapper script exeicution
- Improve API server integration port check
- cloudstack-management.default: don't have JMX configuration if not needed. JMX is used for instrumentation; users who need to use it should enable it explicitly

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-06 11:29:26 +05:30
Abhishek Kumar
beebeed5e2 framework/cluster: improve cluster service and integration API service
- mTLS implementation for cluster service communication
- Listen only on the specified cluster node IP address instead of all interfaces
- Validate incoming cluster service requests are from peer management servers based on the server's certificate dns name which can be through global config - ca.framework.cert.management.custom.san
- Hardening of KVM command wrapper script execution
- Improve API server integration port check
- cloudstack-management.default: don't have JMX configuration if not needed. JMX is used for instrumentation; users who need to use it should enable it explicitly

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-05 19:05:06 +05:30
Vishesh
0ec7c72875
Merge branch '4.19' 2024-07-01 12:41:45 +05:30
Abhisar Sinha
063dc60114
Change storage pool scope from Cluster to Zone and vise versa (#8875)
* New feature: Change storage pool scope

* Added checks for Ceph/RBD

* Update op_host_capacity table on primary storage scope change

* Storage pool scope change integration test

* pull 8875 : Addressed review comments

* Pull 8875: remove storage checks, AbstractPrimayStorageLifeCycleImpl class

* Pull 8875: Fixed integration test failure

* Pull 8875: Review comments

* Pull 8875: review comments + broke changeStoragePoolScope into smaller functions

* Added UT for changeStoragePoolScope

* Rename AbstractPrimaryDataStoreLifeCycleImpl to BasePrimaryDataStoreLifeCycleImpl

* Pull 8875: Dao review comments

* Pull 8875: Rename changeStoragePoolScope.vue to ChangeStoragePoolScope.vue

* Pull 8875: Created a new smokes test file + A single warning msg in ui

* Pull 8875: Added cleanup in test_primary_storage_scope.py

* Pull 8875: Type in en.json

* Pull 8875: cleanup array in test_primary_storage_scope.py

* Pull:8875 Removing extra whitespace at eof of StorageManagerImplTest

* Pull 8875: Added UT for PrimaryDataStoreHelper and BasePrimaryDataStoreLifeCycleImpl

* Pull 8875: Added license header

* Pull 8875: Fixed sql query for vmstates

* Pull 8875: Changed icon plus info on disabled mode in apidoc

* Pull 8875: Change scope should not work for local storage

* Pull 8875: Change scope completion event

* Pull 8875: Added api findAffectedVmsForStorageScopeChange

* Pull 8875: Added UT for findAffectedVmsForStorageScopeChange and removed listByPoolIdVMStatesNotInCluster

* Pull 8875: Review comments + Vm name in response

* Pull 8875: listByVmsNotInClusterUsingPool was returning duplicate VM entries because of multiple volumes in the VM satisfying the criteria

* Pull 8875: fixed listAffectedVmsForStorageScopeChange UT

* listAffectedVmsForStorageScopeChange should work if the pool is not disabled

* Fix listAffectedVmsForStorageScopeChangeTest UT

* Pull 8875: add volume.removed not null check in VmsNotInClusterUsingPool query

* Pull 8875: minor refactoring in changeStoragePoolScopeToCluster

* Update server/src/main/java/com/cloud/storage/StorageManagerImpl.java

* fix eof

* changeStoragePoolScopeToZone should connect pool to all Up hosts

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-06-29 10:03:34 +05:30
Suresh Kumar Anaparti
2ca1b474bd
PowerFlex/ScaleIO SDC client connection improvements (#9268)
* Mitigation for non-scalable Powerflex/ScaleIO clients
- Added ScaleIOSDCManager to manage SDC connections, checks clients limit, prepare and unprepare SDC on the hosts.
- Added commands for prepare and unprepare storage clients to prepare/start and stop SDC service respectively on the hosts.
- Introduced config 'storage.pool.connected.clients.limit' at storage level for client limits, currently support for Powerflex only.

* tests issue fixed

* refactor / improvements

* lock with powerflex systemid while checking connections limit

* updated powerflex systemid lock to hold till sdc preparation

* Added custom stats support for storage pool, through listStoragePools API

* code improvements, and unit tests

* unit tests fixes

* Update config 'storage.pool.connected.clients.limit' to dynamic, and some improvements

* Stop SDC on host after migration if no volumes mapped to host

* Wait for SDC to connect after scini service start, and some log improvements

* Do not throw exception (log it) when SDC is not connected while revoking access for the powerflex volume

* some log improvements
2024-06-29 10:01:50 +05:30
Vishesh
90fe1d5fdc
Merge branch '4.19' 2024-06-29 03:35:24 +05:30
Vishesh
bcbf152a05
Merge branch '4.18' into 4.19 2024-06-28 20:14:21 +05:30
Abhisar Sinha
646c894ec6
Fix for race when automatically assigning IP to Vms (#9240)
* Fix for race when automatically assigning IP to Vms

* code refactor
2024-06-28 17:11:16 +05:30
Suresh Kumar Anaparti
46f672563e
Improve migration of external VMware VMs into KVM cluster (#8815)
* Create/Export OVA file of the VM on external vCenter host, to temporary conversion location (NFS)

* Fixed ova issue on untar/extract ovf from ova file
"tar -xf" cmd on ova fails with "ovf: Not found in archive" while extracting ovf file

* Updated VMware to KVM instance migration using OVA

* Refactoring and cleanup

* test fixes

* Consider zone wide pools in the destination cluster for instance conversion

* Remove local storage pool support as temporary conversion location
- OVA export not possible as the pool is not accessible outside host, NFS pools are supported.

* cleanup unused code

* some improvements, and refactoring

* import nic unit tests

* vmware guru unit tests

* Separate clone VM and create template file for VMware migration
- Export OVA (of the cloned VM) to the conversion location takes time.
- Do any validations with cloned VM before creating the template (and fail early).
- Updated unit tests.

* Check conversion support on host before clone vm / create template on vmware (and fail early)

* minor code improvements

* Auto select the host with instance conversion capability

* Skip instance conversion supported response param for non-KVM hosts

* Show supported conversion hosts in the UI

* Skip persistence map update if network doesn't exist

* Added support to export OVA from KVM host, through ovftool (when installed in KVM host)

* Updated importvm api param 'usemsforovaexport' to 'forcemstodownloadvmfiles', to be generic

* Updated hardcoded UI messages with message labels

* Updated UI to support importvm api param - forcemstodownloadvmfiles

* Improved instance conversion support checks on ubuntu hosts, and for windows guest vms

* Use OVF template (VM disks and spec files) for instance conversion from VMware, instead of OVA file
 - this would further increase the migration performance (as it reduces the time for OVA preparation / archiving of the VM files into a single file)

* OVF export tool parallel threads code improvements

* Updated 'convert.vmware.instance.to.kvm.timeout' config default value to 3 hrs

* Config values check & code improvements

* Updated import log, with time taken and vm details

* Support for parallel downloads of VMware VM disk files while exporting OVF from MS, and other changes below.
- Skip clone for powered off VMs
- Fixes to support standalone host (with its default datacenter)
- Some code improvements

* rebase fixes

* rebase fixes

* minor improvement

* code improvements - threads configuration, and api parameter changes to import vm files

* typo fix in error msg
2024-06-27 21:14:13 +05:30
Nima B
23f8856c7d
Update AssignToLoadBalancerRuleCmd.java (#9306)
changed vmidipmap[0].ip to vmidipmap[0].vmip
2024-06-27 19:50:36 +05:30
Abhishek Kumar
b22315db85
server: event for HA vm start (#9202) 2024-06-26 15:38:47 +05:30
Vishesh
dc74d5ba88
Let network guru decide if ipv6 cidr size can't be equal to 64 (#9289) 2024-06-26 02:43:26 +05:30
Abhisar Sinha
4eb43651e2
Ability to specify NFS mount options while adding a primary storage and modify them on a pre-existing primary storage (#8947)
* Ability to specify NFS mount options while adding a primary storage and modify it later

* Pull 8947: Rename all occurrence of nfsopt to nfsMountOpt and added nfsMountOpts to ApiConstants

* Pull 8947: Refactor code - move into separate methods

* Pull 8947: CollectionsUtils.isNotEmpty and switch statement in LibvirtStoragePoolDef.java

* Pull 8947: UI - cancel maintainenace will remount the storage pool and apply the options

* Pull 8947: UI - moved edit NFS mount options to edit Primary Storage form

* Pull 8947: UI - moved 'NFS Mount Options' to below 'Type' in dataview

* Pull 8947: Fixed message in AddPrimaryStorage.vue

* Pull 8947: Convert _nfsmountOpts to Set in libvirtStoragePoolDef

* Pull 8947: Throw exception and log error if mount fails due to incorrect mount option

* Pull 8947: Added UT and moved integration test to component/maint

* Pull 8947: Review comments

* Pull 8947: Removed password from integration test

* Pull 8947: move details allocation to inside the if loop in getStoragePoolNFSMountOpts

* Pull 8947: Fixed a bug in AddPrimaryStorage.vue

* Pull 8947: Pool should remain in maintenance mode if mount fails

* Pull 8947: Removed password from integration test

* Pull 8947: Added UT

* Pull 8875: Fixed a bug in CloudStackPrimaryDataStoreLifeCycleImplTest

* Pull 8875: Fixed a bug in LibvirtStoragePoolDefTest

* Pull 8947: minor code restructuring

* Pull 8947 : added some ut for coverage

* Fix LibvirtStorageAdapterTest UT
2024-06-25 23:45:35 +05:30
Vishesh
3923f80c22
Merge branch '4.19' 2024-06-25 18:53:57 +05:30
Vishesh
351de5fabd
engine/orchestration: Update overcommit ratio during live VM migration (#9178)
During live migration of a VM from between hosts having different cgroup versions (cgroupv2 & cgroup), overcommit ratio is ignored.

This PR fixes the above issue.
2024-06-24 20:45:31 +05:30
Abhishek Kumar
de266a4cb8
api,server: allow updating hypervisor capabilities with hypervisor and version (#8475)
* api,server: allow updating hypervisor capabilities with hypervisor and
version

hypervisor and hypervisorversion parameter added to the
updateHypervisorCapabilities API.

* param description

* Update server/src/main/java/com/cloud/server/ManagementServerImpl.java

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Henrique Sato <henriquesato2003@gmail.com>
Co-authored-by: Vishesh <vishesh92@gmail.com>
2024-06-24 14:41:01 +05:30
Suresh Kumar Anaparti
c17aa0d9ad
Import Remote KVM VM logging improvements (#9284) 2024-06-24 11:34:37 +05:30