2993 Commits

Author SHA1 Message Date
Rakesh
b88cfc226e
Mount disabled storage pool on host reboot (#6164)
* Mount disabled storage pool on host reboot

Add a global setting so that disabled pools will be mounted
again on host reboot

* fix build error

* Update description

* add cluster-wide support

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2022-04-01 23:38:32 -03:00
Pearl Dsilva
2c8c476656
CKS: Support deployment of CKS clusters on Advanced zones with security groups (#6132)
* CKS: Support deployment of CKS clusters on Advanced zones with security groups

* use available constant

* address comments -
- Ingress sg rule for port 22 & 6443
- Use constant to define securityGroup Name
- rename variable name from type -> vmType

* unique name for security group + foreign key

* use constants
2022-04-01 13:19:54 -03:00
Rakesh
aa00ef90c9
Prevent vm's from stopping while enabling maintenance mode (#4636)
Sometimes when host isput into maintenance, the connection get
disconnected and as result vm's are stopped. So check for extra state
before considering host as down and stopping the vm's
2022-03-25 11:46:45 -03:00
nvazquez
c3854ba781
Merge branch '4.16' 2022-03-20 23:14:57 -03:00
Pearl Dsilva
f8b648b938
Fix migration of VM with volume on Ubuntu (#6116)
* Fix migration of VM with volume on Ubuntu

* address comment
2022-03-20 23:14:24 -03:00
Wei Zhou
6a53517d37
New feature: Reserve and release Public IPs (#6046)
* Reserve and release a public IP

* Update #6046: show orange color for Reserved public ip

* Update #6046 reserve IP: fix ui conflicts

* Update #6046: fix resource count

* Update #6046: associate Reserved public IP to network

* Update #6046: fix unit tests

* Update #6046: fix ui bugs

* Update #6046: make api/ui available for domain admin and users
2022-03-17 14:35:40 -03:00
Daniel Augusto Veronezi Salvador
c146449ab8
Create profiles to download systemvm-templates (#5602)
* Create profiles to download systemvm-templates

* Rename profiles

* Add support to pass necessary flags to the packaging jobs

* Escape flags

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2022-03-17 00:55:27 -03:00
nvazquez
e3132af64e
Merge branch '4.16' 2022-03-10 08:49:43 -03:00
Wei Zhou
3a456f1b31
server: mark volume snapshots as Destroyed if it does not exist on primary and secondary storage when delete a volume (#6057)
* server: mark volume snapshots as Destroyed in some cases when delete a volume in QCOW2 format

when delete a volume in QCOW2 format, if volume snapshot does not exist on primary and secondary storage, mark the snapshot as Destroyed.

* Update #6057: remove check on volume format
2022-03-10 08:49:03 -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
Pearl Dsilva
8f427f601a
Adapt script to bash version 3 (#6069)
This PR fixes: #6060
Bash version 3 does not have support for associative arrays. Hence during the packaging phase the metadata.ini file created (on osx) isn't in proper format as the script used to generate it i.e., templateConfig.sh made use of associative arrays - which is supported from bash v4 onward. This eventually leads failure to deploy DB on OSX.

This PR modifies the script to work on systems using bash v3.
2022-03-09 01:45:47 +05:30
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
Pearl Dsilva
3a74ec78be
api: Fix search by name (#6032)
* Search by name

* add keyword search for projectroles

* remove unnecessary arg
2022-03-04 23:52:53 -03:00
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
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
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
cb2ddc45ac
Merge branch '4.16' into main 2022-02-25 16:04:35 +05:30
Pearl Dsilva
a8cc261143
[vmware, ssvm] Scale down of ssvm (#6042)
* [vmware, ssvm] Scale down of ssvm

* address comments - change variable name
2022-02-25 15:45:10 +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
davidjumani
2a1a012a4d
Allow domain admin to change domain and account settings (#4339)
* Allow domain admin to change domain and account settings

* Cleanup

* Remove useless global setting

* Restrict regular users with listConfig access

* Address comments

* Moving upgrade path
2022-02-21 12:25:45 -03:00
Pearl Dsilva
d311f88d35
Allow scaling VM to a service offering having different storage tags (#5996) 2022-02-18 17:39:00 +01: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
Nicolas Vazquez
97d42e9980
Fix: allow executing CopyCommand operations in parallel when it is set (#5960)
* Invoke the hypervisor guru instead of the guru cycle

* Refactor

* Remove unused import

* Refactor error
2022-02-14 23:52:45 -03:00
Nicolas Vazquez
fe03e306ac
Fix attach volume error for VM - different scope for VM volume and volume disk offering (#5982)
* Fix attach volume error for VM on different storage pool

* Fix typo

* Refactor
2022-02-13 11:06:44 -03:00
Suresh Kumar Anaparti
48b1e73573
Merge branch '4.16' into main 2022-02-11 22:32:37 +05:30
dahn
8db598bc0f
set pod after migration (#5972)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-02-11 18:47:45 +05:30
Nicolas Vazquez
7f0a322b7d
[Vmware] Prevent NPE on template registration if guest OS is removed (#5980) 2022-02-11 07:36:59 -03:00
Suresh Kumar Anaparti
212a4dedfc
Merge branch '4.16' into main 2022-02-10 20:56:52 +05:30
sureshanaparti
5297b52d98
Improve the guest OS hypervisor mappings addition on upgrade. (#5911)
- This removes the hardcoded guest os ids 305 - 329 in upgrade path 4.14.0 to 4.15.0, and 330 - 349 in upgrade path 4.15.0.0 to 4.15.1.0.
2022-02-10 14:43:03 +01:00
Suresh Kumar Anaparti
208ae84dd7
Merge branch '4.16' into main 2022-02-08 19:01:34 +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
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
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