4037 Commits

Author SHA1 Message Date
John Bampton
980c0bff03
Fix spelling (#6041)
Changed `occured` to `occurred`
2022-03-03 13:10:14 -03:00
David Jumani
85c59979f7
Multiple SSH Keys support (#5965)
* keypairs added in api-constants

* names parameter added

* findbynames method added in dao

* change in impl to find and reset multiple keys

* findbynames method implemented

* log the publickeys, check the ssh keys given exists or not

* new ArrayList<>

* SQL IN toArray

* keypair

* null pointer exception solved with + concatanation

* null pointer exception solved with + concatanation

* error resolved

* keypair name to names in uservmresponse

* keypair name is set in the uservmresponse, from the details

* null checks are removed, keypairnames are stored in a string, sent to the resetvmsshinternal, and added in details

* commit first eval

* deploy vm takes multiple ssh-keys

* Deploy VM UI changed to accept multiple ssh keys

* Reset SSH UI API changed

* ResetSSH.vue

* ssh keys joined, ssh added in infocard

* changes made

* schema error resolved

* potential null pointer exception removed

* Update UserVmManagerImpl.java

unnecessary check removed.

* Update DeployVMCmd.java

* Update DeployVMCmd.java

* Update ResetVMSSHKeyCmd.java

* Update UserVmJoinDaoImpl.java

* .

* arraylist

* Update DeployVMCmd.java

* Update UserVmManagerImpl.java

* Update ResetVMSSHKeyCmd.java

* Update db

* Fix list vm by keypair

* ui fixes

* Fix typos

* ui fixes

* Cleanup

* Adding deprecated and since in api params

* Adding upgrade for existing vms with ssh keys

* Handle no key for cks

* Show existing keyparis in reset ssh key form

* get keys from the right account

Co-authored-by: bicrxm <bickrombishsass@gmail.com>
2022-03-01 21:30:55 -03:00
Suresh Kumar Anaparti
1484f5a418
Merge branch '4.16' into main 2022-02-23 22:42:10 +05:30
Suresh Kumar Anaparti
027e6030af
[KVM] Disconnect the volumes with the proper storage adaptor. (#6029)
* [KVM] Disconnect the volumes with the proper storage adaptor.

* Improved / Added logs
2022-02-23 22:40:14 +05:30
Wei Zhou
5d1e54a4ab
server: fix host anti-affinity when start batch vms (#6002) 2022-02-21 09:54:03 +01:00
Pearl Dsilva
550c810538
[VMware] Support for removal of NIC on IP disassociation on the VR (#5985)
* [VMware] Support for removal of NIC on IP disassociation on the VR

* address comments - extract code + add appropriate operation name in logs

* Do not remove/unplug nic on removal of static nat on last IP (Public NIC)

* address comments

* address comment
2022-02-17 22:44:03 -03:00
Suresh Kumar Anaparti
d4f40ecc6a
Fixed strings import issue (#5998)
* Fixed strings import issue in KubernetesClusterResourceModifierActionWorker

* Use isNoneEmpty
2022-02-15 13:32:41 -03:00
Suresh Kumar Anaparti
b50542a11c
Merge branch '4.16' into main 2022-02-15 19:26:04 +05:30
Pearl Dsilva
e0a5df50ce
CKS Enhancements and SystemVM template upgrade improvements (#5863)
* This PR/commit comprises of the following:
- Support to fallback on the older systemVM template in case of no change in template across ACS versions
- Update core user to cloud in CKS
- Display details of accessing CKS nodes in the UI - K8s Access tab
- Update systemvm template from debian 11 to debian 11.2
- Update letsencrypt cert
- Remove docker dependency as from ACS 4.16 onward k8s has deprecated support for docker - use containerd as container runtime

* support for private registry - containerd

* Enable updating template type (only) for system owned templates via UI

* edit indents

* Address comments and move cmd from patch file to cloud-init runcmd

* temporary change

* update k8s test to use k8s version 1.21.5 (instead of 1.21.3 - due to https://github.com/kubernetes/kubernetes/pull/104530)

* support for private registry - containerd

* Enable updating template type (only) for system owned templates via UI

* smooth upgrade of cks clusters

* update pom file with temp download.cloudstack.org testing links

* fix pom

* add cgroup config for containerd

* add systemd config for kubelet

* add additional info during image registry config

* update to official links
2022-02-15 18:27:14 +05:30
Pearl Dsilva
9f23fbe7b6
[Simulator] Fix NPE in SolidFireHostListener (#5955)
* [Simulator] Fix NPE in SolidFireHostListener

* address comments

* Update plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/provider/SolidFireSharedHostListener.java

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-12 08:32:19 -03:00
Suresh Kumar Anaparti
212a4dedfc
Merge branch '4.16' into main 2022-02-10 20:56:52 +05:30
Nicolas Vazquez
a3bb84b495
[VMware] Update SCSI controllers for VMs (#5910) 2022-02-10 14:36:34 +01:00
nvazquez
e9d8d7942d
Merge branch '4.16' 2022-02-10 09:48:49 -03:00
dahn
a6d9fa61b9
Role escalation prevention (#5879)
* prevent role access escallation

* hierarchy issue fixed

* create api list in account manager for checking new account access

* full api list check

* strange role restriction removed for BareMetal

* add role check on upfdate account as well

* more selective use of api checkers

* error msg and var name

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-02-10 11:50:27 +05:30
Suresh Kumar Anaparti
850714c1fc
Merge branch '4.16' into main 2022-02-10 10:57:29 +05:30
dahn
143b72d67e
cleanup: Network Throttling for Additional Networks code in DirectVifDriver.java (#5875) 2022-02-09 10:19:47 +01:00
PJ Fanning
c7885f55eb
maven: upgrade bouncycastle due to cve (#5949)
Fixes: #5948
2022-02-09 00:22:28 +05:30
Suresh Kumar Anaparti
208ae84dd7
Merge branch '4.16' into main 2022-02-08 19:01:34 +05:30
Rohit Yadav
da56a2a806
maven: migrate short-term to reload4j v1.2.18 (#5878)
* maven: migrate short-term to reload4j v1.2.18

This migrate to log4j 1.x fork, reload4j 1.2.18.0 which is drop-in
replacement and addresses some immediate CVE and issues.

* log4j migration to reload4j in pom xmls

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Exclude log4j from transitive dependencies (#73)

Co-authored-by: Marcus Sorensen <shadowsor@gmail.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-02-08 15:00:38 +05:30
dahn
0f1cd6009d
add logging to deployment planners (#5859)
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-04 17:02:32 +01:00
Suresh Kumar Anaparti
e3f0e3b544
Merge branch '4.16' into main 2022-02-04 19:04:08 +05:30
Harikrishna
56a8852c4c
Remove code that reserves extra interfaces based on the global setting router.extra.public.nics in case of VMware. (#5912)
Added hot plugging of vifs whenever required in case of isolated networks. VPC networks already uses hotplugging of vifs.
2022-02-04 12:41:56 +01:00
davidjumani
26e4e18218
kvm: Use lscpu to get cpu max speed (#5506)
* kvm: Use lscpu to get cpu max speed

* Fix str conversion

* Reorder

* Refactor

* Apply suggestions from code review

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

* Updated the calling method name getCpuSpeedFromCommandLscpu

* Make it more readable

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-04 11:37:14 +01:00
Suresh Kumar Anaparti
bf70566c2c
Merge branch '4.16' into main 2022-02-02 17:30:21 +05:30
Nicolas Vazquez
ddd311c695
[XenServer/XCP-ng] Sync the 'platform' setting according to the 'cpu.corespersocket' setting (#5892)
* Update platform setting if cpu.corespersocket is set

* Refactor conditions

* Allow empty map but not null
2022-02-02 12:21:47 +05:30
Nicolas Vazquez
3e92a63155
[XenServer/XCP-ng] Pass the image store NFS version on storage commands (#5886)
* Add NFS version to mount command

* Remove extra line

* Extend NFS version to mount secondary storage

* Unused import

* Refactor NFS version to be granular

* Make use of the ConfigKey on the NFS version setting value
2022-01-31 12:21:13 +05:30
Suresh Kumar Anaparti
f610e89ea9
Merge branch '4.16' into main 2022-01-28 13:43:00 +05:30
davidjumani
6fa8538666
Adding placeholders for custom NSP vues (#5620)
* Adding placeholders for custom NSP vues

* Fix decorator

* Fixing gslbproviderprivateip description
2022-01-27 20:11:35 +05:30
Harikrishna
f15cab16da
server: Decouple service (compute) offering and disk offering (#5008)
Currently, our compute offerings and disk offerings are tightly coupled with respect to many aspects. For example, if a compute offering is created, a corresponding disk offering entry is also created with the same ID as the reference. Also creating compute offering takes few disk-related parameters which anyway goes to the corresponding disk offering only. I think this design was initially made to address compute offering for the root volume created from a template. Also changing the offering of a volume is tightly coupled with storage tags and has to be done in different APIs either migrateVolume or resizeVolume. Changing of disk offering should be seamless and should consider new storage tags, new size and place the volume in appropriate state as defined in disk offering.

more details are mentioned here https://cwiki.apache.org/confluence/display/CLOUDSTACK/Compute+offering+and+disk+offering+refactoring

* Schema changes and disk offering column change from "type" to "compute_only"

* Few more changes

* Decoupled service offering and disk offering

* Remove diskofferingid from vminstance VO

* Decouple service offering and disk offering states

* diskoffering getsize() is only for strict disk offerings

* Fix deployVM flow

* Added new API params to compute offering creation

* Add diskofferingstrictness to serviceoffering vo under quota

* Added overrideDiskOfferingId parameter in deploy VM API which will override disk offering for the root disk both in template and ISO case

Added diskSizeStrictness parameter in create Disk offering API which will decide whether to restrict resize or disk offering change of a volume

* Fix User vm response to show proper service offering and disk offerings

* Added disk size strictness in disk offering response

* Added disk offering strictness to the service offering response

* Remove comments

* Added UI changes for Disk offering strictness in add compute offering form and Disk size strictness in add disk offering form

* Added diskoffering details to the service offering response

* Added UI changes in deployvm wizard to accept override disk offering id

* Fix delete compute offering

* Fix VM deployment from custom service offering

* Move uselocalstorage column access from service offering to disk offering

* UI: Separated compute and disk releated parameters in add compute offering wizard, also added association to disk offering

* Fixed diskoffering automatic selection on add compute offering wizard

* UI: move compute only toggle button outside the box in add compute offering wizard

* Added volumeId parameter to listDiskOfferings API and the disksizestrictness flag of the current disk offering is honored while list disk offerings

* Added configuration parameter to decide whether to check volume tags on the destination storagepool during migration

* Added disk offering change checks during resize volume operation

* Added new API changeofferingforVolume API and corresponding changes

* Add UI form for changeOfferingForVolume API

* Fix UI conflicts

* Fix service offering usage as disk offering

* Fix unit test failures

* fix user_vm_view

* Addressed review comments

* Fixed service_offering_view

* Fix service offering edit flow

* Fix service offering constructor to address custom offering

* Fix domain_router_view to get proper service offering id

* Removed unused import

* Addressed review comments and fixed update service offering flow with storage tags

* Added marvin test cases for checking disk offering strictness

* review comments addressed

* Remove system_use column from disk offering join

* update volume_view to update system_use column from service offering and not disk offering

* Fix changeOfferingForVolume API for custom disk offering

* Fix global setting implementation

* Fix list volumes, after changing system_use column from disk offering to service offering in volume_view

* Changes for override root disk offering in deployvm wizard in case of custom offering

* Fix a unit test case

* Fixed recent unit test cases with new serviceofferingvo constructor

* Fix unit test in VolumeApiServiceImpl

* Added storage id for the list disk offering API and corresponding UI changes in migrateVolume and changeOfferingForVolume flow

* Rename global configuration parameter from storage.pool.tags.disk.offering.strictness to match.storage.pool.tags.with.disk.offering

* Fix smoke test failures

* Added tool tip for migrate volume UI form

* Address review comments and fix UI form of deploy VM in case of ISO.

* Fixed resize volume UI form for data disk

* UI changes to disable override root disk size when override root disk offering is enabled

* UI fix in deploy vm wizard

* Fix listdiskoffering after rebasing with main

* Fixed UI in migrate and changeofferingfor volume to handle empty disk offering list
Removed the volume's current disk offering from listDiskOffering response list

* Added custom Iops to resize volume form and removed the current disk offering during change offering for volume UI form

* Fix false response on updateDiskOffering API

* Added search field for changeofferingforvolume UI form

* Fix resize volume and migrate volume to update volume path if DRS is applied on volume in datastore cluster

* Removed DB changes from 4.16 upgrade file

* Resolving merge conflicts with main 4.17

* Added support for auto migration and auto resize of the root volume upon changing the service offering for VM.

* UI: Added automigrate checkbox in scale VM form

* Addes since attributes to new API params

* Added shrinkOK parameter to changeofferingforvolume API

* Added shrinkOk param to UI in changeOfferingforVolume form

* Added shrinkOk flag to scaleVM and changeServiceForVirtualMachines and UI form

* Removed old foreign key constraint on IDs of service offering and disk offering

* Allow resize and automigrate of root volume if required in all cases of service offering change

* Allow only resize to higher disk size from UI

* Fixing vue syntax error

* Make UI changes to provide root disk size box when the linked disk offering is of custom

* Converted from check box to toggle in scale VM, changeoffering, resize and migrate volume forms

* Fix resize volume operation to update the VM settings

* Fix migratevolume form to pick selected storage pool id in list diskofferings API
2022-01-27 15:08:42 +05:30
Suresh Kumar Anaparti
e1b56be67c
Merge branch '4.16' into main 2022-01-11 12:46:33 +05:30
dahn
7ea2cbd889
Storage pool absent (#5841)
* simple null check

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-01-11 12:18:55 +05:30
SadiJr
5d7ea30f87
vmware: Remove restriction, in VMWare, to resize only SCSI disks (#5650)
Remove restriction, in VMWare, to resize only SCSI disks, because VMWare supports resize of subtypes of SCSI, like LSILOGIC, LSILOGIC SAS, etc

In VMWare, there are different types of SCSI controllers, such as BusLogic Parallel, LSI Logic Parallel, LSI Logic SAS, etc. All of these sub-types support the disk resize operation, the only exception is the IDE controller. However, in ACS, there is a logical restriction to allow only resizing of volumes of the specific SCSI type; thus, not allowing resizing of the SCSI sub-types. This PR corrects this behavior blocking the resize of volumes which uses IDE controller only.
More information can be found at:

https://www.starwindsoftware.com/blog/storage-controllers-in-vmware-vsphere
https://www.nakivo.com/blog/scsi-controller-and-other-vmware-controller-types/
https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vm_admin.doc/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html
https://communities.vmware.com/t5/ESXi-Discussions/Unable-to-increase-disk-Space/td-p/397823

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-01-08 09:02:00 +05:30
slavkap
48006de3e3
kvm: Set RAW format to RBD DATADISK (#5801)
While deploying a VM with data disk on Ceph the volume format was in
QCOW2.

Fixes #5531
2022-01-08 08:54:21 +05:30
SadiJr
e993a20e5a
[Veeam] Force ACS to use the template repository to clone job (#5774)
* [Veeam] Force ACS to use the repository of the template to clone job

* Address reviews

* Fix checkstyle

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-01-07 11:12:57 +05:30
Suresh Kumar Anaparti
30ae9eedad
Merge branch '4.16' into main 2022-01-05 10:14:47 +05:30
dahn
e06a66ba14
ldap: truststore per domain (#5816)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-01-03 21:01:51 +05:30
Rohit Yadav
c84198d76d Merge remote-tracking branch 'origin/4.16'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-12-30 16:52:30 +05:30
Marcus Sorensen
dcdcd09058
Randomize managed volume copy host (#5789)
* Randomize managed volume copy host

* Managed volume copy was always returning first host that could see storage pools

* Fix null value in logging for ScaleIOPrimaryDataStoreDriver due to if/else logic error

Signed-off-by: Marcus Sorensen <mls@apple.com>

* Use String.format for ScaleIO debug message

Signed-off-by: Marcus Sorensen <mls@apple.com>

* Update debug message for ScaleIO copy methods

Signed-off-by: Marcus Sorensen <mls@apple.com>

Co-authored-by: Marcus Sorensen <mls@apple.com>
2021-12-30 16:11:00 +05:30
Rohit Yadav
6728b696cd
kvm: don't always force scsi controller for aarch64 VMs (#5802)
* kvm: don't force scsi controller for aarch64 VMs

This would allow use of virtio disk controller with Ceph, etc or as
defined in the VM's root disk controller setting, rather than always
enforce SCSI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* remove test that doesn't apply now

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* address review comment

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-12-30 15:19:32 +05:30
SadiJr
01f1aaee60
Improve VMWare logs (#5353)
* Improve VMWare logs

* Address reviews

* Address reviews and add more logs

* Improve VMWare logs

* Address reviews

* Address reviews and add more logs

* Address reviews

* Address reviews

* Try fix tests

* Refactor some logs to try fix tests

* Verifying if GSON is the cause of test exceptions

* Fix checkstyle

Co-authored-by: SadiJr <17a0db2854@firemailbox.club>
Co-authored-by: SadiJr <sadi@scclouds.com.br>
2021-12-22 13:56:00 +01:00
Wei Zhou
51d4e5475f Merge remote-tracking branch 'apache/4.16' 2021-12-10 17:50:25 +01:00
SadiJr
9363f6490b
Fix full backup VM restore (#5680)
Co-authored-by: SadiJr <sadi@scclouds.com.br>
2021-12-10 07:16:42 +01:00
Abhishek Kumar
93f4ecab84
vmware: fix cpu reservation during vm scale (#5708)
Fixes #5706

Correctly set CPU reservation while scaling a dynamically scalable VM.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-12-07 09:47:00 +05:30
sureshanaparti
00c6ad2733
vmware: Perform volume file search in the VM directory on the datastore while computing the VM snapshot chain size. (#5735)
This PR improves the volume file search on the datastore while computing the VM snapshot chain size in VMware. The file search is now performed in the VM directory on the datastore, instead of all the directories on the datastore (which is leading to incorrect VM snapshot chain size computation when VM id has 6 digits).
2021-12-03 16:46:31 +05:30
Rohit Yadav
2e9c9417be Merge remote-tracking branch 'origin/4.16' 2021-12-03 15:41:56 +05:30
davidjumani
dfd75d7bc0
api: Fix wrong logger class in *Cmd.java (#5740)
This PR changes the incorrect class name used in the logger in ListHypervisorsCmd
2021-12-02 15:16:28 +05:30
Harikrishna
867ccf6f48
Merge pull request #5720 from shapeblue/remove-redundant-call-for-snapshot-chain-size
Removed redundant call for VM snapshot chain size, in VMware.
2021-12-02 10:08:28 +05:30
Suresh Kumar Anaparti
e3459b5c01 Removed redundant call for VM snapshot chain size, in VMware. 2021-11-26 11:19:13 +05:30
José Flauzino
6e04f8711b
Fix HostMetricsResponse unit test (#5713)
Co-authored-by: José Flauzino <jose@scclouds.com.br>
2021-11-25 10:42:31 -03:00
Rohit Yadav
9c9de74966 Merge remote-tracking branch 'origin/4.16' 2021-11-24 17:56:14 +05:30