2665 Commits

Author SHA1 Message Date
Nicolas Vazquez
2f2d6cbe38
KVM: Enhance CPU speed detection on hosts (#6175)
* KVM: Enhance CPU speed detection on hosts

* Update agent/conf/agent.properties

Co-authored-by: dahn <daan.hoogland@gmail.com>

Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-04-01 12:12:34 -03:00
Wei Zhou
944b6037cc Merge remote-tracking branch 'apache/4.16' 2022-03-29 10:43:59 +02:00
Nicolas Vazquez
a69ab3b28f
Ensure configdrive path is edited properly during live migration (#6173) 2022-03-29 10:09:08 +02:00
John Bampton
182899d0b5
Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687)
* refactor: remove trailing whitespace from Python files

* Add the GitHub Super-Linter

Add Python flake8 linting for W291 trailing whitespace

* Add licenses
2022-03-28 11:40:26 -03:00
Wei Zhou
5845de4004
kvm: support multiple local storage pools (#6147)
* kvm: support multiple local storage pools

* Update #6147: add method configureLocalStorage

* Update #6147: add method validateLocalStorageUUID

* Update #6147: remove underscore

* Update #6147: add unit tests
2022-03-25 11:40:30 -03:00
Bryan Lima
afdc73f911
Update VM priority (cpu_shares) when live scaling it (#6031)
* Update VM priority (cpu_chares) when live scaling it

* Apply suggestions from code review

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

* Addressing javadoc review

* Addressing review typo

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-03-14 11:34:10 -03:00
JoaoJandre
5f07ddaca9
Refactor account type (#6048)
* Refactor account type

* Added license.

* Address reviews

* Address review.

Co-authored-by: João Paraquetti <joao@scclouds.com.br>
Co-authored-by: Joao <JoaoJandre@gitlab.com>
2022-03-09 11:14:19 -03:00
John Bampton
6401c850b7
Fix spelling (#6064)
* Fix spelling

- `interupted` to `interrupted`
- `paramter` to `parameter`

* Fix more typos
2022-03-08 13:02:35 -03:00
dahn
b014617416
no axis (#5993)
* no axis

* remove f5 from ui

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-03-07 22:46:29 -03:00
Rohit Yadav
2f6fc56e74
maven: Fix build on osx (#6056)
kvm: don't read /proc/meminfo on non-Linux environments as part of constructor

Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
2022-03-07 14:55:42 +05:30
John Bampton
980c0bff03
Fix spelling (#6041)
Changed `occured` to `occurred`
2022-03-03 13:10:14 -03:00
Suresh Kumar Anaparti
bc70535ee5
Updating pom.xml version numbers for release 4.16.2.0-SNAPSHOT
Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2022-03-03 18:15:33 +05:30
Suresh Kumar Anaparti
cad9332082
Updating pom.xml version numbers for release 4.16.1.0
Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2022-02-25 19:01:16 +05:30
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
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
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
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
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
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
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
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
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
Rohit Yadav
9c9de74966 Merge remote-tracking branch 'origin/4.16' 2021-11-24 17:56:14 +05:30
DH Park
a85a00bed9
kvm: Fixes UEFI XML Definition Error (#5692)
UEFI bootMode 추가
2021-11-23 16:44:32 +05:30
Daniel Augusto Veronezi Salvador
b4aabadc4d
Replace string libraries with org.apache.commons.lang3.StringUtils (#5386)
* Replace google lib for lang3 and adjust methods calls

* Replace string libs by lang3

* Prohibit others string libs

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2021-11-18 13:41:48 +05:30
nicolas
3f79436840
Updating pom.xml version numbers for release 4.17.0.0-SNAPSHOT
Signed-off-by: nicolas <nicovazquez90@gmail.com>
2021-11-09 22:55:52 -03:00
nicolas
93c3c3b9ac
Updating pom.xml version numbers for release 4.16.1.0-SNAPSHOT
Signed-off-by: nicolas <nicovazquez90@gmail.com>
2021-11-09 22:50:22 -03:00