3990 Commits

Author SHA1 Message Date
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
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
DH Park
a85a00bed9
kvm: Fixes UEFI XML Definition Error (#5692)
UEFI bootMode 추가
2021-11-23 16:44:32 +05:30
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
Peinthor Rene
fe1ddfb1eb
linstor-volume-plugin: Only create diskless assignments on nodes (#5661)
With diskful set to true, linstor will fail if it cannot create local
storage for the resource. Which in turn will make it impossible to have a
setup with just compute nodes on cloudstack.
2021-11-03 21:24:48 -03:00
Rohit Yadav
cb67da5bce
cks: refactor code to be architecture agnostic (#5629)
* cks: refactor code to be architecture agnostic

This makes the CKS setup/install/upgrades architecture agnostic and
works on both amd64 and arm64 platforms.

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

* fix

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

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-10-29 15:15:34 -03:00
Rohit Yadav
a8b19ee2d3
Merge pull request #5583 from apache/4.15
vmware: fix NPE for volume migration CLUSTER to ZONE-wide pool (#5582)
2021-10-17 06:56:43 +05:30
Abhishek Kumar
330e8e6e9d
vmware: fix NPE for volume migration CLUSTER to ZONE-wide pool (#5582)
Scope type of source pool is passed in the method, incorrectly, instead of the target pool.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-10-17 06:54:41 +05:30
Pearl Dsilva
e73445e5d5
api: Fix response object for various APIs (#5573) 2021-10-13 22:26:53 -03:00
Wei Zhou
6b757d502e
CKS: use cluster-autoscaler-standard.yaml in kubernetes repo (#5574) 2021-10-13 12:46:52 -03:00
sureshanaparti
152159b13a
kvm: Add the source disk format for disk conversion/copy using 'qemu-img convert', when specified explicitly. (#5561)
This PR adds the source disk format (in KVM) for disk conversion/copy using 'qemu-img convert', when specified explicitly

Fixes: #5516
2021-10-11 12:00:49 +05:30
Abhishek Kumar
2a42a01728
xcp-ng: fix vm boot options (#5543)
* xcp-ng: fix vm boot options

Use value boot option values from VM details directly similar to other hypervisor plugins instead of relying on boot properties explicitly set for VirtualMachineTO.

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

Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2021-10-07 13:22:23 +05:30
davidjumani
6ac834a358
Adding AutoScaling for cks + CKS CoreOS EOL update + systemvmtemplate improvements (#4329)
Adding AutoScaling support for cks
Kubernetes PR : kubernetes/autoscaler#3629
Also replaces CoreOS with Debian
Fixes #4198

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-10-06 21:17:41 +05:30
sureshanaparti
e198edfaf8
Report the PowerFlex/ScaleIO disk copy failure during volume migration and fail the migration (#5542)
* Report the PowerFlex/ScaleIO disk copy failure during volume migration and fail the migration.

* Code improvements

* Addressed review comments
2021-10-05 14:19:52 -03:00
div8cn
52a9dbdcd2
kvm available memory calculation optimization (#5540)
* Update LibvirtComputingResource.java

* Update LibvirtComputingResource.java

* Update LibvirtComputingResource.java

re

* Update MemStat.java

* Update MemStat.java

* Update MemStatTest.java
2021-10-05 12:34:28 -03:00
Harikrishna
cd4e7e031a
Fix resize volume and migrate volume to update volume path if DRS is applied on volume in datastore cluster (#5539)
* Fix resize volume and migrate volume to update volume path if DRS is applied on volume in datastore cluster

* Change in constructors

* Naming changes

* Remove commented code

* Refactor code for more readability

* Addressed review comments on code refactor
2021-10-04 20:58:25 -03:00
Leo (Hsueh Yu-Min)
72a1c0e7f1
[KVM] Add MV Settings for virtual GPU hardware type and memory (#5513)
* KVM: Add MV Settings for virtual GPU hardware type and memory

* fix method createVideoDef argument in test package

* add available options for KVM virtual GPU hardware VM setting

* fix videoRam default value

* fix _videoRam is 0, it will use default provided by libvirt
2021-10-04 09:55:32 +05:30
Wei Zhou
09fce75047
OVS/GRE: bug fixes (#5446)
* OVS/GRE: fix failed to fetch cloudbr* info on host

* OVS/GRE: move ovstunnel.py to python3

* OVS: add test_privategw_acl_ovs_gre.py for automatic testing

(1) VR <-> VM should work
(2) Private GW should work

* OVS: fix an issue on xenserver

ovs bridges are deleted by xenserver/ovs automatically
```
[root@ref-trl-1797-x-M7-wei-zhou-xs2 ~]# grep -r xapi7 /var/log/ |grep del-br
/var/log/xensource.log:Sep 15 07:13:44 ref-trl-1797-x-M7-wei-zhou-xs2 xcp-networkd: [ info|localhost|611 |org.xen.xapi.xenops.classic events D:4a3d931cd89f|network_utils] /usr/bin/ovs-vsctl --timeout=20 -- --if-exists del-br xapi7
/var/log/daemon.log:Sep 15 07:13:45 ref-trl-1797-x-M7-wei-zhou-xs2 ovs-vsctl: ovs|00001|vsctl|INFO|Called as /usr/bin/ovs-vsctl --timeout=20 -- --if-exists del-br xapi7
```

which results that xe network exists but bridge does not exist, and operation stuck for 20 minutes at
```
2021-09-15 16:06:56    DEBUG [root] #### VMOPS enter  create_tunnel ####
2021-09-15 16:06:56    DEBUG [root] Creating tunnel from host 2 to host 1 with GRE key 2116
2021-09-15 16:06:56    DEBUG [root] Executing:['/usr/bin/ovs-vsctl', '--timeout=0', 'wait-until', 'bridge', 'xapi7', '--', 'get', 'bridge', 'xapi7', 'name']
2021-09-15 16:26:56    DEBUG [root] bridge xapi7 for creating tunnel - VERIFIED
2021-09-15 16:26:56    DEBUG [root] Executing:['/usr/bin/ovs-vsctl', 'add-port', 'xapi7', 't2116-2-1', '--', 'set', 'interface', 't2116-2-1', 'type=gre', 'options:key=2116', 'options:remote_ip=10.0.34.230']
```

* OVS/GRE: component test test_vpc_distributed_routing_offering.py passes on xenserver

* OVS: support Shared network with GRE protocol

* update #5446: use lang3.StringUtils

* OVS/GRE: VPC with distributed routing on kvm (still not working)
2021-10-03 14:47:52 +05:30
Harikrishna
df0c0045b5
Fix export snapshot and template to secondary storage to export only required disk (#5510)
* Fix export snapshot and export template to secondary storage in VMware to export only one required disk

* Move clone operation into virtual machine mo

* Code refactored for readability

* Added disk key check even for successful clone operation

* Delete dettached disks from cloned VM and added few logs
2021-09-30 12:44:02 -03:00
Rohit Yadav
b955b38ccb Merge remote-tracking branch 'origin/4.15' into main 2021-09-27 16:17:49 +05:30
Abhishek Kumar
25d522fb3d
server: add vm boot details for start vm api (#5469)
Add vm boot details for start vm api

Fixes #5466

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-27 16:16:27 +05:30
SadiJr
c3a1c7862f
backup: Improve Veeam Plugin logs (#5455)
* Improve Veeam Plugin logs

* Address reviews

* Address reviews

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2021-09-24 17:25:27 +05:30
Rohit Yadav
b28dd81e8e Updating pom.xml version numbers for release 4.15.3.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-09-17 12:53:29 +05:30
Peinthor Rene
66c39c1589
storage: Linstor volume plugin (#4994)
This adds a volume(primary) storage plugin for the Linstor SDS.
Currently it can create/delete/migrate volumes, snapshots should be possible,
but currently don't work for RAW volume types in cloudstack.

* plugin-storage-volume-linstor: notify libvirt guests about the resize
2021-09-16 10:50:58 +05:30
Wei Zhou
95ef292860
kvm: honor migrate.wait and abort vm migration job (#5388)
* kvm: honor migrate.wait and abort vm migration job

* kvm: propogate migratewait to all cloudstack agents on kvm hosts

* update #5388

* update #5388: display error msg
2021-09-15 12:38:16 -03:00
Pearl Dsilva
3f827ef22b
UI: Support to upload resource icons (#5157)
* Resource Icon support - backend

* Add API support for resourceicon

* update reponse params + ui support

* Add exclusive list api for icons and UI changes

* refactor upload view

* UI changes to support resource icon wherever necessary

* convert api to POST + refactor icon view

* Add response name to list API + cosmetic changes in UI

* Added support for the following:
resource icon support for vpcs, networks, domains, and projects
add icons to list view if reosurces support icons to be added
support for showing project icons in the project switching drop-down menu

* List resourceicon cmds to be allowed for user role too
Users to inherit account icon if present (in listUsers response)
Move common code to plugin.js
Add icon to project list view - while switching between projects - Dashboard page
Show icons against zones - Capacity Dashboard view
Show user / account icon at the login button if present

* cosmetic changes

* optimize ui code

* fix reload issue for domain view

* add access check for delete operation

* ui-related changes to show iso icons

* iso image in uservm response

* add icons to custom form's list resources

* some more custom forms aligned to show icon for resources

* conmitic changes + add listing of icons to listdomainchildren cmd

* Add backend/server-side validation for base64 string passed for image

* change preview border

* preselect zone if there's only one

* add default icon

* show icon for network list in deploy vm view

* add custom icons if any to the import-export VM view

* preselect zone persistence on clearing cache

* prevent root vol from inheriting template/iso icon

* show tempalte icon in the info card details

* fix icon not being show on hard-refresh / initial traversal

* fx success message
2021-09-15 00:50:42 -03:00
Rohit Yadav
4aaa850b63 Updating pom.xml version numbers for release 4.15.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-09-10 21:19:58 +05:30
Nicolas Vazquez
413d10dd81
server: Extend the Annotations framework (#5103)
* Extend addAnnotation and listAnnotations APIs

* Allow users to add, list and remove comments

* Add adminsonly UI and allow admins or owners to remove comments

* New annotations tab

* In progress: new comments section

* Address review comments

* Fix

* Fix annotationfilter and comments section

* Add keyword and delete action

* Fix and rename annotations tab

* Update annotation visibility API and update comments table accordingly

* Allow users seeing all the comments for their owned resources

* Extend comments for volumes and snapshots

* Extend comments to multiple entities

* Add uuid to ssh keypairs

* SSH keypair UI refactor

* Extend comments to the infrastructure entities

* Add missing entities

* Fix upgrade version for ssh keypairs

* Fix typo on DB upgrade schema

* Fix annotations table columns when there is no data

* Extend the list view of items showing they if they have comments

* Remove extra test

* Add annotation permissions

* Address review comments

* Extend marvin tests for annotations

* updating ui stuff

* addition to toggle visibility

* Fix pagination on comments section

* Extend to kubernetes clusters

* Fixes after last review

* Change default value for adminsonly column

* Remove the required field for the annotationfilter parameter

* Small fixes on visibility and other fixes

* Cleanup to reduce files changed

* Rollback extra line

* Address review comments

* Fix cleanup error on smoke test

* Fix sending incorrect parameter to checkPermissions method

* Add check domain access for the calling account for domain networks

* Fix only display annotations icon if there are comments the user can see

* Simply change the Save button label to Submit

* Change order of the Tools menu to provent users getting 404 error on clicking the text instead of expanding

* Remove comments when removing entities

* Address review comments on marvin tests

* Allow users to list annotations for an entity ID

* Allow users to see all comments for allowed entities

* Fix search filters

* Remove username from search filter

* Add pagination to the annotations tab

* Display username for user comments

* Fix add permissions for domain and resource admins

* Fix for domain admins

* Trivial but important UI fix

* Replace pagination for annotations tab

* Add confirmation for delete comment

* Lint warnings

* Fix reduced list as domain admin

* Fix display remove comment button for non admins

* Improve display remove action button

* Remove unused parameter on groupShow

* Include a clock icon to the all comments filter except for root admin

* Move cleanup SQL to the correct file after rebasing main

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2021-09-08 10:14:06 +05:30
Abhishek Kumar
3d16584fa6
kvm: fix misleading error log (#5396)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-08 10:10:21 +05:30
Wei Zhou
a755ecfce8
Migrate vm across clusters (#4534)
* server: Optional destination host when migrate a vm

* #4378: migrate systemvms/routers with optional host

* Migrate vms across clusters

After enabling maintenance mode on host, if no suitable hosts
are found in the same cluster then search for hosts in
different clusters having the same hypervisor type

set global setting migrate.vm.across.clusters to true

* search all clusters in zone when migrate vm across clusters if applicable

* Honor migrate.vm.across.clusters when migrate vm without destination

* Check MIGRATE_VM_ACROSS_CLUSTERS in zone setting

* #4534 Fix Vms are migrated to same clusters in CloudStack caused by dedicated resources.

* #4534 extract some codes to methods

* fix #4534: an error in 'git merge'

* fix #4534: remove useless methods in FirstFitPlanner.java

* fix #4534: vms are stopped in host maintenance

* fix #4534: across-cluster migration of vms with cluster-scoped pools is supported by vmware vmotion

* fix #4534: migrate systemvms is only possible across clusters in same pod to avoid potential network errors.

* fix #4534: code optimization

Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
Co-authored-by: Sina Kashipazha <s.kashipazha@global.leaseweb.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Co-authored-by: Sina Kashipazha <soreana@users.noreply.github.com>
2021-09-07 21:50:29 -03:00
nicolas
4de35426c4
Merge branch '4.15' into main 2021-09-02 22:04:12 -03:00
Rohit Yadav
2297c73c92
vmware: delete snapshot disk after backup to secondary storage (#5333)
* vmware: delete snapshot disk after backup to secondary storage

WIP - This ensures that worker VM is destroyed along with any of its own
disks that are backed up to secondary storage.

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

* fix

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

* fix for volume backup and confuding vm var name

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

* change

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

* tag as worker vm

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

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-03 00:38:44 +05:30
Abhishek Kumar
56f4da6dce Merge remote-tracking branch 'apache/4.15' into main 2021-09-02 16:13:33 +05:30
sureshanaparti
fc285e23f3
vmware: Cancel the pending tasks for worker VM before destroying it (#5374)
Co-authored-by: nicolas <nicovazquez90@gmail.com>
2021-09-02 11:02:20 +05:30
Abhishek Kumar
8998479606
vmware: check checksum before copying systemvm ISO to decide if it is needed (#5380)
* vmware: fix copy systemvm.iso for same version

For VMware, systemvm.iso is copied from MS to secondary store. Current server checks if the desired file is present on the secondary store or not. If it is not present ISO is copied.
This change adds a check for checksum for source and destination ISO which would allow copying new ISO if there is a mismatch.
Useful in case when file is corrupted in secondary store or new systemvm.iso is generated for dev environment.

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

* changes

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-02 10:53:29 +05:30
Slair1
76d5ce310a
allow cert renewal even if auth strictness is false (#4852)
includes updated tests and logging
2021-09-01 18:19:07 +05:30
Wei Zhou
4e53997ca2
server: do not remove volume from DB if fail to expunge it from primary storage or secondary storage (#5373)
* server: do not remove volume from DB if fail to expunge it from primary storage or secondary storage

* server/VolumeApiServiceImpl.java: move to method

* update #5373
2021-08-31 13:48:58 -03:00
Abhishek Kumar
73cabcd641
xcp-ng: allow passing vm boot options (#5335)
* xenserver: honor vm boot details

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

* ui: allow boot option selection for xenserver

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

* fix

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

* fix case

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

* fix

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

* host uefi capability

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

* change

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

* add detail only if uefi supported

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

* update host detail

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

* fix version comparison

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-08-31 16:10:12 +05:30
Rohit Yadav
a1a3aff2b5 Merge remote-tracking branch 'origin/4.15' into main 2021-08-31 14:29:30 +05:30
slavkap
961e85eb60
Fix of creating volumes from snapshots without backup to secondary storage (#5349)
* Fix of creating volumes from snapshots without backup

When few snaphots are created onyl on primary storage, and try to create
a volume or a template from the snapshot only the first operation is
successful. Its because the snapshot is backup on secondary storage with
wrong SQL query. The problem appears on Ceph/NFS but may affects other
storage plugins.
Bypassing secondary storage is implemented only for Ceph primary storage
and it didn't cover the functionality to create volume from snapshot
which is kept only on Ceph

* Address review
2021-08-31 12:46:57 +05:30
Rafael
14323c9db5
updated maven dependency due to #5363 (#5366)
Co-authored-by: Rafael del Valle <rvalle@privaz.io>
2021-08-31 12:39:18 +05:30
nicolas
3ddcf85876
Merge branch '4.15' into main 2021-08-30 22:32:27 -03:00
sureshanaparti
e50a40ea08
Start VM with deploy-as-is template having multiple disk (SCSI) controller types. (#5311) 2021-08-30 21:52:24 -03:00
sureshanaparti
46ca853e55
Added Worker VM tags for few cloned VMs, created while performing some volume operations. (#5377)
Worker VM tags are missed for few cloned VMs in VMware, and so these are skipped when tracking / cleaning up of Worker VMs. Adding proper Worker VM tags to these VMs would make them trackable from CloudStack.
2021-08-30 20:22:06 -03:00
Spaceman1984
1d3083db86
Added support for removing unused port groups on VMWare (#4701)
* Added support for removing unused port groups on VMWare

* Fixed error handling around unavailable portgroup name

* Review changes, defaulting glovbal var to false, added warning to description, changed if statement.

* Cleanup unused network port groups on all the hosts.

Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
Co-authored-by: nicolas <nicovazquez90@gmail.com>
2021-08-28 09:04:50 -03:00
sureshanaparti
7f4f3f7f1a
[VMware DRS] Adding new host to DRS cluster does not participate in load balancing. (#1257)
* CLOUDSTACK-9175: [VMware DRS] Adding new host to DRS cluster does not participate in load balancing.

Summary: When a new host is added to a cluster, Cloudstack doesn't create all the port groups (created by cloudstack earlier in other hosts) present in the cluster. Since the new host doesn't have all the necessary networking port groups of cloudstack, it is not eligible to participate in DRS load balancing or HA.

Solution: When adding a host to the cluster in Cloudstack, use VMware API to find the list of unique port groups on a previously added host (older host in the cluster) if exists and then create them on the new host.

* Added few checks for cluster details
2021-08-27 14:22:47 -03:00