36598 Commits

Author SHA1 Message Date
GaOrtiga
6f3e4e6302
fix_filter_and_pagination (#8306)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2024-02-16 11:15:55 +01:00
Wei Zhou
f86c62e49a
UI: load domain lists only if listDomains API is available (#8660) 2024-02-15 16:36:16 +05:30
Wei Zhou
17516fd989
test: skip check for volume stats history on xenserver (#8661) 2024-02-15 16:32:49 +05:30
Rohit Yadav
bda49ab08f Merge remote-tracking branch 'shapeblue/merged-4-18' into 4.19 2024-02-13 12:54:24 +05:30
Vishesh
a8028eecbd
Merge remote-tracking branch 'origin/4.18' into 4.19 2024-02-13 11:44:20 +05:30
Vishesh
1955d8f3db
Add advance settings to fine tune DRS imbalance calculation (#8521)
* Use free/total instead of free metric to calculate imbalance

* Filter out hosts for condensed while checking imbalance

* Make DRS more configurable

* code refactor

* Add unit tests

* fixup

* Fix validation for drs.imbalance.condensed.skip.threshold

* Add logging and other minor changes for drs

* Add some logging for drs

* Change format for drs imbalance to string

* Show drs imbalance as percentage

* Fixup label for memorytotal in en.json
2024-02-13 11:18:53 +05:30
Rene Peinthor
70b634fff2
Linstor: add HA support and small cleanups (#8407)
* linstor: Outline get storagepools from resourcegroup into function

* linstor: move getHostname() to kvm/Pool and reimplement

* linstor: implement CloudStack HA support
2024-02-13 11:16:12 +05:30
Henrique Sato
d7362dd332
Migrating volumes filter (#8631)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-02-13 11:08:36 +05:30
Wei Zhou
e47a910019
VR: fix issue between VPC VMs and other Public IPs in the same subnet as additional Public IPs (#8599)
* VR: fix issue between VPC VMs and other Public IPs in the same subnet as additional Public IPs

* Update PR8599: move to VpcVirtualNetworkApplianceManagerImpl
2024-02-13 11:03:40 +05:30
dahn
672206c312
kvm: ITCO watchdog added (#8282)
* ITCO watchdog added

* add inject-nmi action

* Update plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java

Co-authored-by: Wei Zhou <weizhou@apache.org>

---------

Co-authored-by: Wei Zhou <weizhou@apache.org>
2024-02-12 08:54:39 +01:00
Vishesh
d8cd122849
zone wizard: allow only one untagged physical network with guest traffic type (#8625) 2024-02-09 16:31:06 +01:00
Wei Zhou
a924a110e1
Veeam: revert unnecessary state change if restore backup and attach to another VM (#8614) 2024-02-09 16:29:59 +01:00
Wei Zhou
af2e277999 Merge remote-tracking branch 'apache/4.18' into 4.19 2024-02-09 11:53:39 +01:00
Rohit Yadav
27520f83fe
packaging: bundle cmk in cloudstack-management package (#8574)
This bundles latest cmk release in cloudstack-management package, so
admins won't need to install it for typical first-install use.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-02-09 11:51:41 +01:00
Rene Peinthor
393f3d7727
linstor: use relative hostname path (#8633)
As described in issue #8310 some older distributions don't have
hostname in /usr/bin so rely on PATH resolving
2024-02-09 11:49:20 +01:00
Daniel Augusto Veronezi Salvador
2729ee110e
Enable over provisioning for SharedMountPoint primary storages (#8481)
* Enable over provisioning for SharedMountPoint primary storages

* Fix unit tests

* Fix typos and small adjusts

---------

Co-authored-by: Daniel Augusto Veronezi Salvador <gutoveronezi@apache.org>
2024-02-09 09:35:34 +01:00
Rohit Yadav
a1f547a011 Merge remote-tracking branch 'origin/4.18' into 4.19
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/util/LinstorUtil.java
2024-02-09 00:10:34 +05:30
slavkap
1d1b332141
remove StorPool tags from detached volumes (#8377)
* remove tags from detached volumes

* Adress comments

* address comments

* Address comments
2024-02-09 00:05:34 +05:30
Rene Peinthor
56f0448f0d
Linstor fix migration while node offline (#8610)
* linstor: Add util method getBestErrorMessage from main

* linstor: failed remove of allow-two-primaries is no fatal error

* linstor: Fix failure if a Linstor node is down while migrating

If a Linstor node is down while migrating resource, allow-two-primaries
setting will fail because we can't reach the downed node. But it will
still set the property on the other nodes and migration should work.
We now just report an error instead of completely failing.
2024-02-08 23:57:38 +05:30
Rohit Yadav
7394af3071 Merge remote-tracking branch 'origin/4.18' into 4.19 2024-02-08 23:53:32 +05:30
Leo
e53d3274fa Fix cloudstack-ui package: bad directory permissions and missing WEB-INF (#8568)
* Fix bad perms on sub directories for webapp asset files

Updated the spec file such that directories are chmod 0755 rather than 0644 which would prevent the cloud user from reading their contents.

* Fix bad permissions for centos8 UI files, missing WEB-INF

The cloudstack-ui package should have the same files as the bundled webapp in the management package.

* Fix bad perms and missing WEB-INF for centos7 ui rpm

Add the missing WEB-INF directory and do not set directories to 0755.

* Fix missing WEB-INF on CentOS 8 cloudstack-ui rpm

* Fix missing WEB-INF on CentOS 7 cloudstack-ui rpm
2024-02-08 23:51:57 +05:30
Leo
3fa052c1f5
Fix cloudstack-ui package: bad directory permissions and missing WEB-INF (#8568)
* Fix bad perms on sub directories for webapp asset files

Updated the spec file such that directories are chmod 0755 rather than 0644 which would prevent the cloud user from reading their contents.

* Fix bad permissions for centos8 UI files, missing WEB-INF

The cloudstack-ui package should have the same files as the bundled webapp in the management package.

* Fix bad perms and missing WEB-INF for centos7 ui rpm

Add the missing WEB-INF directory and do not set directories to 0755.

* Fix missing WEB-INF on CentOS 8 cloudstack-ui rpm

* Fix missing WEB-INF on CentOS 7 cloudstack-ui rpm
2024-02-08 23:15:20 +05:30
Rohit Yadav
0d36098c76 Merge remote-tracking branch 'origin/4.18' into 4.19 2024-02-07 14:20:39 +05:30
Rohit Yadav
376243975b README: silently revert to the original project logo
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2024-02-07 14:19:15 +05:30
Vishesh
df412a99d2
test: Add e2e tests for listing resources (#8410)
* Use dualzones for ci github actions

* Update advdualzone.cfg to be similar to advanced.cfg & fixup test_metrics_api.py

* Fixup e2e tests for running with multiple zones

* Add e2e tests for listing of accounts, disk_offerings, domains, hosts, service_offerings, storage_pools, volumes

* Fixup

* another fixup

* Add test for listing volumes with tags filter

* Add check for existing volumes in test_list_volumes

* Wait for volumes to be deleted on cleanup

* Filter out volumes in Destroy state before checking the count of volumes
2024-02-07 08:25:55 +01:00
Henrique Sato
b0ac78705d
Add IOPS to disk offerings details (#8447)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2024-02-06 11:36:43 +01:00
Wei Zhou
69e8ebc03f
CKS: retry if unable to drain node or unable to upgrade k8s node (#8402)
* CKS: retry if unable to drain node or unable to upgrade k8s node

I tried CKS upgrade 16 times, 11 of 16 upgrades succeeded.

2 of 16 upgrades failed due to
```
error: unable to drain node "testcluster-of7974-node-18c8c33c2c3" due to error:[error when evicting pods/"cloud-controller-manager-5b8fc87665-5nwlh" -n "kube-system": Post "https://10.0.66.18:6443/api/v1/namespaces/kube-system/pods/cloud-controller-manager-5b8fc87665-5nwlh/eviction": unexpected EOF, error when evicting pods/"coredns-5d78c9869d-h5nkz" -n "kube-system": Post "https://10.0.66.18:6443/api/v1/namespaces/kube-system/pods/coredns-5d78c9869d-h5nkz/eviction": unexpected EOF], continuing command...
```

3 of 16 upgrades failed due to
```
Error from server: error when retrieving current configuration of:
Resource: "rbac.authorization.k8s.io/v1, Resource=roles", GroupVersionKind: "rbac.authorization.k8s.io/v1, Kind=Role"
Name: "kubernetes-dashboard", Namespace: "kubernetes-dashboard"
from server for: "/mnt/k8sdisk//dashboard.yaml": etcdserver: leader changed
```

* CKS: remove tests of creating/deleting HA clusters as they are covered by the upgrade test

* Update PR 8402 as suggested

* test: remove CKS cluster if fail to create or verify
2024-02-06 11:14:10 +01:00
Wei Zhou
c795547152 server: fix build error with BackupManagerTest.tryRestoreVMTestRestoreSucceeded
```
[ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.025 s <<< FAILURE! - in org.apache.cloudstack.backup.BackupManagerTest
[ERROR] tryRestoreVMTestRestoreSucceeded(org.apache.cloudstack.backup.BackupManagerTest)  Time elapsed: 0.469 s  <<< ERROR!
com.cloud.utils.exception.CloudRuntimeException: Unable to change state of volume [Mock for VolumeVO, hashCode: 220689785] to [Ready].
```
2024-02-05 13:24:04 +01:00
Wei Zhou
54225ecd15 Veeam: fix incompatible types: String cannot be converted to Date 2024-02-05 10:50:16 +01:00
Wei Zhou
b8904f75dd Merge remote-tracking branch 'apache/4.18' into 4.19 2024-02-05 10:08:31 +01:00
Andrija Panic
c0643a8f6e
Update server.properties.in (#8509)
Grammar and link corrections.
2024-02-05 14:24:54 +05:30
slavkap
94c8b1da5c
Option to create StorPool primary storage with a valid URL (#8356)
* Option to create primary storage with a valid URL

* check if the scheme is valid
2024-02-05 14:21:13 +05:30
Rakesh
0ba26912df
Fix typo in alert name (#8579)
Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2024-02-05 14:19:30 +05:30
Lucas Martins
2f299492f6
Fix API moveUser parameters descriptions (#8499)
* Fix API moveUser description

* Add dot to description

* Update api/src/main/java/org/apache/cloudstack/api/command/admin/user/MoveUserCmd.java

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

---------

Co-authored-by: lucas.martins.scclouds <lucas.martins@scclouds.com.br>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-02-05 14:18:02 +05:30
Pearl Dsilva
5361b415e6
Image Store: View Access status of the image store and view events (#8467) 2024-02-05 14:17:29 +05:30
Wei Zhou
b2e29931e8
UI: fix icmp code/type of ACL rule are not display if the value is 0 (#8589) 2024-02-05 14:11:33 +05:30
Leo
ca55fc08e9
Added missing metrics English locale strings (#8560)
* Update ui/public/locales/en.json

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

* Update ui/public/locales/en.json

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

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2024-02-05 14:10:25 +05:30
Wei Zhou
1d5230b516
server: use ed25519 instead of rsa when generate public/private keys (#8549)
RSA has been considered as insecure and 'ssh-rsa' signature algorithm has been deprecated in OpenSSH.
2024-02-05 14:10:05 +05:30
dahn
3f33592b67
systemvm: vncport evaluation (#8369)
* make sure env var gets evaluated by using double quotes

* delete unsused scripts
2024-02-05 14:08:00 +05:30
Marcus Sorensen
9f1b34aeb2
Fix libvirt domain event listener by properly processing events (#8437)
* Fix libvirt domain event listener by properly processing events

* Add javadoc for setupEventListener

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
2024-02-05 13:30:10 +05:30
Suresh Kumar Anaparti
2df6802176
Allocate new ROOT volume (on restore virtual machine operation) only when resource count increment succeeds (#8555)
* Allocate new volume on restore virtual machine operation when resource count increment succeeds
- keep them in transaction, and fail operation if resource count increment fails

* Added some (negative) unit tests for restore vm
2024-02-05 13:28:28 +05:30
Suresh Kumar Anaparti
f702f7f57c
Remove sensitive params (VmPassword, etc) from VMWork log (#8553) 2024-02-05 13:26:18 +05:30
Abhishek Kumar
3550f6a959
tools,changelog: fix nextversion (#8606)
Fixes next version in files that were not updated by the setnextversion
script.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-02-05 11:15:13 +05:30
Abhishek Kumar
67bd3aad71 Updating tools/checkstyle/pom.xml version numbers for release 4.19.1.0-SNAPSHOT
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-02-02 18:13:20 +05:30
Abhishek Kumar
a7b97ff3b0 Updating pom.xml version numbers for release 4.19.1.0-SNAPSHOT
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-02-02 18:06:04 +05:30
Lucas Martins
1c98b5a4e5 Change Cryptsetup validation (#8482)
Co-authored-by: lucas.martins.scclouds <lucas.martins@scclouds.com.br>
2024-02-01 09:43:28 +01:00
Wei Zhou
b34f093137
veeam: fix some issues with restoring volume from backup and attaching it to VM (#8570)
* veeam: detach only the restored volume during backup restore

Steps to reproduce the issue
1. create a VM (A) with ROOT and DATA disk
2. assign to a backup offering
3. create backup
4. create another VM (B)
5. restore the DATA disk of VM A, and attach to VM B
6. When operation is done, check the datastore

Without this change, the ROOT image is not removed and left over on the datastore.
```
[root@ref-trl-5933-v-Mr8-wei-zhou-esxi2:/vmfs/volumes/5f60667d-18d828eb] ls -l /vmfs/volumes/5f60667d-18d828eb/CS-RSTR-dfb6f21c-a941-49db-9963-4f0286a17dac
total 1784840
-rw-------    1 root     root     5242880000 Jan 24 09:23 ROOT-722_2-flat.vmdk
-rw-------    1 root     root           499 Jan 24 09:23 ROOT-722_2.vmdk
```

With this change, the whole temporary vm has been destroyed.
```
[root@ref-trl-5933-v-Mr8-wei-zhou-esxi2:/vmfs/volumes/5f60667d-18d828eb] ls -l /vmfs/volumes/5f60667d-18d828eb/CS-RSTR-734bee3b-640c-4ff0-a34b-bc45358565b2
ls: /vmfs/volumes/5f60667d-18d828eb/CS-RSTR-734bee3b-640c-4ff0-a34b-bc45358565b2: No such file or directory
```

* veeam: fix wrong disk size in debug message

* veeam: sync backup repository after operations are done

got exception of some operations which succeeds due to the following error
```
2024-01-19 10:59:52,846 DEBUG [o.a.c.b.v.VeeamClient] (API-Job-Executor-42:ctx-716501bb job-4373 ctx-2359b76d) (logid:b5e19a17) Veeam response for PowerShell commands [PowerShell Import-Module Veeam.Backup.PowerShell -WarningAction SilentlyContinue;$restorePoint = Get-VBRRestorePoint ^| Where-Object { $_.Id -eq '1d99106a-b5c8-4a1e-958d-066a987caa5f' };if ($restorePoint) { Remove-VBRRestorePoint -Oib $restorePoint -Confirm:$false;$repo = Get-VBRBackupRepository;Sync-VBRBackupRepository -Repository $repo;} else { ; Write-Output 'Failed to delete'; Exit 1;}] is: [^M
Restore Type       Job Name             State      Start Time             End Time               Description           ^M
------------       --------             -----      ----------             --------               -----------           ^M
ConfResynchronize  Configuration Dat... Starting   19/01/2024 10:59:52    01/01/1900 00:00:00                          ^M
^M
^M
Remove-VBRRestorePoint : Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. ^M
Contact Microsoft Customer Support Services.^M
At line:1 char:196^M
+ ... orePoint) { Remove-VBRRestorePoint -Oib $restorePoint -Confirm:$false ...^M
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^M
    + CategoryInfo          : ReadError: (:) [Remove-VBRRestorePoint], HostException^M
    + FullyQualifiedErrorId : ReadConsoleOutput,Veeam.Backup.PowerShell.Cmdlets.RemoveVBRRestorePoint^M
 ^M
].
```

* veeam: fix unable to detach volume when restore backup and attach to vm then detach the volume

It also happened when destroy the original or backup VM

```
2024-01-24 10:10:03,401 ERROR [c.c.s.r.VmwareStorageProcessor] (DirectAgent-74:ctx-95b24ac7 10.0.35.53, job-25995/job-25996, cmd: DettachCommand) (logid:7260ffb8) Failed to detach volume!
java.lang.RuntimeException: Unable to access file [de52fdd3386b3d67b27b3960ecdb08f4] i-2-723-VM/7c2197c129464035bab062edec536a09-flat.vmdk
        at com.cloud.hypervisor.vmware.util.VmwareClient.waitForTask(VmwareClient.java:426)
        at com.cloud.hypervisor.vmware.mo.DatastoreMO.moveDatastoreFile(DatastoreMO.java:290)
        at com.cloud.storage.resource.VmwareStorageLayoutHelper.syncVolumeToRootFolder(VmwareStorageLayoutHelper.java:241)
        at com.cloud.storage.resource.VmwareStorageProcessor.attachVolume(VmwareStorageProcessor.java:2150)
        at com.cloud.storage.resource.VmwareStorageProcessor.dettachVolume(VmwareStorageProcessor.java:2408)
        at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.execute(StorageSubsystemCommandHandlerBase.java:174)
        at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.handleStorageCommands(StorageSubsystemCommandHandlerBase.java:71)
        at com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:589)
        at com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:315)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
        at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
        at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
2024-01-24 10:10:03,402 INFO  [c.c.h.v.u.VmwareHelper] (DirectAgent-74:ctx-95b24ac7 10.0.35.53, job-25995/job-25996, cmd: DettachCommand) (logid:7260ffb8) [ignored]failed to get message for exception: Unable to access file [de52fdd3386b3d67b27b3960ecdb08f4] i-2-723-VM/7c2197c129464035bab062edec536a09-flat.vmdk
```

* vmware: create restored volume with new UUID and attach to VM
2024-01-29 11:40:43 +01:00
Abhishek Kumar
2746225b99 Updating pom.xml version numbers for release 4.19.0.0
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
4.19.0.0
2024-01-29 10:21:52 +05:30
Vishesh
fedcf66de0
Externalise a few timeouts & fix timeout for hostSupportsUefi in libvirt ready command wrapper (#8547)
This PR fixes bug introduced in #8502. Timeout for script execution was set to 60 ms instead of 60s which resulted in host not getting UEFI enabled. This is a blocker for 4.19 release.

We do this by introducing a new agent parameter `agent.script.timeout` (default - 60 seconds) to use as a timeout for the script checking host's UEFI status.

We also externalize the timeout for the ReadyCommand by introducing a new global setting `ready.command.wait` (default - 60 seconds).

For ModifyStoragePoolCommand, we don't externalize the timeout to avoid confusion for the user. Since, the required timeout can vary depending on the provider in use and we are only setting the wait for default host listener for now. Instead, we reuse the global `wait` setting by dividing it by `5` making the default value of 6 minutes (1800/5 = 360s) for ModifyStoragePoolCommand.

Note: the actual time, the MS waits is twice the wait set for a Command. Check reference code below.
19250403e6/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentAttache.java (L406-L442)
2024-01-27 23:36:13 +05:30
Abhishek Kumar
19250403e6
ui: fix create k8s cluster multiple listing (#8539)
Fixes #8536

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-22 10:26:40 +05:30