34480 Commits

Author SHA1 Message Date
Greg Goodrich
2bbc78170b
packaging: Issue #3974 Deploying mysql-ha jar file into its own path to allow for easy inclusion of just this jar file into multiple packages, such as cloudstack-management and cloudstack-usage. (#3975)
Support for centos7 and centos8

Prior PR #2915 causes the cloudstack-usage daemon to not be able to find the mysql-ha jar file.

This happens because the /etc/default/cloudstack-usage file points to the old location for the mysql-ha jar file, and thus is unable to load it. This prior PR installs this jar into a more common area with other jar files, and thus is not really a desired location for the cloudstack-usage daemon to get it from, as it will cause cloudstack-usage to load other plugins that it doesn't need.

Fixes: #3974
2021-09-08 10:31:11 +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
10c49a6ad3
marvin: fix exception logging (#5401)
Fixes #5203

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-08 10:12:05 +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
b13930f946
server: fix reset sshkey is broken in master/4.16 (#5390)
* server: fix reset sshkey is broken in master/4.16

* Revert "server: fix reset sshkey is broken in master/4.16"

This reverts commit db278cf412f5ba4de2787e9511de75fc861097df.

* update #5390

* server: fix another regression of #4819 and #5274

* update #5390
2021-09-07 21:59:06 -03:00
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
Rohit Yadav
c0ecc34f4c Merge remote-tracking branch 'origin/4.15' into main 2021-09-07 18:13:28 +05:30
mib85
10459de71b ui: use local copy of less.min.js
Fixes #5277
2021-09-07 18:11:45 +05:30
Pearl Dsilva
ff4b49bdb7
UI: Add router links to notifications and show error description (#5402) 2021-09-07 00:56:12 -03:00
Rohit Yadav
d1db7f4b7b Merge remote-tracking branch 'origin/4.15' into main
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-09-06 18:30:49 +05:30
Abhishek Kumar
f564597e92
api, ui: fix NPE with deployVirtualMachine when null boottype (#5387)
* api: fix NPE with deployVirtualMachine when null boottype

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

* throw exception for empty bootmode

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

* fix

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

* ui: fix boot options

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

* check

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-06 18:28:32 +05:30
Rohit Yadav
01683ca131
Legacy UI: Display Accounts Tab to Project Admins (#5408)
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2021-09-04 15:50:56 +05:30
lujiefsi
1ed828b2a1
CLOUDSTACK-10436:remind users to use correct permission for tmp dir and fixed an NPE (#5066)
* CLOUDSTACK-10436:remind users to use correct permission for tmp dir

* remove static

* fix potential NPE

* check /tmp

* simplified the code

* remove /tmp

* add /tmp

* add static tmp

* rename tmp

Co-authored-by: lujie <lujie@foxmail.com>
2021-09-03 08:41:24 -03:00
davidjumani
a000361238
Merge remote-tracking branch 'apache/4.15' into main 2021-09-03 16:55:10 +05:30
Pearl Dsilva
b2fd1f6d32
server: Allow public templates with no url to be migrated (#5404)
This PR allows migration of public templates that are created from snapshots / volumes. Data migration across secondary stores initially excluded all public templates on the pretext that public templates are automatically synced when a new image store is added; however, this assumption isn't true for templates marked as "public" when created from snapshots / volumes. Such templates can be identified if their url is null
2021-09-03 16:25:11 +05:30
davidjumani
0bc6e05bc4
ui: Honour default.ui.page.size (#5394)
* ui: Honour default.ui.page.size

* Moving db upgrade path
2021-09-03 16:23:26 +05:30
Wei Zhou
7a7e449af6
usage: fix backup usage (#5259)
when creating usage record for backup usages in a period, we need to check if vm offering is changed. if vm offering is changed, create a new cloud usage record, otherwise update existing usage record.

This PR fixes #4982
2021-09-03 13:29:56 +05:30
nicolas
13d8489478
Merge branch '4.15' into main 2021-09-03 00:06:08 -03:00
davidjumani
a5e7e08a6b
Filter disk / service offerings by domain at DB level (#5307)
* Filter disk / service offerings by domain at DB level

* Search for tags in the db

* Update search to include host tags

* Differenciate between tags

* Refactor
2021-09-02 23:56:18 -03:00
nicolas
4de35426c4
Merge branch '4.15' into main 2021-09-02 22:04:12 -03:00
Wei Zhou
cf6dc663de
server: check server capacity when start/deploy a vm (#5339) 2021-09-02 21:45:00 -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
nicolas
eb64141785
Merge branch '4.15' into main 2021-09-02 12:16:06 -03:00
Nicolas Vazquez
e507b57b41
Add 4.15.2 schema and upgrade path (#5403) 2021-09-02 20:27:38 +05:30
Abhishek Kumar
56f4da6dce Merge remote-tracking branch 'apache/4.15' into main 2021-09-02 16:13:33 +05:30
dahn
571a361926
tests: component test ports/fixes in python3 (#5082)
* cleanup plan

* more robust cleanup within member method

* ss_domain_limits fixed

* egress 'icmp' instead of 'all' and cleanup

* configdrive syntax, fixed to be up to par with py2

* cleanup fixed the lb secondary ip tests?

* deal with different base64 encoding in py3 for userdata

* cleanup of multiple_ips_per_nic

* cleanup and reformat of test_volumes

* cleanup and fixes for test_ps_domain_limits.py

* cleanup and fix of test_ps_limits.py

* fix occasional match of float against int

* cleanup and fix test_ps_resize_volume.py

* cleanup and fix test_snapshots

* cleanup ss_max_limits and fix for float vs int problem in API

* mere cleanup of test_volume_destroy_recover

* add missing command creation

* cleanup of test_vpc_on_host_maintenance

* cleanup test_vpc_network

* cleanup, comments and logging in test_vpc_network_lbrules

* cleanup of test_vpc_network_pfrules

* cleanup and format code for test_vpc_network_staticnatrule

* f string instead of conversion specifiers

* check http and ssh fix and cleanup (for vpc pfrules tests)

* generalise create network method

* make ip optional in creating webserver

* remove unused code and add rules to enable ssh

* more cleanup

* remove unused code and cleanup

* small cleanup, mostly precarous run environment required

* cleanup and removed unused code

* advancedsg only, cleanup, pulled in services

* reformat/cleanup

* log result of error after verify rule

* add nw_off_no_services

* tags=["TODO"] for escalations_networks

* tags=["TODO"] for organization_states

* tags=["TODO"] for browse_templates

* tags=["TODO"] for configdrive

* tags=["TODO"] for vpc_vms_deployment

* add remove network cleanup and fixes

* move tests that fail on all platforms out of the way

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-09-02 16:03:49 +05:30
Pearl Dsilva
37761c610a
travis: fix consistent failures noticed on few tests (#5399) 2021-09-02 15:10:53 +05:30
Rakesh
70f2420e54
router: Use source IP from subnet for snat (#5376)
When snat is configured on a vm in a subnet then the source
ip should be taken from the same subnet rather than from
random other subnet.

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2021-09-02 13:59:46 +05:30
Wei Zhou
989a46850e
vr: ipsec/l2tp vpn secret with no ID selectors (#5375)
according to https://wiki.strongswan.org/projects/strongswan/wiki/Ipsecsecrets , the ID selector is optional.
2021-09-02 13:57:20 +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
Pearl Dsilva
557dc5e1a0
api: List details of template download state for stores corresponding to a zone (#5379)
* api: List details of template download state for stores corresponding to a zone

* fix test
2021-09-02 10:58:58 +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
Hoang Nguyen
ea2cd07708
UI - Scale VM - Fix compute offering selection not working (#5392)
* scale VM: fix compute offering selection not working

* hidden slider when cpuspeed empty & show customiops

* remove logs

* fix condition

* fix condition for coltranned
2021-09-01 14:08:26 -03:00
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
davidjumani
aec034b942
ui: Refresh page on deployvm result (#5393) 2021-09-01 12:16:47 +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
Rohit Yadav
5837f9016e
engine/schema: Use same upgrade path as 4.15.1-4.16.0 as for 4.15.2 (#5385)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-08-31 12:35:47 +05:30
nicolas
3ddcf85876
Merge branch '4.15' into main 2021-08-30 22:32:27 -03:00
Abhishek Kumar
fc213ac9fd
server: improve attach volume in specific cases (#5371)
* server: improve attach volume in specific cases

When a VM is in stopped state and host for it is not found then server skips sending AttachCommand to hypervisor.
Change tries to improve this case and finds a suitable host in the VM's cluster when volume is not in a HOST scope pool.

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

* typo

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2021-08-30 22:27:45 -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
davidjumani
d8a961e522
Fix action bar in place (#5368) 2021-08-30 20:20:18 -03:00
nicolas
04738d7775
Merge branch '4.15' into main 2021-08-28 09:14:39 -03:00
Wei Zhou
41f6f0e568
server: allow destroy/recover volumes which are attached to removed vms (#5364)
* server: allow destroy volumes which attach to a expunged vm

* server: recover volume which is attached to a removed vm
2021-08-28 09:10:31 -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
Pearl Dsilva
4acedc8308
Fix failure to scp diagnostic data file from SSVM on ubuntu based env (#5384) 2021-08-28 10:30:31 +05:30