36811 Commits

Author SHA1 Message Date
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>
4.19.1.0
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
Vishesh
21c98af13d
Fix backup offering buttons for instances in data view (#9391) 2024-07-15 15:53:00 +05:30
Fabricio Duarte
7db83db3dd
Fix radio buttons in instance migration pop-up (#8836) 2024-07-15 10:30:22 +05:30
Abhishek Kumar
6a8494be3b
engine-schema,cks: fix finding non removed network vms (#9339)
Fixes #9331

Only those VMs should be considered network VM which have a NIC entry
that is not marked removed.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-15 09:46:29 +05:30
Rohit Yadav
2cfb541a1d
saml: purge token after first response and improve setting description (#9377)
* saml: purge token after first response and improve setting description

This improves the description of a saml signature checking global
setting, and purges the SAML token upon handling the first SAML
response.

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

* fix failing unit test

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

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-07-15 09:45:28 +05:30
Rohit Yadav
50586a9481
UI assorted fixes (#9381)
* config.json: make configuration names consistent with other

Makes login related config param to be consistent with the original
`loginFooter`. Group them together.

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

* ui: assorted UI fixes and copy console URL fix

This brings in related buttons across some infra views and new columns
which are missing. Also fixes the copy console URL issue on some
browsers.

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

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-07-15 09:44:39 +05:30
Suresh Kumar Anaparti
7f8f113709
Merge branch '4.18' into 4.19 2024-07-15 00:59:06 +05:30
Suresh Kumar Anaparti
877c4d9a64
LibvirtOvsFetchInterfaceCommandWrapperTest fix (test fails in mac) - skip it if no interfaces with eth and wl (#9382)
* test fix (fails in mac) - skip it if no interfaces with eth and wl

* review comments
2024-07-15 00:56:23 +05:30
Vishesh
22ef08154d
Switch back to CLOUD_DB after purging usage records (#9367) 2024-07-14 14:58:36 +05:30
Suresh Kumar Anaparti
d9f77b841c
Ignore non-managed pools for storage pool access preparation (#9376) 2024-07-14 14:50:26 +05:30
Abhishek Kumar
c71ab9598e
test: refactor ActionEventInterceptorTest to prevent failures (#9384)
Try to intercept test calss methods in new CallContext to prevent
getting any leftover data during assertions.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-12 15:10:55 +02:00
Rene Glover
32cc1d46a5
Copy on pool host when storage pool has ScopeType.HOST (#9356) 2024-07-10 12:30:47 +05:30
Rohit Yadav
5c365fa820
systemvmtemplate: bump new systemvmtemplate 4.19.1 (#9349)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-07-10 10:01:08 +05:30
Suresh Kumar Anaparti
37c91abd3d
NPE fix, for test_hostha_kvm_host_fencing (#9355) 2024-07-09 12:20:10 +05:30
Henrique Sato
ca66b76cb9
Fix instance & backup resource table columns (#9147)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-07-09 10:23:31 +05:30
Rohit Yadav
7977d1475e
plugins: make default signature check mandatory (#9357)
This improves upon #9219, to make the signature checks mandatory by
default but allows for users to relax the setting if they really must.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-07-09 09:49:27 +05:30
Wei Zhou
f381763917
test: fix simulator CI failure test_cluster_drs (#9354) 2024-07-09 01:18:50 +05:30
Abhishek Kumar
c35ba606a1
ui: fix account list on domain change in filterview (#9345)
* ui: fix account list on domain change in filterview

Fixes #9274

* fix

* filter accounts for selected domain

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-08 17:24:38 +05:30
Pearl Dsilva
f35f3f6a96
UI: create network form constantly tries to list domains - which is not permitted for normal users (#9348) 2024-07-08 08:28:54 +02:00
Abhishek Kumar
b080215c08 utils: honor custom timeout for script execution for exit value
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-07-08 11:35:28 +05:30
Abhishek Kumar
d99cf93d7c Merge remote-tracking branch 'apache/4.18' into 4.19 2024-07-06 11:31:23 +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
ba85b4d4ff
Merge release branch 4.18 to 4.19
* 4.18:
  linstor: deleteAsync fallback to volume UUID if path not set yet (#9325)
  linstor: do not use the same static ApiClient for all calls (#9326)
2024-07-05 12:45:27 +05:30
Rene Peinthor
eb1a0ef7f2
linstor: deleteAsync fallback to volume UUID if path not set yet (#9325) 2024-07-04 17:35:01 +05:30
Wei Zhou
374ea7d482
UI: fix "Request failed." error when open vnf appliances tab of network (#9334) 2024-07-04 17:32:52 +05:30
Rene Peinthor
94e5ceff7f
linstor-ui: Fix add primary storage if Linstor protocol selected (#9327)
url param wasn't set if protocol Linstor is selected
2024-07-04 15:03:38 +05:30
Abhisar Sinha
79b1427d3e
test_primary_storage_scope.py should only run with kvm, vmware and simulator (#9323)
* test_primary_storage_scope should only run with kvm, vmware and simulator

* move cluster create and storage pool create from setup to test so that they are cleaned up in case of failure

* fixed lint failure

* using super class' tearDown
2024-07-04 13:29:05 +05:30
Rene Peinthor
121a35d666
linstor: do not use the same static ApiClient for all calls (#9326)
The client.setBasePath() would overwrite the Linstor controller IP/host
for all current client users. This is basically a race condition
that triggered as soon as you had configured 2 different primary storages
with different Linstor controllers.
2024-07-03 16:13:16 +05:30
Henrique Sato
d79735606b
Handle public IP race conditions (#9234)
* Lock public IP

* Release IP if ID is not null

* Fix NPEs

Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-06-29 10:28:01 +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
GaOrtiga
814c8b6a12
differentiate between instalation ISO and attached ISO (#9146)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2024-06-28 21:01:22 +05:30
Vishesh
bcbf152a05
Merge branch '4.18' into 4.19 2024-06-28 20:14:21 +05:30
Vishesh
94503e687c
UI: improve ux and fix some minor bugs (#9307) 2024-06-28 19:24:33 +05:30
dahn
6575375537
extract host from websocket to add route (#8922)
* extract host from websocket to add route

* move method to NetUtils

* imports

* import
2024-06-28 19:02:19 +05:30
Suresh Kumar Anaparti
983f164c57
Fixed src datastore on copy check for PowerFlex/ScaleIO storage driver (#9310) 2024-06-28 18:46:06 +05:30
Abhisar Sinha
644f3a3f48
Add, Delete Storage Pool commands should be able execute on a host in maintenance (#9301)
* Restart agent when host comes out of maintenance

* Don't send CreateStoragePoolCommand to hosts in maintenance mode

* CreateStoragePoolCommand can run when host in maintenance. Reverted the change to restart agent when host was already up and in maintenance

* Reverted changes done to ResourceManagerImplTest
2024-06-28 18:18:08 +05:30
Abhishek Kumar
c7f1ba5b8e
server: refactor listNetworks api database retrievals (#9184)
* server: refactor listNetworks api database retrievals

* fixes

* remove unused methods

* imports

* fix empty searchcriteria issue

* refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-06-28 17:19:32 +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
Vishesh
d4446ee09d
Revert listAll behaviour for templates (#9309) 2024-06-28 15:58:44 +05:30
GaOrtiga
a5c8bb3bfc
server: apply rules when VR of Domain VPC is recreated (#8354)
* apply rules when VR is recreated

* Apply suggestions from code review

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

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2024-06-28 15:46:20 +05:30
Vishesh
a4e9d7f21a
Change vm.stats.remove.batch.size to delete.batch.query.size & allow delete of volume_stats in batches (#9283)
* Change vm.stats.remove.batch.size to delete.batch.query.size

* Add support for deletion of volume stats in batches

* Update server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

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

* Update server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

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

* Update configkey description

* Address comments

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-06-28 15:32:49 +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
53faf0f66a
xenserver: attach regular iso with configdrive (#9216)
* xenserver: attach regular iso with configdrive

Fixes #7902

This PR allows attaching a regular ISO to a VM when it already has the
config drive ISO attached.
Config-drive ISO is now attached with the SR name-label
<VM-NAME>-CONFIGDRIVE-ISO. While regular ISOs continue to attach with SR
name-label <VM-NAME>-ISO. VM which already have the configdrive ISO
attached before this fix will return an appropriate error and will need
to be stopped-start.
2024-06-27 16:10:33 +05:30
dahn
6b25ed7a02
prevent an NPE on an uninitialised TemplateObject (#8898)
* prevent an NPE on an uninitialised TemplateObject

* move npe handler up-stack

* Update engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java

* catch yet one level up

* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

* Update engine/storage/image/src/main/java/org/apache/cloudstack/storage/image/store/TemplateObject.java

* extra guard

* Revert "prevent an NPE on an uninitialised TemplateObject"

This reverts commit e602a65ea62e4707828483a4ddea288d81ff06f5.
2024-06-26 21:02:08 +05:30
Wei Zhou
22cd00ffb1
veeam: fix issues with PreSetup and DVS and Solidfire (#9256)
* Veeam: find storage pool by path for PreSetup and VMFS

* Veeam: support VMware distributed virtual switch

* Veeam: sync volumes on Solidfire after backup restoration

user faced the issue that backup is restored but the DATA disk is gone (ROOT disk is ok)
```
2024-05-03 12:00:32,868 ERROR [o.a.c.b.BackupManagerImpl] (API-Job-Executor-13:ctx-aa8a1d85 job-149661 ctx-73328567) (logid:6510cf06) Failed to import VM [vmInternalName: i-169-9679-VM] from backup restoration [{"backupType":"Full","externalId":"821ca400-a5da-4282-bf3f-7c7e38a6cdb4","id":257,"uuid":"69399101-5cbd-461c-8a48-f0c70eac0b24","vmId":9679}] with hypervisor [type: VMware] due to: [Couldn't find storage pool -iqn.2010-01.com.solidfire:3p53.data-9679.221-0].
```

On managed storage, the datastore name of DATA disk is determined by the iscsi_name of the volume.

* Veeam: set correct path for DATA disks on solidfire
2024-06-26 18:02:25 +05:30