36581 Commits

Author SHA1 Message Date
sato03
76aff0f422
Add reconnect button to hosts on alert (#8468)
Currently, if a host is on alert, the option to reconnect it is not presented in the UI.

This PR addresses this issue by adding a reconnect button to the host if it is in an alert state.
2024-01-10 12:05:46 +05:30
Abhishek Kumar
d6ac91f2df
minio: fix store user creation (#8425)
To prevent errors during multi-user access, use account UUID to create/access user on the provider side. Also, update the existing secret key for a user that already exists.
2024-01-09 17:44:11 +05:30
Suresh Kumar Anaparti
2b28a664fe
Updated jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes), to support user data upto 1048576 bytes (#8420)
This PR enables support for user data content upto 1048576 bytes - updates jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes).

CloudStack can support max user data content to 1048576 bytes (the size can be configurable through vm.userdata.max.length setting, max 1048576), but it's limited due to the default Jetty max content size, which is 200000 bytes.

Configuration Reference from jetty doc:
https://eclipse.dev/jetty/documentation/jetty-9/index.html#configuring-specific-webapp-deployment (check with maxFormContentSize here)
2024-01-09 17:38:44 +05:30
Nicolas Vazquez
9a915b11c4
Fix KVM import unmanaged instance (#8433)
This PR fixes KVM manage/unmanage functionality on 4.19.0 RC1 - was introduced on #7976 but the latest merge commits on the PR removed the execution for KVM
2024-01-09 17:38:11 +05:30
Abhishek Kumar
514d2c2a26
schema,engine-schema: explicit VMware 8.0.0.2, 8.0.0.3 support, logs (#8444)
Fixes #8412

Add support for 8.0.0.2 explicitly to prevent falling over to the parent version
Adds log when hypervisor capabilities fail over to the parent version

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-09 14:43:04 +05:30
Abhishek Kumar
5c32a0edba
ui: prevent scheduling readyforshutdown job when api inaccessible (#8448)
Non-admin account may not have access to the readyForShutdown API therefore UI should not schedule the job.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-08 18:02:11 +05:30
Abhishek Kumar
a68dc0bfb5 Merge remote-tracking branch 'apache/4.18' 2024-01-08 18:01:13 +05:30
Abhishek Kumar
f023fc53c0
engine-schema: fix finding guestos mapping with parent version (#8426)
GuestOS mappings are retrieved from the parent hypervisor version when a minor, patch hypervisor version doesn't exist.

Fixes #8412

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-08 17:51:04 +05:30
Nicolas Vazquez
3f9dd4dc07
Fix VMware VM ingestion template selection and default template failure (#8429)
This PR fixes the template selection regression for VMware Ingestion in the UI on 4.19.0 RC1 and adds back the default template selection for VMware

Fixes: #8428 #8432
2024-01-05 12:57:13 +05:30
Abhishek Kumar
746bae740e
ui: fix default domainid for add account (#8435)
Fixes setting domainid param default value which was being set to 0.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-04 17:59:18 +05:30
Abhishek Kumar
66ae96b5eb
ui: fix layout for action button for template form (#8434)
Fixes layout for the action buttons on register template form

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2024-01-04 17:33:55 +05:30
João Jandre
687610dd5f
Fix bootstrap exceptions (#8397)
During management server initialization, some EmptyStackException and BeansException exceptions are always thrown; These exceptions do not affect ACS, however, they can cause confusion when observing the management server startup logs with DEBUG level on. The causes of the exceptions have been addressed.

Co-authored-by: João Jandre <joao@scclouds.com.br>
2024-01-04 17:27:24 +05:30
Vishesh
2eaed80435
ui: fix ssl check in image store browser (#8430)
This PR fixes the ssl in image store browser.
2024-01-04 17:26:07 +05:30
dahn
9d4f0715d4
change of the guard (#8408) 2023-12-27 13:56:17 +01:00
Abhishek Kumar
a97ce242ba Merge remote-tracking branch 'apache/4.18' 2023-12-22 15:44:17 +05:30
João Jandre
08749d8354
server: skip password policies check on empty password (#8370)
This PR changes the password.policy.regex default value to empty. With an empty value for the configuration, it is skipped during the password policy check, only when the configuration is set to something different than a blank string, the regex will get checked.
This way, when creating a user on org.apache.cloudstack.ldap.LdapAuthenticator#authenticate() we won't get an error by default, as an empty value for the password is passed.
2023-12-22 15:43:39 +05:30
Abhishek Kumar
ab808995ff
Revert "Add e2e tests for listing resources (#8281)" (#8396)
This reverts commit 1411da1a22bc6aa26634f3038475e3d5fbbcd6bb.
2023-12-21 20:56:40 +05:30
Abhishek Kumar
26214ea139 Merge remote-tracking branch 'apache/4.18' 2023-12-21 20:55:38 +05:30
Abhishek Kumar
d83d994929
test: additional check to ensure hosts are left in up state (#8383)
With this change, a fix is added for failures seen with test_08_migrate_vm or other migration-related tests because the target host is in `Connecting` state,
#8356 (comment)
#8374 (comment)
and more
2023-12-21 20:54:43 +05:30
Wei Zhou
9d3a7be4dd
server: fix debug message when expunge a vm (#8374)
This PR fixes the debug message when expunge a vm
2023-12-21 14:17:57 +05:30
Rohit Yadav
6d916cad34 Merge remote-tracking branch 'origin/4.18' 2023-12-21 13:18:51 +05:30
Rohit Yadav
969e094419
server: improve stats collector logs to state what the collector does (#8387)
This simply improves the log statement that prints debug statements
during beginning of a stats collector run for hosts or VMs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-12-21 13:06:32 +05:30
Vishesh
1411da1a22
Add e2e tests for listing resources (#8281)
This PR adds e2e tests for listing resources
2023-12-20 11:54:39 +05:30
Abhishek Kumar
f5c7018e5e Merge remote-tracking branch 'apache/4.18' 2023-12-20 11:53:18 +05:30
Abhishek Kumar
64ecd00eb7
test: fix test_host_ping.py to restore original host state (#8380)
Failures seen in #7344 were debugged and it was seen since one of the
host is in Alert state. VM deployment fails with affinity group.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-12-20 11:52:08 +05:30
Vishesh
7c06d289d2
Fixup test_image_store_object_migration.py (#8378)
This PR fixes failure seem in #7344 (comment)
2023-12-20 11:17:41 +05:30
Abhishek Kumar
2253a33c1e Merge remote-tracking branch 'apache/4.18' 2023-12-20 08:58:30 +05:30
Wei Zhou
ab70108f15
CKS: create Security Groups for CKS clusters of each account (#8316)
This PR fixes #7684

The security groups contain the same rules for port 22 and 6443, no need to recreate for each CKS cluster.
2023-12-20 08:57:27 +05:30
Wei Zhou
33e2a4dd66
VPC: update default network offering for vpc tier to conserve_mode=1 (#8309)
This PR updates the conserve mode of default vpc tier offering to conserve_mode=1
so we can create both port forwarding and load balancing rules on a public IP in vpc tiers.

This fixes #8313
2023-12-18 12:08:51 +05:30
Fabricio Duarte
16d45f731d
Save the account which deliberately removed a public IP from quarantine (#8339)
When a public IP gets removed from quarantine, the removal reason gets saved to the database; however, it may also be useful for operators to know who removed the public IP from quarantine. For that reason, this PR extends the public IP quarantine feature so that the account that deliberately removed an IP from quarantine also gets saved to the database.
2023-12-18 12:06:31 +05:30
Rohit Yadav
af872224d6
README: that time of the year! 🎄 (#8365)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-12-16 11:48:20 +01:00
sato03
127fd9d2f0
UI: Project column in Default View (#8287)
The Default View has a projects toggle button that allows users to see which resources belong to projects, but there is nothing to indicate which project they belong to.

For this reason, a project column was added if the projects button is enabled, indicating the name of the project to which the resource belongs.

---------

Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2023-12-15 17:42:24 +05:30
John Bampton
dda672503f
Remove unneeded duplicate words (#8358)
This PR removes some unneeded duplicate words.
2023-12-15 17:13:32 +05:30
Abhishek Kumar
de095ba70d
server: fix url check for storages without a valid url (#8353)
Fixes #8352
Some managed storages may not need a valid URL to be passed. We can skip check and extraction of host or path from url of such storages.
2023-12-15 16:25:28 +05:30
Wei Zhou
0bc7fb540a
client/pom.xml: fix code coverage is not updated in some modules (#8346)
This PR fixes that code coverage is not updated in some modules

The following modules should have better code coverage with this PR

    cloud-agent
    cloud-api
    cloud-core
    cloud-framework-cluster
    cloud-framework-config
    cloud-framework-db
    cloud-framework-events
    cloud-framework-jobs
    cloud-framework-managed-context
    cloud-framework-security
    cloud-usage
    cloud-utils
2023-12-14 13:18:16 +05:30
kishankavala
ab20b1220f
KVM Ingestion - Import Instance (#7976)
This PR adds new functionality to import KVM instances from an external host or from disk images in local or shared storage.
Doc PR: https://github.com/apache/cloudstack-documentation/pull/356
2023-12-14 13:08:56 +05:30
Abhishek Kumar
82f7abddb3 Merge remote-tracking branch 'apache/4.18' 2023-12-13 11:24:15 +05:30
Bryan Lima
3bb318bab9
kvm: Add support for cgroupv2 (#8252)
1. Problem description

In Apache CloudStack (ACS), when a VM is deployed in a host with the KVM hypervisor, an XML file is created in the assigned host, which has a property shares that defines the weight of the VM to access the host CPU. The value of this property has no unit, and it is a relative measure to calculate how much CPU a given VM will have in the host. However, this value has a limit, which depends on the version of cgroup utilized by the host's kernel. The problem lies at the range value of shares that varies between both versions: [2, 264144] for cgroups version 1; and [1, 10000] for cgroups version 2. Currently, ACS calculates the value of shares using Equation 1, presented below, where CPU is the number of cores and speed is the CPU frequency; both specified in the VM's compute offering. Therefore, if a compute offering has, for example, 6 cores at 2 GHz, the shares value will be 12000 and an exception will be thrown by libvirt if the host utilizes cgroup v2. The second version is becoming the default one in current Linux distributions; thus, it is necessary to address this limitation.

    Equation 1
    shares = CPU * speed

Fixes: #6744
2. Proposed changes

To address the problem described, we propose to apply a scale conversion considering the max shares of the host. Using the same formula currently utilized by ACS, it is possible to calculate the maximum shares of a VM for a given host. In other words, using the number of cores and the nominal speed of the host's CPU as the upper limit of shares allowed to a VM. Then, this value will be scaled to the allowed interval of [1, 10000] of cgroup v2 by using a linear scale conversion.

The VM shares would be calculated as Equation 2, presented below, where VM requested shares is the requested shares value calculated using Equation 1, cgroup upper limit is fixed with a value of 10000 (cgroups v2 upper limit), and host max shares is the maximum shares value of the host, calculated using Equation 1. Using Equation 2, the only case where a VM passes the cgroup v2 limit is when the user requests more resources than the host has, which is not possible with the current implementation of ACS.

    Equation 2
    shares = (VM requested shares * cgroup upper limit)/host max shares

To implement the proposal, the following APIs will be updated: deployVirtualMachine, migrateVirtualMachine and scaleVirtualMachine. When a VM is being deployed, a new verification will be added to find a suitable host. The max shares of each host will be calculated, and the VM calculated shares will be verified if it does not surpass the host's value. Likewise, the migration of VMs will have a similar new verification. Lastly, the scale of VMs will also have the same verification for the VM's host.

To determine the max shares of a given host, we will use the same equation currently used in ACS for calculating the shares of VMs, presented in Section 1. When Equation 1 is used to determine the maximum shares of a host, CPU is the number of cores of the host, and speed is the nominal CPU speed, i.e., considering the CPU's base frequency.

It is important to note that these changes are only for hosts with the KVM hypervisor using cgroup v2 for now.
2023-12-13 10:51:24 +05:30
Nicolas Vazquez
27a3d61729
Fix unmanage VM marvin tests and small UI fixes for import (#8338)
This PR fixes the failing smoke test for test_vm_lifecycle_unmanage_import.py for Vmware and adds a small UI fix on the import wizard
2023-12-13 10:25:05 +05:30
Vishesh
a791d46abe
events,alerts: Add missing indexes (#8276)
This PR adds missing indexes on `alerts` & `events` tables.

For alerts table, some of the queries are part of a couple of APIs and some operations. I have added the index for the same. Ref: 
8f39087377/engine/schema/src/main/java/com/cloud/alert/dao/AlertDaoImpl.java (L40-L45)

For Events table, we query for `resource_id` & `resource_type` in the UI for a resource's events. Indexes were missing, so I have added those.
2023-12-13 10:24:36 +05:30
Abhishek Kumar
080a5aee00 Merge remote-tracking branch 'apache/4.18' 2023-12-12 17:01:52 +05:30
Harikrishna
3ce7c39bef
cks: handle errors while scaling cluster (#8107)
This PR fixes the issue #7920
2023-12-12 16:57:28 +05:30
Abhishek Kumar
05b0a8ae86 Merge remote-tracking branch 'apache/4.18' 2023-12-12 16:48:21 +05:30
Rohit Yadav
031b4c675c .asf.yaml: dummy commit to force asf.yaml effect
ASF Infra has enabled Github Discussions but discussion isn't published
on users@ ML yet. Pushing this dummy commit to see if makes any effect.
https://github.com/apache/cloudstack/pull/8274#issuecomment-1849641565

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-12-11 16:16:54 +05:30
Abhishek Kumar
ce586e3eca
server: fix resource count during assign volume (#8171)
ResourceType.volume stores the count of the volume and not the size so increment decrement should be just 1 when assigning a volume to a different account.
2023-12-11 15:45:42 +05:30
Rohit Yadav
05d0dd851f
.asf.yaml: Enable Github Discussions for CloudStack (#8274)
This enables Github Discussions feature for Apache CloudStack
repository. Several tech-savvy users are already using CloudStack issues
to report bugs, improvements and ideas, and finding using mailing list
old-school. The discussions feature presents a forum and can help
community have both users (including non-technical users) and developers
on the same platform. Further, the discussions feature is proposed to be
connected to the users@ mailing list so traditional users can benefit
from discussions happening on Github Discusssions forum.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-12-11 14:52:35 +05:30
João Jandre
12dcf5cc6f
Move subdomains between domains (#7446)
Sometimes users have the need to move resources between domains, for example, in a big company, a department may be moved from one part of the company to another, changing the company's department hierarchy, the easiest way of reflecting this change on the company's cloud environment would be to move subdomains between domains, but currently ACS offers no option to do that.
This PR adds the moveDomain API, which will move domains between subdomains. Furthermore, if the domain that is being moved has any subdomains, those will also be moved, maintaining the current subdomain tree.
2023-12-10 12:18:15 +05:30
Abhishek Kumar
4bdf35b7b0 Merge remote-tracking branch 'apache/4.18' 2023-12-09 12:04:21 +05:30
Abhishek Kumar
a11fc43788
server: fix diskoffering details in vm response (#8135)
Fixes #8120
2023-12-09 11:43:52 +05:30
dahn
ea569ffaad
expand tags in csv (#8258)
Fixes: #8256
2023-12-09 11:33:55 +05:30