38168 Commits

Author SHA1 Message Date
dahn
f2f3f71e74
Enhance NFS mount option check for empty response
```
ERROR: test suite for <class 'tests.component.maint.test_primary_storage_nfsmountopts_kvm.TestNFSMountOptsKVM'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 210, in run
    self.setUp()
  File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 293, in setUp
    self.setupContext(ancestor)
  File "/usr/local/lib/python3.9/site-packages/nose/suite.py", line 316, in setupContext
    try_run(context, names)
  File "/usr/local/lib/python3.9/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/marvin/tests/component/maint/test_primary_storage_nfsmountopts_kvm.py", line 46, in setUpClass
    cls.version = cls.getNFSMountOptionForPool(cls, "vers", cls.storage_pool.id)
  File "/marvin/tests/component/maint/test_primary_storage_nfsmountopts_kvm.py", line 115, in getNFSMountOptionForPool
    stat = nfsstat[0]
IndexError: list index out of range
```

because 

```
shClient: DEBUG: {Cmd: nfsstat -m | sed -n '/e08df33d-d187-3c1c-88f4-10c69669f41a/{ n; p }' via Host: 10.0.32.210} {returns: []}
```
2025-10-14 15:08:57 +02:00
Abhisar Sinha
046014b4c5
NAS BnR: Create Instance from Backup issues (#11754)
* add createCrossZoneInstnaceEnabled to BackupOfferingResponse

* show use IP Address from Backup button when orignal instance is expunged

* Fix NPE in takeBackup if the  vm template is deleted.

* Add since to Cross zone instance creation in BackupOfferingResponse.java

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

* Store and show Guest os type in the backup metadata

* show warning in create instance from backup form if guest os type is different

* show warning in create instance from backup form if guest os type is different

* backupvmexpunged -> isbackupvmexpunged

* review comments

* fix npe

* improve err msg

* err msg

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-10-14 14:51:57 +05:30
Harikrishna
c0a4392b05
Fix volume copy from primary to primary in simulator (#11836) 2025-10-14 14:01:44 +05:30
dahn
f71d3a8e9f
update the developers guide link on the API page (#11832)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-10-14 10:13:31 +02:00
Manoj Kumar
9e535e35d2
Support xz format for template registration (#11786) 2025-10-14 09:13:12 +02:00
Abhishek Kumar
dfcbd2e977
server: consistent behaviour for list apis with project=-1 (#11767)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-14 09:06:53 +02:00
julien-vaz
a574f7ac99
Add logs for host removal (#10423)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2025-10-14 08:49:15 +02:00
CodeBleu
c9ce6e305c
ui: Allow edit source CIDR on load balancer rule (#11766) 2025-10-14 08:30:28 +02:00
Pearl Dsilva
5e7ae227d3
UI: Prevent exceptions when network service provider that's disabled is viewed (#11413) 2025-10-14 08:24:59 +02:00
Abhishek Kumar
0ca63f36a5
api,server,ui: allow cleaning up external details for host and serviceoffering (#11548) 2025-10-13 16:21:43 +02:00
John Bampton
349feebd15
Standardize Markdown headings; enforce MD003 with markdownlint (#11688) 2025-10-13 17:37:32 +05:30
John Bampton
cdb0604e7b
pre-commit: enforce mixed-line-ending for all files (#11667) 2025-10-13 16:26:15 +05:30
John Bampton
e27528f8b2
Update GitHub Actions (#11664) 2025-10-13 16:25:58 +05:30
John Bampton
22ba8dd504
Remove misspelled file not found from rat excludes (#11665) 2025-10-13 16:23:09 +05:30
Vishesh
0ca267f516
Allow uploading of ISO for creating kubernetes supported versions (#9561) 2025-10-13 12:51:30 +02:00
Rohit Yadav
8464e46b53
PR #11778 with changes for main branch (#11781)
* systemvmtemplate: Bump Debian version to 12.12.0

* systemvmtemplate: bump version to 4.22

This bumps the systemvmtemplate version to 4.22 for use with the
main/4.22 branch.

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

---------

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-10-13 15:09:25 +05:30
Pearl Dsilva
0e93ae3bdf
UI: Add validator for CIDR being passed (#11465) 2025-10-13 11:18:32 +02:00
John Bampton
a5a934dac1
pre-commit: add hooks check-illegal-windows-names and file-contents-sorter (#11662) 2025-10-13 13:59:42 +05:30
Layon
136ea3eafa
UI: Removal of UI blockage to access the changeOfferingForVolume API (#10135) 2025-10-13 10:27:36 +02:00
Rohit Yadav
1e23d6bc20
server: enable KVM volume and VM snapshot by default (#11446)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2025-10-13 09:53:11 +02:00
Wei Zhou
162c45f8fa
api/server: list networks by name (#11470)
* api/server: list networks by name

* Update api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java
2025-10-13 12:39:13 +05:30
Vishesh
0b9afe77ca
Enforce distinct hostnames network (#10212)
* Check for unique hostnames for all networks in the vpc

* Address comments
2025-10-13 12:38:31 +05:30
John Bampton
cc6ee906d5
Markdown: add documentation on pre-commit usage (#11680) 2025-10-13 12:11:55 +05:30
Nicolas Vazquez
b106d6e190
VMware to KVM Migrations improvements (#11594)
* Add source VM name on virt-v2v migration log entries

* Improve the feedback by displaying the running importing tasks

* Add source VM name prefix on more conversion logs

* Improve listing and also list completed tasks

* Pass extra parameters to virt-v2v if administrator allows via global setting

* Add Force converting directly to storage pool option

* Refactor based on review comments

* Add properties for env vars for the instance conversion

* Add separate component for Import VM Tasks

* applying copilot suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix importing unmanaged instances due to incorrect internal name

* Add VM prefix on each log operation for conversion

* Log the original VM name instead of the cloned VM in case of cloning

* Allow searching storage pool by UUID after conversion to support SharedMountPoint

* Fix search pools logic

* Improve UI and add checks for force convert to pool parameter

* Support Local storage when forceconverttopool is set to true

* Add config key to for allowed extra params and add validation

* Fix params lists

* Fix compile error

* Remove extra stubbings

* Fix extra params execution

---------

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-10-10 20:00:29 -03:00
Harikrishna
b99a03092f
Added Extension for MaaS integration in CloudStack (#11613)
* Adding extension support for Baremetal MaaS

* Update engine/schema/src/main/resources/META-INF/db/schema-42100to42200.sql

---------

Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
2025-10-10 14:57:30 +05:30
Suresh Kumar Anaparti
df49c4f14b
UI: Move Backup Repository to Infrastructure (from Configuration) (#11738)
* UI: Move Backup Repository to Infrastructure (from Configuration)

* Updated nas doc help link
2025-10-10 13:25:05 +05:30
Abhishek Kumar
67250d99d4
ui: fix add host form state on submit (#11815) 2025-10-10 13:09:25 +05:30
Suresh Kumar Anaparti
2b1f0bbbdb
UI: Fix for cluster addition in VMware (#11812) 2025-10-10 12:35:41 +05:30
Pearl Dsilva
973819dad6
API: Add support to list all snapshot policies & backup schedules (#11587)
* API: Add support to list all snapshot policies & backup schedules

* Add support for backup policy listing without tying it to the vmid

* add tests for snapshot policy listing

* update tests for listbackupschedules

* remove trailing spaces and fix lint failure

* Add upgrade test

* remove unused import

* add create policy - snap/backup in the list view with resource (volume/vm) selection

* add translations

* refresh parent list

* remove unnecessary alert info

* fix checks for UI backup schedule list view

* fix checks for UI backup schedule list view

* add back access checks

* add since param

* fix failing test

* update snapshot policy and backup schedule ownership when VM is moved

* fix issue with showing vm selection

* fix unit test failure

* Update list snappolicy & backup schedule logic to list only those that belong to a proj or for root admin those that belong to it, unless listall & projid is passed

* fix test

* support snap / backup policy search using keyword

* fix tests
2025-10-09 17:22:17 +05:30
Suresh Kumar Anaparti
f67b738eb3
Migrate volume improvements, to bypass secondary storage when copy volume between pools is allowed directly (#11625)
* Migrate volume improvements, to bypass secondary storage when copy volume between pools is allowed directly

* Bypass secondary storage for copy volume between zone-wide pools and
- local storage on host in the same zone
- cluser-wide pools in the same zone

* Bypass secondary storage for volumes on ceph/rdb pool when the scope permits

* Fix dest disk format while migrating volume from ceph/rbd to nfs, and some code improvements

* unit tests

* Update suitable disk offering(s) for volume(s) after migrate VM with volumes when change in pool type (shared or local)

Currently, Migrate VM with volume(s) bypasses the service and disk offerings of the volumes, as the target pools for migration are specified,
which ignores the offerings. Offering change is required when pool type (shared or local) is changed, mainly
- when volume on shared pool is migrated to local pool
- when volume on local pool is migrated to shared pool

* Update with proper message while migrate volume when target pool and offering type mismatches (both are not shared/local)

* Consider host scope first during endpoint selection while copying between primary storages

* Update disk offering count (for listDiskOfferings api) while removing offerings with tags mismatch with storage tags
2025-10-09 16:00:46 +05:30
Abhishek Kumar
a6ef24d167
server: consistent domainpath in api responses (#11589)
* server: consistent domainpath in api responses

Currently, some APIs return domainpath as 'ROOT/domain1/domain2' while
other return it as '/domain1/domain2'. This PR makes the response
consistent like "ROOT/domain1/domain2"

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

* more changes

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-09 13:06:28 +05:30
Wei Zhou
6089c161a6
Merge remote-tracking branch 'apache/4.20' 2025-10-08 15:40:33 +02:00
Wei Zhou
89d2b17461
storage: change storage pool to Up state when cancel storage migration (#11773)
* storage: change storage pool to Up state when cancel storage migration

* Update 11773: connect host to shared pool after cancelling storage migration

* Update 11773: update db only

* Update 11773: skip capacity update for storpool
2025-10-08 15:34:59 +02:00
Suresh Kumar Anaparti
b143ddc405
Sanitize the rbd file cmd parameter logs during qemu-img convert (through Script) (#11801) 2025-10-08 13:55:08 +02:00
Henrique Sato
cc3170577c
Add Hypervisor default as cache mode for disk offerings (#10282)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2025-10-08 13:39:28 +02:00
Manoj Kumar
9f20979bce
UI: Fix primary storage for datastore cluster and retain traffic labels during zone deployment (#11760) 2025-10-08 13:38:03 +02:00
Abhishek Kumar
a15fbd9bcc
refactor: remove use of term entry-point from extensions code base (#11488)
Addresses #11483

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-10-08 15:42:43 +05:30
dahn
270d3f9a2d
UI: Deal with crosssite api call after login (#10533) 2025-10-08 10:42:00 +02:00
Wei Zhou
314c4591ec
systemvmtemplate: Bump Debian version to 12.12.0 (#11778) 2025-10-08 10:25:36 +02:00
Suresh Kumar Anaparti
09b63bc2e8
Storage pool response improvements (#10740)
* Return details of the storage pool in the response including url, and update capacityBytes and capacityIops if applicable while creating storage pool

* Added capacitybytes parameter to the storage pool response in sync with the capacityiops response parameter and createStoragePool cmd request parameter (existing disksizetotal parameter in the storage pool response can be deprecated)

* Don't keep url in details

* Persist the capacityBytes and capacityIops in the storage_pool_details table while creating storage pool as well, for consistency - as these are updated with during update storage pool

* rebase with main fixes
2025-10-08 11:20:37 +05:30
Vishesh
d2615bb142
Add support for providing userdata to system VMs (#11654)
This PR adds support for specifying user data (cloud-init) for system VMs via Zone Scoped global settings. This allows the operators to customize the System VMs and setup monitoring, logging or execute any custom commands.

We set the user data from the global setting in /var/cache/cloud/cmdline, and use the NoCloud datasource to process user data. cloud-init service is still disabled in the system VMs and it's executed as part of the cloud-postinit service which executes the postinit.sh script.

Added global settings:
systemvm.userdata.enabled - Disabled by default. Needs to be enabled to utilize the feature.
console.proxy.vm.userdata - UUID of the User data to be used for Console Proxy
secstorage.vm.userdata - UUID of the User data to be used for Secondary Storage VM
virtual.router.userdata - UUID of the User data to be used for Virtual Routers
2025-10-08 10:44:26 +05:30
Wei Zhou
858663fcf7
UI: fix missing comma at end of line 2025-10-07 16:55:04 +02:00
Daan Hoogland
5f63e8493c Merge branch '4.20' 2025-10-07 15:12:53 +02:00
Daan Hoogland
aca8235960 Merge branch '4.19' into 4.20 2025-10-07 14:28:47 +02:00
Suresh Kumar Anaparti
823cb00a0a
server: do not enable the disabled local storage(s) on host connection during mgmt server / agent start (#11722) 2025-10-07 11:21:47 +02:00
Manoj Kumar
9bcd98876d
Make kvm domain persistent when unmanaged from CS (#11541)
CS creates transient KVM domain.xml. When instance is unmanaged from CS, explicit dump of domain has to be taken to manage is outside of CS.

With this PR

    domainXML gets backed up and becomes persistent for further management of Instance.
    Stopped instance also can be unmanaged, last host for instance is considered for defining domain
    hostid param is supported in unmanageVirtualMachine API for KVM hypervisor and for stopped Instances
    hostid field in response of unmanageVirtualMachine, representing host used for unmanage operation
    Disable unmanaging instance with config drive, can unmanage from API using forced=true param for KVM
2025-10-07 10:32:33 +05:30
Wei Zhou
963a67b816
server: add user.password.reset.smtp.useStartTLS and enabledSecurityProtocols for password reset (#11228) 2025-10-07 10:19:57 +05:30
Suresh Kumar Anaparti
b7a11cb203
NAS backup provider: Support restore from backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) (#11684)
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2025-10-06 09:13:28 +02:00
Rene Peinthor
a208db54ea
linstor: use sparse/discard qemu-img convert on thin devices (#11787) 2025-10-06 09:10:53 +02:00
Alexandru Bagu
8e4dc0a66d
VMware: match nic mac for ip address fetch (#10641) 2025-10-04 11:49:26 +02:00