3158 Commits

Author SHA1 Message Date
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
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
Wei Zhou
194bf6ead9 Merge remote-tracking branch 'apache/4.16' 2022-02-03 20:42:34 +01:00
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
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
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
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
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
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
Suresh Kumar Anaparti
0efdc535a5
Merge branch '4.16' into main 2022-01-18 12:44:55 +05:30
Nicolas Vazquez
e18ff602f8
Prevent upgrade failures if there are existing annotations permissions (#5846)
* Do not fail if there are existing role permissions for annotations
* Refactor
* Improve refactor
* Do not update if there are existing role permissions for annotations
* Fix exception on upgrade
* Remove extra space from suggestion
* Apply suggestions from code review

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-01-18 11:20:00 +05:30
Suresh Kumar Anaparti
42a941cc70
Merge branch '4.16' into main 2022-01-13 12:47:08 +05:30
Wei Zhou
216bea1978
ipv6: disable IPv6-only shared network with VR (#5810)
* ipv6: disable IPv6-only shared network with VR

* Update #5810: import org.apache.commons.lang3.StringUtils
* Update #5810: do not import org.apache.commons.lang3.StringUtils
* Update server/src/main/java/com/cloud/network/NetworkServiceImpl.java
* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-01-12 13:33:35 +05:30
Suresh Kumar Anaparti
e1b56be67c
Merge branch '4.16' into main 2022-01-11 12:46:33 +05:30
dahn
028d338aaa
remove VmWorkJob after adding a nic to a vm (#5658)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2022-01-10 16:31:50 +01:00
Suresh Kumar Anaparti
5c02f6d507
Merge branch '4.16' into main 2022-01-06 17:47:37 +05:30
dahn
2774bc156f
use physical size instead of virtual size for migration. (#5750)
* Use Physical size to evaluate if migration is possible

* Improve logging and consider files skipped as failure in complete migration

* skipped can't be negative

* remove useless method

* group multidisk templates for secstor migration

* use enum

* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Pearl d'Silva <pearl.dsilva@shapeblue.com>
2022-01-06 17:18:50 +05:30
Suresh Kumar Anaparti
30ae9eedad
Merge branch '4.16' into main 2022-01-05 10:14:47 +05:30
Rakesh
2bd1dc1e14
Enable resetting config values to default value (#4230)
* Enable resetting config values to default value

Provide reset button to zone,cluster,domain,account,
primary and secondary storage so that config values
can be reset to default value

* fix ui issue

* Update test/integration/smoke/test_reset_configuration_settings.py

* Update test/integration/smoke/test_reset_configuration_settings.py

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-01-03 21:55:30 +01:00
Suresh Kumar Anaparti
99313f8eae
Merge branch '4.16' into main 2021-12-20 14:01:41 +05:30
Daniel Augusto Veronezi Salvador
79d924f3ee
Insert correct template size when live migrating VM with volumes (#5758)
Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2021-12-16 20:21:38 +05:30
José Flauzino
28385be609
Fix metrics stats for VMs not running (#5633)
* Fix metrics stats for VMs that are not running

* Improves the way to get vmIdsToRemoveStats

* Improves test

Co-authored-by: José Flauzino <jose@scclouds.com.br>
2021-12-06 11:06:10 -03:00
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
4beca925d7
Fix NPE on scale VM operation after the corresponding template is deleted (#5736) 2021-12-01 17:53:09 +01:00
Harikrishna
895f282d9a
Fix NPE on scale VM operation after the corresponding template is deleted (#5721) 2021-12-01 10:50:43 +05:30
Wei Zhou
14f3b24975 Merge remote-tracking branch 'apache/4.16' 2021-11-29 14:12:22 +01:00
Wei Zhou
965316b842
server bug fix: remove network details when network is removed (#5675) 2021-11-25 21:15:51 +01:00
Wei Zhou
2b54b587fc
engine/schema: fix findActiveAccountById in AccountDaoImpl.java (#5704) 2021-11-25 12:20:48 +01:00
José Flauzino
e2c85decb6
schema: Add SQL command to alter the table 'ipsec_psk' when upgrading to 4.17 (#5668)
Co-authored-by: José Flauzino <jose@scclouds.com.br>
2021-11-23 16:50:11 +05:30
Daniel Augusto Veronezi Salvador
ddd2fcaf2d
Refactor few process of VirtualMachineManagerImpl and improve logs (#4966)
* Improve logs

* Remove unnecessary comments

* Use diamond inference

* Fix some logs

* Remove unnecessary unboxing

* Create method to handle job result

* Remove unused vars and fix some logics

* Extract code to method and few adjusts

* Use CollectionUtils

* Extract pending work job validation to method

* Create new constructors

* Extract work job and info creation to a method

* Extract submit async job to a method

* Extract find vm by id to a method

* Change log level from trace to debug

* Remove unnused methods and add logs

* Undo code remotion

* Remove asserts and fix conditionals

* Address @GabrielBrascher reviews

* Remove double quotes from keys in manual json

* Undo code remotion

* Add object to log

* Remove statement from try/catch

* Implement toString with ReflectionToStringBuilderUtils

* Fix errors related to merge main

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-11-23 11:22:21 +01:00
Rohit Yadav
d8004871e5 Merge remote-tracking branch 'origin/4.16' into main 2021-11-18 14:05:53 +05:30
Wei Zhou
c95f8e263a
server: set network rate for additional public IPs (#5670)
This PR fixes #5669
2021-11-18 13:45:37 +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
e27dd53697
Fix build and version numbers 2021-11-10 13:15:46 -03:00
nicolas
b0bf069bcf
Merge branch '4.16' into main 2021-11-10 12:59:28 -03:00
nicolas
bdab51424a
New upgrade schema path and workaround for system VM template auto registration 2021-11-10 12:56:52 -03:00
nicolas
462e0511f4
Fix version and add schema upgrade path 2021-11-10 11:49:02 -03:00
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
nicolas
44c08b5acc
Updating pom.xml version numbers for release 4.16.0.0
Signed-off-by: nicolas <nicovazquez90@gmail.com>
2021-11-04 14:14:57 -03:00