4308 Commits

Author SHA1 Message Date
Rohit Yadav
62a8f4ef72 Merge remote-tracking branch 'origin/4.18' 2023-07-24 15:57:37 +05:30
Abhishek Kumar
cee7a713aa
server: clear resource reservation and increment resource count in a transaction (#7724)
This PR addresses rare case of potential overlap of resource reservation and resource count.
For different resource types there could be some delay between incrementing of the resource count and clearing of the earlier done reservation. This may result in failures when there are parallel deployments happening.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-07-21 10:55:51 +05:30
Abhishek Kumar
729e6d1446
userdata: fix append scenarios (#7741)
Fixes case of appending userdata when both template and vm data are either shellscript or cloudconfig
Fixes error when appending gzip userdata
Fixes case when userdata manual text from VM is not getting decoded-encoded correctly.
Fixes case of appending multipart data when both template and vm data contain same format types.
Refactor - moved validateUserData method to UserDataManager class
Refactor userdata test to check resultant multipart userdata thoroughly

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-07-19 15:18:53 +05:30
Daan Hoogland
6bb95c0200 Merge release branch 4.18 to main
* 4.18:
  Storage and volumes statistics tasks for StorPool primary storage (#7404)
  proper storage construction (#6797)
  guarantee MAC uniqueness (#7634)
  server: allow migration of all VMs with local storage on KVM (#7656)
  Add L2 networks to Zones with SG (#7719)
2023-07-19 10:59:19 +02:00
dahn
73a269e3b3
guarantee MAC uniqueness (#7634)
Co-authored-by: Bryan Lima <42067040+BryanMLima@users.noreply.github.com>
2023-07-19 10:25:01 +02:00
Ben
981d74825a
Add L2 networks to Zones with SG (#7719) 2023-07-11 09:11:23 +02:00
Nicolas Vazquez
b1fc279872
Generate cloud-init multipart user data for template append policy (#7643)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-07-10 09:47:03 +02:00
Vishesh
594c70dde0
Sync precommit config from main (#7732)
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
Co-authored-by: dahn <daan@onecht.net>
2023-07-07 11:18:16 +02:00
Daan Hoogland
fbb9dec6e5 Merge release branch 4.18 to main
* 4.18:
  server: do not check zone imagestores for directdownload template delete (#7607)
  UI: Zone wizard fix (#7588)
2023-07-04 10:17:43 +02:00
dahn
1275db4081
UI: Zone wizard fix (#7588)
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-07-03 11:56:52 +02:00
Rohit Yadav
3b054b2665 Merge remote-tracking branch 'origin/4.18' 2023-07-03 13:17:25 +05:30
Vishesh
2fcbe6241f
cks: Add unmanaged kubernetes cluster (#7515)
There are tools like cluster-api which create and manage kubernetes cluster on CloudStack. This PR adds the option to add unmanaged kubernetes cluster which are not managed by CKS plugin. This helps provide a consolidated view of unmanaged clusters on CloudStack. The changes done make sure that operations for managed clusters are not executed for unmanaged clusters.

Two new APIs have also been added:

1. addVirtualMachinesToKubernetesCluster - to add VMs to unmanaged clusters.
2. removeVirtualMachinesFromKubernetesCluster - to remove VMs to unmanaged clusters.

Two APIs have been updated:

1. createKubernetesCluster - made KUBERNETES_VERSION_ID, SERVICE_OFFERING_ID, SIZE as not required for unmanaged clusters. Add an additional parameter, managed, which is true by default.
2. listKubernetesClusters - Add a parameter managed to filter on managed field.

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-07-03 13:07:33 +05:30
Abhishek Kumar
de6ce503dc
api: correct error on resize volume resource allocation failure (#7687)
This PR resource throws exception with the correct error code and logs the error message when a resource allocation failure is encountered during resize volume operation.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-07-03 12:57:14 +05:30
Daniel Augusto Veronezi Salvador
c6237c48ac
Retrieve only resource count on user dashboard (#7617)
* Allow retrieving only the count of resources on APIs listPublicIpAddresses, listNetworks, listVirtualMachines and listVolumes

* Use parameter to retrieve only the count of resources in the dashboard

* Create abstract class
2023-06-30 11:09:55 -03:00
Wei Zhou
41403c9cf9 Merge remote-tracking branch 'apache/4.18' 2023-06-27 11:52:37 +02:00
dahn
06caf32bc8
Guest os mappings improvements (#6979)
* Guest OS mapping improvements
- Checks the OS mapping name in hypervisor (VMware, XenServer)
- Displays guest OS mappings in UI

* Added API getHypervisorGuestOsNames to list the guest OS names in the hypervisor, and code improvements

* Some static analysis fixes

* Removed commented code in listview

* Guest OS list

* UI changes for adding guest os and mappings

* Added guest os mappings in guest os form

* Added new filter to guest os mapping

* Name and description changes

* VMWare Host and cluster MO unit tests

* CheckGuestOsMapping command and answer unit tests

* GetHypervisorGuestOsNames command and answer unit tests

* VmwareResource unitests

* GuestOsMapper unittests

* icon changes

* Addressed review comments

* Renaming fixes

* Removed comments

* marvin tests for guest os operations

* Added marvin tests for OS mappings

* Document links and UI improvements

* Added deduplication for the list guest OS API

* Fixed linter failure

* Few bug fixes and UI changes

* Few improvements

* Addressed code smells

* Fixed UI issues after rebase

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2023-06-27 13:49:20 +05:30
slavkap
faaf72b1a4
Volume encryption support for StorPool plug-in (#7539)
Supported Virtual machine operations:
- live migration of VM to another host
- virtual machine snapshots (group snapshot without memory)
- revert VM snapshot
- delete VM snapshot
Supported Volume operations:
- attach/detach volume
- live migrate volume between two StorPool primary storages
- volume snapshot
- delete snapshot
- revert snapshot
2023-06-26 11:24:51 +02:00
Vishesh
fa3f2a75eb
feature: VM Scheduler (#7397)
This PR adds a feature to setup schedules to stop/start/restart your VMs.

Documentation PR: apache/cloudstack-documentation#313
Related issue: #3387
2023-06-26 13:36:46 +05:30
Abhishek Kumar
0466bf9d47
server,api,ui: host auto-select for migrateVirtualMachineWithVolume (#7554)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-06-22 14:53:51 +02:00
Wei Zhou
09a4a252d7 Merge remote-tracking branch 'apache/4.18' into HEAD 2023-06-21 15:08:56 +02:00
dahn
fb29608f61
consider last host only for root-admin (#7597) 2023-06-14 09:35:55 +02:00
dahn
ae10263b3b
Possibility to choose the source NAT IP address on a isolated network or VPC (#6442)
Co-authored-by: NuxRo <nux@li.nux.ro>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2023-06-09 14:51:53 +02:00
Abhishek Kumar
41e8ad7487
api,server,ui: vr,systemvm in public ip response (#7403)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2023-06-08 15:05:59 +02:00
Abhishek Kumar
f905f5f39a Merge remote-tracking branch 'apache/4.18' into main 2023-06-01 16:50:24 +05:30
Abhishek Kumar
7319debc87
cks: k8s cluster on vpc tier (#7479)
* cks: cluster on vpc tier

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

* fix

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

* wip

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

* fix

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

* refactor

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

* changes

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

* fix test

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

* fix test

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

* fix test

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

* fix

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

* python fix

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

* fix trailing space

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

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-06-01 15:29:06 +05:30
Abhishek Kumar
17e765e6bc
test: reduce PowerMock usage for code coverage (#7452)
JaCoCo used for code coverage calculation in the project doesn't support PowerMockito classes.
This PR attemps to reduce usage of PowerMockito.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-30 11:43:01 +02:00
John Bampton
11d45654a6
misc: fix spelling (#7206)
This PR fixes spellings
2023-05-23 11:06:16 +05:30
Rohit Yadav
62fa45aa81 Merge remote-tracking branch 'origin/4.18' 2023-05-11 23:40:53 +05:30
Abhishek Kumar
a0eb0aa5f7
api,server: fix VM.CREATE events on vm deploy without start (#7421)
Fixes #6697

Allows the server to generate started and completed events for VM.CREATE event type when VM is deployed with startvm=false.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-05-11 23:23:00 +05:30
Wei Zhou
9d46df57f2
kvm: add vm setting for nic multiqueue number and packed virtqueues (#7333)
This PR adds two vm setting for user vms on KVM

- nic multiqueue number
- packed virtqueues enabled . optional are true and false (false by default). It requires qemu>=4.2.0 and libvirt >=6.3.0

Tested ok on ubuntu 22 and rocky 8.4
2023-05-09 15:19:26 +05:30
Rohit Yadav
a2561df25b Merge remote-tracking branch 'origin/4.18' 2023-05-08 12:57:38 +05:30
kiranchavala
ad21e86342
addAnnotation: added the various entity type supported by the api call (#7478)
This PR adds documentation to the addAnnotation api call

https://cloudstack.apache.org/api/apidocs-4.18/apis/addAnnotation.html

Co-authored-by: Kiran Chavala <kiranchavala@Kirans-MacBook-Air.local>
2023-05-08 12:19:38 +05:30
Harikrishna
b280370a98
Few UI fixes and details improvements (#7434)
* Better hover label and message for generate API/secret keys form

* Added a message to select network during instance deployment

* Removed project icon in dashboard listing

* Disable network operations for the user who does not have permission

* UI allignments

* added document help for sticky policy secion under load balancer

* Added tooltips and some form layout changes

* donot display options to configure when stickypolicy is none

* Network selection message allignment

* Fixed the grid view to be uniform in infra summary page
2023-05-02 17:06:54 +05:30
GaOrtiga
8b5bfb145e
create parameter to determine whether roles are public or private (#6960)
Co-authored-by: Gabriel Ortiga Fernandes <gabriel.fernandes@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-05-01 15:26:10 +02:00
Rahul Agarwal
0ed4950896
server: allow updating project name (#7149)
This PR adds name in updateProject API to allow renaming 'name' field with description from both API and UI level.

Fixes: #7107

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rahul Agarwal <rahul.agarwal@shapeblue.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-04-25 15:29:13 +05:30
kishankavala
2ac1b7e959
ui: Fix Management server comments PR 7379 UI issue (#7450)
This PR adds support for annotations to be added for the management server as a resource/type.
2023-04-20 15:53:11 +05:30
Abhishek Kumar
e035d73641 Merge remote-tracking branch 'apache/4.18' into main 2023-04-19 12:57:01 +05:30
Vishesh
79eae89a87
ui: Add filtering by state in account, systemvms, router and storagepool (#7368)
This PR allows admin to filter resources by state for systemvms, router & storagepool. This is part of #7366 .

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2023-04-19 12:22:24 +05:30
kishankavala
69be0af32d
Allow admin/users to add comments to Management Servers (#7379)
* UI changes for management server comments

* Added support for mgmt server comments in annotations framework

* Added test for mgmt server annotation

* changed annotation to be unique for mgmt server test
2023-04-18 14:16:55 +05:30
Rohit Yadav
8a42ab9ce4 Merge remote-tracking branch 'origin/4.18' 2023-04-14 21:49:12 +05:30
David Jumani
941cc83372
Feature: Safely shutdown cloudstack (#6755)
Co-authored-by: dahn <daan.hoogland@gmail.com>
2023-04-12 12:44:14 +02:00
Abhishek Kumar
62b332e0de
api, ui: listing archived events (#7396)
Fixes #7217

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2023-04-11 22:26:41 +05:30
Harikrishna
65512af779
server: Roles search by keyword (#7384)
This PR fixes #7362 and also other search criteria to use the name as an exact search where keyword is also there.

Made UI changes for roles search to make use of keyword instead of name.
2023-04-11 22:24:29 +05:30
Rahul Agarwal
723ace8b78
Make DisplayText Non-Mandatory for Various Forms. (#7180)
Co-authored-by: Rahul Agarwal <rahul.agarwal@shapeblue.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
2023-04-05 16:41:16 +02:00
Nicolas Vazquez
be66eb2a35
Auto Enable/Disable KVM hosts (#7170)
* Auto Enable Disable KVM hosts

* Improve health check result

* Fix corner cases

* Script path refactor

* Fix sonar cloud reports

* Fix last code smells

* Add marvin tests

* Fix new line on agent.properties to prevent host add failures

* Send alert on auto-enable-disable and add annotations when the setting is enabled

* Address reviews

* Add a reason for enabling or disabling a host when the automatic feature is enabled

* Fix comment on the marvin test description

* Fix for disabling the feature if the admin has manually updated the host resource state before any health check result
2023-04-04 17:03:37 +05:30
Abhishek Kumar
82a6a1f6c4 Merge remote-tracking branch 'apache/4.18' into main 2023-04-04 16:10:12 +05:30
Sina Kashipazha
4116323de3
Updated wrong doc parameters in UserVmService. (#7321)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Stephan Krug <stekrug@icloud.com>
2023-04-04 09:13:24 +02:00
Harikrishna
ec3698dfbe
Added details about account/domain to which network will be assigned during creation (#7387) 2023-04-04 08:50:16 +02:00
SadiJr
1e253401b0
[Veeam] Block operations in restoring VMs (#7238)
Co-authored-by: SadiJr <sadi@scclouds.com.br>
2023-04-04 08:49:21 +02:00
Daan Hoogland
c2cffcc5a9 Merge release branch 4.18 to main
* 4.18:
  Fixed avoid set variables which is causing deployment failures (#7372)
  Add service ip to listManagementServers API response (#7374)
  UI: fix default network is not passed to deployvm API (#7367)
  ui: Added UEFI support flag in host details view (#7361)
  removed vulnerable workflow
2023-03-29 17:39:28 +02:00