3401 Commits

Author SHA1 Message Date
kishankavala
5651eab49c
ObjectStore Framework with MinIO and Simulator plugins (#7752)
This PR adds Object Storage feature to CloudStack.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/%5BDRAFT%5D+CloudStack+Object+Store
2023-12-01 17:51:00 +05:30
Bryan Lima
cb62ce6767
Global ACL for VPCs (#7150) 2023-11-30 14:51:43 +01:00
João Jandre
26b01f6f3b
Flexible tags for hosts and storage pools (#7489)
Co-authored-by: João Jandre <joao@scclouds.com.br>
2023-11-30 09:36:47 +01:00
Wei Zhou
cb2b6aca45
server: check if there are active nics before network GC (#8204) 2023-11-29 18:55:26 +01:00
Abhishek Kumar
c7ed4ca272
schema: revert incorrect removal of oauth changes in #7417 (#8245)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-11-17 15:11:11 +01:00
Daniel Augusto Veronezi Salvador
adbb5520ca
Database VIEW management via separated files (#7417)
Co-authored-by: Daniel Augusto Veronezi Salvador <gutoveronezi@apache.org>
2023-11-17 10:27:53 +01:00
Kavvya Ramarathnam
6eb04a86a6
Fixed Hashmap Key value comparision (#8238)
Co-authored-by: kavvya97 <kavvya.ramarathnam@gmail.com>
2023-11-17 09:05:58 +01:00
Bryan Lima
1f29f6f040
Public IP quarantine feature (#7378) 2023-11-15 10:29:22 +01:00
Daan Hoogland
05b9b6e2e7 Merge branch '4.18' into main 2023-11-13 11:36:51 +01:00
Abhishek Kumar
d0f3233fda
edge-zone,kvm,iso,cks: allow k8s deployment with direct-download iso (#8142)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-11-10 13:56:05 +01:00
Vishesh
d3917ef8f6
Remove powermock form VM Manager test (#8199) 2023-11-08 14:21:32 -03:00
Daan Hoogland
3d7281d451 Merge branch '4.18' into main 2023-11-08 14:39:50 +01:00
Vishesh
e65c9ffe70
Fix: Select another pod if all hosts in the pod becomes unavailable (#8085) 2023-11-07 15:11:00 +01:00
slavkap
2bb182c3e1
KVM Host HA enhancement for StorPool storage (#8045)
Extending the current functionality of KVM Host HA for the StorPool storage plugin and the option for easy integration for the rest of the storage plugins to support Host HA

This extension works like the current NFS storage implementation. It allows it to be used simultaneously with NFS and StorPool storage or only with StorPool primary storage.

If it is used with different primary storages like NFS and StorPool, and one of the health checks fails for storage, there is an option to report the failure to the management with the global config kvm.ha.fence.on.storage.heartbeat.failure. By default this option is disabled when enabled the Host HA service will continue with the checks on the host and eventually will fence the host
2023-11-04 12:35:37 +05:30
Abhishek Kumar
256892b3f8 build: fix failure after forward merge
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-11-03 17:28:20 +05:30
Daan Hoogland
a15cb81c85 Merge remote-tracking branch 'apache/4.18' into main 2023-11-03 11:55:26 +01:00
John Bampton
f090c77f41
misc: fix spelling (#7549)
Co-authored-by: Stephan Krug <stekrug@icloud.com>
2023-11-02 09:23:53 +01:00
Vishesh
5362bad442
Storage Management (#7949) 2023-11-01 10:46:22 +01:00
Harikrishna
235e4fe190
Oauth2 integration with CloudStack (#7996)
OAuth2, the industry-standard authorization or authentication framework, simplifies the process of
granting access to resources. CloudStack supports OAuth2 authentication wherein users can login into
CloudStack without using a username and password. Support for Google and Github providers has been added.
Other OAuth2 providers can be easily integrated with CloudStack using its plugin framework.

The login page will show provider options when the OAuth2 is enabled and corresponding providers are configured.

"OAuth configuration" sub-section is present under "Configuration" where admins can register the corresponding
OAuth providers.
2023-10-31 13:25:28 +05:30
Wei Zhou
bd52fa8a12
New feature: VNF templates and appliances integration (#8022) 2023-10-27 10:23:00 +02:00
Vishesh
3b11663d87
Fix failure on agent reconnection (#8089) 2023-10-26 16:54:36 +02:00
Daan Hoogland
587d1d7dba Merge remote-tracking branch 'apache/4.18' into main 2023-10-26 09:37:38 +02:00
slavkap
6ae3b73ca2
Create snapshot from VM snapshot without memory for NFS/Local storage (#8117) 2023-10-26 08:46:14 +02:00
Vishesh
ea90848429
Feature: Add support for DRS in a Cluster (#7723)
This pull request (PR) implements a Distributed Resource Scheduler (DRS) for a CloudStack cluster. The primary objective of this feature is to enable automatic resource optimization and workload balancing within the cluster by live migrating the VMs as per configuration.
Administrators can also execute DRS manually for a cluster, using the UI or the API.
Adds support for two algorithms - condensed & balanced. Algorithms are pluggable allowing ACS Administrators to have customized control over scheduling.

Implementation
There are three top level components:

    Scheduler
    A timer task which:

    Generate DRS plan for clusters
    Process DRS plan
    Remove old DRS plan records

    DRS Execution
    We go through each VM in the cluster and use the specified algorithm to check if DRS is required and to calculate cost, benefit & improvement of migrating that VM to another host in the cluster. On the basis of cost, benefit & improvement, the best migration is selected for the current iteration and the VM is migrated. The maximum number of iterations (live migrations) possible on the cluster is defined by drs.iterations which is defined as a percentage (as a value between 0 and 1) of total number of workloads.

    Algorithm
    Every algorithms implements two methods:
        needsDrs - to check if drs is required for cluster
        getMetrics - to calculate cost, benefit & improvement of a migrating a VM to another host.

Algorithms

    Condensed - Packs all the VMs on minimum number of hosts in the cluster.
    Balanced - Distributes the VMs evenly across hosts in the cluster.
    Algorithms use drs.level to decide the amount of imbalance to allow in the cluster.

APIs Added

listClusterDrsPlan

    id - ID of the DRS plan to list
    clusterid - to list plans for a cluster id

generateClusterDrsPlan

    id - cluster id
    iterations - The maximum number of iterations in a DRS job defined as a percentage (as a value between 0 and 1) of total number of workloads. Defaults to value of cluster's drs.iterations setting.

executeClusterDrsPlan

    id - ID of the cluster for which DRS plan is to be executed.
    migrateto - This parameter specifies the mapping between a vm and a host to migrate that VM. Format of this parameter: migrateto[vm-index].vm=<uuid>&migrateto[vm-index].host=<uuid>.

Config Keys Added

    ClusterDrsPlanExpireInterval
    Key drs.plan.expire.interval
    Scope Global
    Default Value 30 days
    Description The interval in days after which old DRS records will be cleaned up.

    ClusterDrsEnabled
    Key drs.automatic.enable
    Scope Cluster
    Default Value false
    Description Enable/disable automatic DRS on a cluster.

    ClusterDrsInterval
    Key drs.automatic.interval
    Scope Cluster
    Default Value 60 minutes
    Description The interval in minutes after which a periodic background thread will schedule DRS for a cluster.

    ClusterDrsIterations
    Key drs.max.migrations
    Scope Cluster
    Default Value 50
    Description Maximum number of live migrations in a DRS execution.

    ClusterDrsAlgorithm
    Key drs.algorithm
    Scope Cluster
    Default Value condensed
    Description DRS algorithm to execute on the cluster. This PR implements two algorithms - balanced & condensed.

    ClusterDrsLevel
    Key drs.imbalance
    Scope Cluster
    Default Value 0.5
    Description Percentage (as a value between 0.0 and 1.0) of imbalance allowed in the cluster. 1.0 means no imbalance
    is allowed and 0.0 means imbalance is allowed.

    ClusterDrsMetric
    Key drs.imbalance.metric
    Scope Cluster
    Default Value memory
    Description The cluster imbalance metric to use when checking the drs.imbalance.threshold. Possible values are memory and cpu.
2023-10-26 11:48:18 +05:30
Abhishek Kumar
543c54c718
api,server,ui: snapshot copy, multi-zone replica (#7873)
This PR adds new functionality to copy snapshots across zones and take snapshots for multiple zones.

Copy functionality is similar to template copy. The source zone acts as the web server from where the destination zone(s) can download the snapshot files. For this purpose, a new API - `copySnapshot` has been added. The response for copySnapshot will be returning zone and download details from the first destination zone of the request. This behaviour is similar to the `copyTemplate` API.

In a similar manner, multiple zones can be selected while taking the snapshots or creating snapshot policies. For this snapshot will be taken in the base zone(in which volume is present) and then copied to the additional zones. A new parameter - `zoneids` has been added to `createSnapshot` and `createSnapshotPolicy` APIs.

As snapshots can be present on multiple zones (secondary stores), a new parameter `zoneid` has been added to delete the snapshot copy on a specific zone.

`listSnapshots` API has been updated to allow listing snapshot entries for different zones/datastores. New parameters - `showUnique`, `locationType` have been added.

Events generated during snapshot operations will now be linked to the snapshot itself rather than the volume of the snapshot.

`listSnapshotPolicies` and `createSnapshotPolicy` APIs will return zone details of the zones in which backup will be scheduled for the policy.

----
New API added
`copySnapshot`

Request and response params updated for APIs
```
- listSnapshots
- deleteSnapshot
- createTemplate
- listZones
- listSnapshotPolicies
- createSnapshotPolicy
```
UI updated for
- Snapshot detail view
- Create snapshot form
- Create snapshot policy form
- Create volume (from snapshot) form
- Create template (from snapshot) form

Doc PR: https://github.com/apache/cloudstack-documentation/pull/344
PR: https://github.com/apache/cloudstack/pull/7873
2023-10-23 09:01:58 +02:00
Abhishek Kumar
99ded8169b Merge remote-tracking branch 'apache/4.18' into main 2023-10-20 17:40:19 +05:30
sato03
a8700bff7f
server: set Default NIC when VM has no default NIC (#7859)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2023-10-20 11:40:10 +02:00
Abhishek Kumar
20046ffe61 Merge remote-tracking branch 'apache/4.18' into main 2023-10-19 10:39:40 +05:30
Harikrishna
0183e25279
Fix VM snapshot size during storage capacity check (#8101) 2023-10-18 11:49:26 +02:00
John Bampton
9834d5168f
pre-commit: standardize more line endings to lf (#7804)
https://github.com/pre-commit/pre-commit-hooks#mixed-line-ending
2023-10-18 11:25:00 +02:00
sato03
e437d1016f
Snapshot removal and storage cleanup logs (#8031) 2023-10-16 16:20:09 +02:00
Abhishek Kumar
9df580cef4 Merge remote-tracking branch 'apache/4.18' into main 2023-10-12 16:54:19 +05:30
Abhishek Kumar
3e7f21a190
vm-import: fix stopped managed vms listing in unmanaged instances (#7606)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-10-12 09:21:47 +02:00
Rohit Yadav
8a34afa8ab Merge remote-tracking branch 'origin/4.18' 2023-10-11 21:00:06 +05:30
Rohit Yadav
8350ce5aa4
storage: allow VM snapshots without memory for KVM when global setting allows (#8062)
This removes the conditional logic where comment notest to remove it
after PR #5297 is merged that is applicable for ACS 4.18+. Only when the
global setting is enabled and memory isn't selected, VM snapshot could
be allowed for VMs on KVM that have qemu-guest-agent running.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-10-11 20:56:45 +05:30
Daan Hoogland
d627539688 Merge branch '4.18' 2023-10-02 16:03:28 +02:00
Wei Zhou
9a8cd13951
cleanup: remove unused class org.apache.cloudstack.network.NetworkOrchestrator (#7983) 2023-10-02 08:07:01 +02:00
dahn
a2566048fe
removal of unused interfaces (#7984) 2023-09-29 10:52:04 +02:00
sato03
31e2b629ee
Removed state for removed accounts (#7868)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2023-09-28 16:49:12 +02:00
Bryan Lima
ae5dda867f
Normalize encryption on global configurations values (#6812) 2023-09-28 16:44:36 +02:00
SadiJr
1bda2343f3
Improve logs when searching one storage pool to allocate a new volume (#7212)
Co-authored-by: SadiJr <sadi@scclouds.com.br>
2023-09-28 13:42:42 +02:00
Abhishek Kumar
14ca172099
mvn: fix userdata dependency version (#8017)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-09-28 14:37:49 +05:30
sato03
8d81ec425d
keep deleted projects name (#7858)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
2023-09-28 09:15:32 +02:00
Marcus Sorensen
3694667f50
Trigger out of band VM state update via libvirt event when VM stops (#7963)
* Trigger out of band VM state update via libvirt event when VM stops

* Add License headers, refactor nested try

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
2023-09-28 12:12:03 +05:30
Daan Hoogland
b20554820b Merge release branch 4.18 to main
* 4.18:
  VR: remove apache2 config for removed VPC tiers (#7982)
  fix units labels (#8001)
2023-09-28 07:59:15 +02:00
Oscar Sandoval
8aa45c1a98
fix units labels (#8001)
Co-authored-by: Oscar Sandoval <osandovalocana@apple.com>
2023-09-26 15:38:33 +05:30
Marcus Sorensen
155a30748c
Allow configkey to set 'cloud-name' cloud-init metadata (#7964)
* Allow configkey to set 'cloud-name' cloud-init metadata

* Update engine/api/src/main/java/com/cloud/vm/VirtualMachineManager.java

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

* Update server/src/main/java/com/cloud/network/NetworkModelImpl.java

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

* Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java

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

* Revert "Update server/src/main/java/com/cloud/network/router/CommandSetupHelper.java"

This reverts commit 8abc3e38c4f973227e77253a8bcf3c94827d187f.

* Revert "Update server/src/main/java/com/cloud/network/NetworkModelImpl.java"

This reverts commit 7f239be919112913d764b141e943acca4473f755.

* Rework/Fix review code suggestions

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2023-09-26 14:51:11 +05:30
Rohit Yadav
30e34ef310 Merge remote-tracking branch 'origin/4.18' 2023-09-26 14:43:23 +05:30
Pearl Dsilva
951ba04cf0
VR live patching: Allow live patch of VPC VRs even if networks are in allocated / shutdown state (#7958) 2023-09-25 20:34:23 +05:30
Daan Hoogland
f539c4b81a Merge release branch 4.18 to main
* 4.18:
  Publish event for VM.STOP when out of band stop is detected (#7878)
2023-09-25 10:20:57 +02:00