34820 Commits

Author SHA1 Message Date
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
Abhishek Kumar
af58284560
server,config: respect storage.max.volume.size and make it dynamic (#5857)
* server,config: respect storage.max.volume.size and make it dynamic

Fixes #5830

* fix test

* size change

* fix check

* server: donot include ISO size while checking volume sizes

* revert size check

* refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-08 13:29:35 +05:30
PJ Fanning
eeaad0bfe7
[issue-5939] upgrade commons-compress to 1.21 (#5942) 2022-02-08 12:47:58 +05:30
jairov4
6c9f0c1f3f
Fix #3448 quota calculation for monthly tariffs (#5517)
* Fix quota calculation for monthly tariffs

* Remove unused parameter
2022-02-07 13:34:37 +01:00
Abhishek Kumar
81b49b835a
ui: fix select networks for template nic (#5933)
* ui: fix select networks for template nic

Fixes #5927

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-07 16:30:40 +05:30
PJ Fanning
5db6b86200
[issue-5946] upgrade to xstream 1.4.19 (#5947) 2022-02-07 12:05:42 +05:30
PJ Fanning
5adf608f80
mvn: upgrade to xerces 2.12.2 (#5944)
Fixes: #5943
2022-02-07 11:41:33 +05:30
Gabriel Beims Bräscher
2c11171517
Fix 'endpointe.url' global settings configuration typo (#5832)
* Update 'endpointe.url' global settings to 'endpoint.url'

* Add PR number on 'schema-41610to41700.sql'

* Use ApiServiceConfiguration.ApiServletPath.key() instead of "hardcoded" string
2022-02-06 12:11:45 -03:00
Daman Arora
649be0d8c7
simplify code using optional chaining in multiple views (#5630)
* simplify code using optional chaining in multiple views

* Undo simplify chaining in CreateL2NetworkForm
2022-02-06 10:09:41 -03:00
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
Abhishek Kumar
966b32c234
ui: fix ssh keypair navigation (#5931)
Fixes #5930

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-04 18:29:47 +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
Wei Zhou
ecf85aa65b
VMware7 support: Add schema changes for update2 and update3 (#5870)
* VMware7 u2 support: Add schema changes

* VMware7-u3: Add schema changes for 7.0.3.0
2022-02-04 12:34:05 +01:00
dahn
ef7debb487
Filter usage for project (#5866)
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: José Flauzino <jose.wilson.vf@gmail.com>
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:45:32 +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
Abhishek Kumar
f458964e52
ui: fix related key for section (#5929)
Fixes #5928

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-04 10:27:01 +05:30
Wei Zhou
194bf6ead9 Merge remote-tracking branch 'apache/4.16' 2022-02-03 20:42:34 +01:00
Wei Zhou
4a1ebb3fa5
server: allow normal users to create isolated network without source nat (#5920) 2022-02-03 16:44:11 +05:30
Abhishek Kumar
638779ca37
vm-import: fix unmanaged instance listing (#5400)
* vm-import: fix unmanaged instance listing

When the host and last host ID is not set for the VM, it may appear in the list of unmanaged instances.
This changes fixes the behaviour by filtering unmanaged instances list for host for following three criteria:
- host is set as host_id for the VM
- host is set as the last_host_id for the VM
- pod of the host is set as the pod_id for the VM and both host_id and last_host_id is NULL

* use SearchBuilder to fix query condition

* add paranthesis

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-03 10:27:05 +05:30
Abhishek Kumar
62b806ac13
api,server: add params for updatehypervisorcapabilities API (#5473)
* api,server: add params for updatehypervisorcapabilities API

Allows updating following capabilities for a hypervisor, version:
- Max DATA volumes limit
- Storage motion supported
- Max hosts per cluster
- VM snapshot enabled

* added test

* changes

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

* Update test/integration/smoke/test_hypervisor_capabilities.py

Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-02-03 10:21:23 +05:30
Suresh Kumar Anaparti
bf70566c2c
Merge branch '4.16' into main 2022-02-02 17:30:21 +05:30
Abhishek Kumar
8adb8df2fe
server: find suitable disk offering for volume upload (#5852)
* server: find suitable disk offering for volume upload

Fixes #5696

* fix npe check

* fixes, refactor, rename method and handle custom iops

* ui: allow offering selection

* list only disk offerings

* show name

* revert error check

* use checkaccess

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-02 16:35:47 +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
sureshanaparti
1b3e7f65b7
Update proper destroy status when SSVM is destroyed. (#5908) 2022-02-02 10:02:00 +05:30
Paula Oliveira
a6567f3cc5
Fix internet dependent test from 'UriUtilsParametrizedTest' class (#5905)
Co-authored-by: Paula Zomignani Oliveira <paula@scclouds.com.br>
2022-01-31 11:02:48 -03:00
dahn
fde34df560
Make sure other than user VMs can have multiple NICs in a network (#5896)
* only check user VMs

* Update engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2022-01-31 19:05:27 +05:30
dahn
c1bba2a308
Do not restart VPC tiers with cleanup (#5873)
* do not restart VPC tiers with cleanup

* no option for cleanup for VPC tiers

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

* paramNames

* remove superfluent parameter

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-01-31 17:59:26 +05:30
Abhishek Kumar
5f07e4daaf
ui: fix filtering readonly details while VM update (#5887)
* ui: fix filtering readonly details while VM update

* refactor

* error on add

Fixes #5724

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-01-31 17:19:31 +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
571339f872
Merge branch '4.16' into main 2022-01-31 00:10:03 +05:30
Nicolas Vazquez
1fc7d70da2
Add idempotent primary keys on tables missing them (#5785)
* In progress primary keys

* Refactor in progress to idempotent way

* Finish SQL changes

* Add java code to match new columns

* Fix imports

* Fix tests

* Remove comments

* Fix index name on vmsnapshot

* Fix parse from correct column on usage storage

* Fix parser columns

* Fix NPE

* Fix NPE for the rest of the occurrences

* Further fix for similar issue
2022-01-30 23:31:07 +05:30
Suresh Kumar Anaparti
f610e89ea9
Merge branch '4.16' into main 2022-01-28 13:43:00 +05:30
sureshanaparti
0e150954d0
Allow direct download templates from IPv6 host address. (#5900)
* Allow templates & ISOs from IPv6 host address.

* fix checkstyle issue

* Allow only direct download templates from IPv6 address

Co-authored-by: gabriel <gabriel@apache.org>
2022-01-28 09:50:32 +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
Daman Arora
b9905c7e37
simplify code using object shorthand in multiple views (#5899) 2022-01-27 12:27:18 +05:30
Hoang Nguyen
ee9c05b5fa
UI - Added option to allow users to select volumes when doing destroy the list of VMs (#5893)
* added option to allow users to select volumes when doing destroy list of VMs

* fixes
2022-01-27 11:09:48 +05:30
Hoang Nguyen
065847e6af
UI: Fixes asynchronous when destroying wrong item VM (#5884)
* fix asynchronous error when deleting VMs one by one

* fixes error open modal
2022-01-27 11:05:35 +05:30
Rohit Yadav
28f6067f3c
packaging: use modern systemctl enable/disable (#5881)
This fixes spec files to use systemctl enable|disable instead of on|off.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-01-27 09:53:16 +05:30
Daniel Augusto Veronezi Salvador
d26ce157db
Fix camel case (#5898)
Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-01-26 19:20:18 -03:00
Suresh Kumar Anaparti
982eef202f
Merge branch '4.16' into main 2022-01-26 12:21:24 +05:30
Nicolas Vazquez
84f5768e64
[VMware][Deploy-as-is] OVF properties not importing when template is uploaded from local (#5861)
* Fix ova upload missing details

* Refactor and cleanup

* Unused import
2022-01-26 11:28:52 +05:30
Nicolas Vazquez
1ed0830bc4
[Vmware][Deploy-as-is] Refactor the OVF parsing (#5825)
* Add the list of supported namespaces per document and refactor the disks extraction by using the namespaces

* Refactor matching the default OVF schema

* Move parser methods to a new class and refactor

* Fix import, unit tests

* Reduce indentation

* Address review comments
2022-01-26 11:24:40 +05:30
Abhishek Kumar
d18ef1c0fd
ui: add custom form for update template (#5434)
* ui: add custom form for update template

* label fix

* changes and fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-01-25 10:47:41 +05:30
sureshanaparti
06b5e84182
Removed redundant parsing of VMSnapshot usage record. (#5872) 2022-01-24 18:06:02 +01:00
Abhishek Kumar
68a5e5aa77
ui: show password with success notification (#5889)
Fixes #5888

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-01-24 17:05:07 +05:30
Suresh Kumar Anaparti
97d6cd50a0
Merge branch '4.16' into main 2022-01-21 19:59:35 +05:30
DK101010
f639f56834
fill volume attached field (#5865)
Co-authored-by: DK101010 <dirk.klahre@itelligence.de>
2022-01-20 19:24:26 +05:30