4823 Commits

Author SHA1 Message Date
Pearl Dsilva
576b97ba22 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-24 09:22:40 +05:30
slavkap
f6f33c6add
Fix the size of a template downloaded from secondary storage (#10662)
Fixing the size of a template that is downloaded from secondary storage
to StorPool
2025-04-23 16:07:47 +05:30
Pearl Dsilva
ffc0d51616 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-04-22 03:31:44 -04:00
Pearl Dsilva
0da243d660
Fix issue with allocator not considering subsequent clusters (#10603)
* Fix issue with allocator not considering subsequent clusters

* add missing return

* remove unused import

* update as per inputs
2025-04-22 03:06:12 -04:00
Daan Hoogland
2771586b87 Merge release branch 4.19 to 4.20
* 4.19:
  plugin/shutdown: use mgmt server uuid in the shutdown response (#10717)
2025-04-18 11:54:03 +02:00
Rohit Yadav
29e58e906f
plugin/shutdown: use mgmt server uuid in the shutdown response (#10717) 2025-04-18 11:08:53 +02:00
Daan Hoogland
3c75d9363b Merge branch '4.20' 2025-04-17 15:59:41 +02:00
Daan Hoogland
d7765343ef Merge branch '4.19' into 4.20 2025-04-17 15:40:10 +02:00
Eric Kalendra
55c811547a
Update Mockito to 5.16.1 (#10686)
Dependency name change mockito-inline to mockito-core. Inline is now the default and the last version of mockito-inline released is 5.2.0.

assertj-core in user-authenticators/saml2 pulls in an incompatible version of byte-buddy and required an exclusion. Updating the version of assertj is left for a future PR.
The upgrade requires Java 11+, dropping support for Java 8. CloudStack documentation already says to use Java 11 and does not indicate that java 8 is supported.

Test classes using @RunWith(MockitoJUnitRunner.class) now get run in strict mode. Changes were made to tests where the stubbing intention was clear. In ManagementServerMaintenanceManagerImplTest there are 5 tests where the intention of the test is unclear. Each of the statements now use Mockito.lenient() to avoid the exception. Other cases in the tests follow a similar pattern.
Minor clean up.

Both @Spy and Mockito.spy( should not be used. Favored the annotation.
Both @RunWith(MockitoJUnitRunner.class) and MockitoAnnotations.openMocks(this); should not be used. Favored the annotation.
Unnecessary extends TestCase removed.
@InjectMocks and new in statement unnecessary. Removed new when issue presented.
Some of the Cmd classes like UpdateNetworkCmd have a type tree that includes fields of type Object. This appears to cause issues with injection, requiring that @Mock fields be available. This is where the following fields were added in multiple places:
Object job;
ResponseGenerator _responseGenerator;
Wrong number of parameters for Mockito.when in LibvirtRevertSnapshotCommandWrapperTest.java
2025-04-16 18:10:28 +05:30
Harikrishna
a09354ddf5
Fix volume migration failure response (#10707) 2025-04-16 10:58:06 +02:00
Rene Glover
f13cf597a2
4.19 fix saml account selector (#10311) 2025-04-14 12:59:43 +02:00
Dahn Highland
4c31f9d533 Merge release branch 4.20 to main
* 4.20:
  xenserver: do not destroy halted hypervisor vm (#9175)
  define the limit of projects through the UI (#10652)
  fix projects metrics on dashboard (#10651)
  systemvm: Bump systemvm template version to debian 12.10 (#10628)
  Enhance VPC Network Tier form to auto-populate  Gateway, and Netmask (#10617)
2025-04-09 13:02:31 +02:00
Dahn Highland
6850147c9e Merge branch '4.19' into 4.20 2025-04-09 13:00:25 +02:00
Abhishek Kumar
5d5ac17c68
xenserver: do not destroy halted hypervisor vm (#9175)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-04-09 09:33:01 +02:00
John Bampton
f206137f83
docs: fixes grammar and spelling in Markdown files only (#10656) 2025-04-08 12:44:14 +02:00
Bryan Lima
cb4848bc1a
Add support to RBD erasure code pools (#9808)
* Readd filename string on qemuimg create

* Remove empty object on the data pool details of storage pools with no data pool

* Only use the method createPhysicalDiskByLibVirt with RBD when the pool is of erasure code type. Also added javadoc for createPhysicalDisk method

* Change literal '/' string to File.separator

* Add support for erasure code pools

* Fix null on putAll
2025-04-02 08:19:00 -03:00
Daan Hoogland
8af021c6f6 Merge branch '4.20' 2025-03-27 17:03:13 +01:00
Daan Hoogland
5f93ce71bb Merge branch '4.19' into 4.20 2025-03-27 16:44:42 +01:00
Phsm Qwerty
0b7aef7a0f
enhancement: iterate directly on HostJoinVO (#10613) 2025-03-27 10:17:28 +01:00
Suresh Kumar Anaparti
9dceae4614
MS maintenance improvements (#10417)
* Update last agents during ms maintenance, and some code improvements

* Send 503 (Service Unavailable) response status when maintenance or shutdown is initiated
[Any load balancer in the clustered environment can avoid routing requests to this MS node]

* Migrate systemvm agents before routing host agents, and some code improvements

* Added events for ms maintenance and shutdown operations

* Added the following ms maintenance and shutdown improvements

- block new agent connections during prepare for maintenance of ms

- maintain avoids ms list

- propagate updated management servers list and lb algorithm in host and indirect.agent.lb.algorithm settings respectively, to systemvm (non-routing) agents

- updated setup ms list and migrate agent connections to executor service

- migrate agent connection through executor, and send the answer to the ms host that initiated the migration

- re-initialize ssl handshake executor if it is shutdown

- don't allow prepare for maintenance or shutdown when other management server nodes are in preparing states

- don't allow trigger shutdown when management server is up and other management server nodes are in preparing states

- stop agent connections monitor on ms maintenance

- update avoid ms list in ready command

- updated connected host from the client connection

- update last agents in ms metrics from the database

- updated some agent config descriptions

- update last management server in the hosts during shutdown

- added agents and lastagents in management server response

- updated management server maintenance & shutdown unit tests

- some code improvements

* refactored code / addressed comments

* removed shutdown testcase (maybe, calling System.exit)

* Revert "removed shutdown testcase (maybe, calling System.exit)"

This reverts commit e14b0717152ef6c8be102d61c80f42803a53172e.

* avoid system.exit during shutdown test

* code improvements

* testcase fix

* Fix cutoff time in agent connections monitor thread
2025-03-19 14:18:05 +05:30
Rene Peinthor
f4a7c8ab89
linstor: implement missing deleteDatastore (#10561)
Somehow deleteDatastore was never implemented, that meant:
templates haven't been cleaned up on datastore delete and
also agents have never been informed about storage pool removal.
2025-03-18 08:50:19 -04:00
Pearl Dsilva
1732f676db Merge branch '4.20' of https://github.com/apache/cloudstack 2025-03-17 13:26:50 -04:00
Pearl Dsilva
e091aad792 Merge branch '4.19' of https://github.com/apache/cloudstack into 4.20 2025-03-17 13:26:26 -04:00
Abhisar Sinha
35e809e7ce
Set external Id to null after backupProvider.removeVMFromBackup (#10562) 2025-03-17 12:46:05 -04:00
Daan Hoogland
9c6f2a9e14 Merge release branch 4.20 to main
* 4.20:
  Fix Stats Collector to not divide by zero (#10492)
  linstor: try to delete -rst resource before snapshot backup (#10443)
2025-03-12 11:31:56 +01:00
Daan Hoogland
f8adedc280 Merge release branch 4.19 to 4.20
* 4.19:
  linstor: try to delete -rst resource before snapshot backup (#10443)
2025-03-12 11:31:16 +01:00
Rene Peinthor
95c24810ab
linstor: try to delete -rst resource before snapshot backup (#10443)
If a -rst resource wasn't deleted because of a failed copy,
a reoccurring snapshot attempt couldn't be done, because there
was still the "old" -rst resource. To prevent this always
try to remove the -rst resource before, if it doesn't exist it is a noop.
2025-03-10 16:23:01 +01:00
Pearl Dsilva
b387bc1664 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-03-10 09:34:52 -04:00
Pearl Dsilva
0427abf855 Merge branch '4.19' of https://github.com/apache/cloudstack into 4.20 2025-03-10 09:34:24 -04:00
Wei Zhou
8ce34ad791
kvm: find cluster-wide pools only in Up state when investigate a host (#10516) 2025-03-10 09:27:38 -04:00
Wei Zhou
cd6d1a23a2
KVM: return null state instead of Disconnected when investigate a host without NFS (#10515) 2025-03-10 09:06:15 +01:00
Thomas O'Dowd
d94aaa8b59
Add Cloudian HyperStore Object Storage (#9748) 2025-03-10 07:38:40 +01:00
Phsm Qwerty
8b092951cb
prometheus: don't poll the same tag multiple times (#10450) 2025-03-07 00:26:43 -05:00
Abhishek Kumar
1c1dad977e Merge remote-tracking branch 'apache/4.20' 2025-03-06 09:55:27 +05:30
Pearl Dsilva
7f4e6a9d51
NAS B&R Plugin enhancements (#9666)
* NAS B&R Plugin enhancements

* Prevent printing mount opts which may include password by removing from response

* revert marvin change

* add sanity checks to validate minimum qemu and libvirt versions

* check is user running script is part of libvirt group

* revert changes of retore expunged VM

* add code coverage ignore file

* remove check

* issue with listing schedules and add defensive checks

* redirect logs to agent log file

* add some more debugging

* remove test file

* prevent deletion of cks cluster when vms associated to a backup offering

* delete all snapshot policies when bkp offering is disassociated from a VM

* Fix `updateTemplatePermission` when the UI is set to a language other than English (#9766)

* Fix updateTemplatePermission UI in non-english language

* Improve fix

---------

* Add nobrl in the mountopts for cifs file system

* Fix restoration of VM / volumes with cifs

* add cifs utils for el8

* add cifs-utils for ubuntu cloudstack-agent

* syntax error

* remove required constraint on both vmid and id params for the delete bkp schedule command
2025-03-04 11:32:09 -05:00
Pearl Dsilva
48ed5e2417 Merge branch '4.19' into 4.20 2025-03-04 09:17:16 -05:00
slavkap
9b8c862f9f
removing the usage of volumeFreeze StorPool API call (#8575) 2025-03-03 16:03:15 +01:00
Rene Glover
f0179855f5
add use of virsh domifaddr to get VM external DHCP IP (#10376)
* add use of virsh domifaddr to get VM external DHCP IP

* updates to modularize LibvirtGetVmIpAddressCommandWrapper per comments; added test cases to cover 90%+ scenarios

* updates to modularize LibvirtGetVmIpAddressCommandWrapper per comments; added test cases to cover 90%+ scenarios

* updates to modularize LibvirtGetVmIpAddressCommandWrapper per comments; added test cases to cover 90%+ scenarios
2025-02-28 10:13:53 +05:30
Pearl Dsilva
3a28a87483 Merge branch '4.20' of https://github.com/apache/cloudstack 2025-02-27 11:20:25 -05:00
Daan Hoogland
88916dcf2b Merge branch '4.19' into 4.20 2025-02-27 17:10:54 +01:00
Wei Zhou
f992ebb52a
fix volume migration across cluster-scope pools (#10266) 2025-02-27 08:50:22 -05:00
dahn
48f890a693
resolve merge problems in the backup framework (#10457)
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-02-26 14:12:40 +01:00
Phsm Qwerty
37c4df9ada
fix: enforce the cpu shares within allowed range (#10221)
To be compatible with older libvirt versions

Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-02-25 10:42:41 -05:00
Daan Hoogland
4a3686297d Updating pom.xml version numbers for release 4.19.3.0-SNAPSHOT
Signed-off-by: Daan Hoogland <daan@onecht.net>
2025-02-25 10:43:11 +01:00
Daan Hoogland
24b7c66251 Merge branch '4.20' 2025-02-24 14:33:12 +01:00
Daan Hoogland
08ad1c70ba Merge branch '4.19' into 4.20 2025-02-24 14:21:14 +01:00
Daan Hoogland
4e321d4356 Updating pom.xml version numbers for release 4.19.2.0
Signed-off-by: Daan Hoogland <daan@onecht.net>
2025-02-20 09:32:07 +01:00
dahn
e196275d5a
ipmi: extra log sanitation (#10428) 2025-02-20 09:01:28 +01:00
BartJM
ee32f4cfe8
Add cpu speed detection methods (#9762)
Added additional match for lscpu
Added additional file to check
2025-02-19 08:33:49 -05:00
Wei Zhou
21b5e4dcae
Veeam: set backed_volumes for each backup (#9898) 2025-02-18 11:31:15 -05:00