34508 Commits

Author SHA1 Message Date
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
Rakesh
1bf686269f
Persist vpn connection state before restarting (#4635)
If the vpn connection is in pending state then we cant restart the
vpn connection. So manually set the state to disconnected and then
try to restart the vpn connection
2021-09-16 00:44:01 -03:00
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
e6058b09a7
ui: Fix Load Balancer Rules alignment issue (#5451) 2021-09-15 14:41:48 +02:00
sureshanaparti
1f3f02b469
api: Updated pod response, moved the parameters: startip, endip, vlanid, forsystemvms to ipranges (new parameter to hold the list of IP range details). (#5424)
This PR updates the pod response, grouped the parameters: startip, endip, vlanid, forsystemvms as ip range response and added to ipranges parameter (a new parameter to hold the list of IP range details).
2021-09-15 14:46:42 +05:30
Pearl Dsilva
4b1fc195cf
ui: Refresh Usage dashboard when swapping between Project and Default view (#5447) 2021-09-15 10:50:25 +05:30
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
Pearl Dsilva
f409e7a922
api: Update DNS on changing VM name (#5425)
* api: Update DNS on changing VM name

* refactor backend code + UI - add warning messaging to prompt users to restart VM in case particular fields are updated

* address comments
2021-09-15 00:26:12 -03:00
Rakesh
3c2360c9d2
VM has wrong network statistics with multiple nics in shared networks (#4741)
If vm has multiple nics belonging to different shared networks then
wrong statistics will be collected since network id is not considred
as primary key. Make the change so that primary key contains network
id so that traffic belonging to that corresponding network is shown

If network id is not added to primary key then all the traffic of all
shared networks will show up in one nic.

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2021-09-14 23:54:34 -03:00
Hoang Nguyen
073a54bd6e
ui: removed whitespace after string (#5450) 2021-09-14 16:07:30 +05:30
Abhishek Kumar
fb8d40de54
server: skip max guest limit check for KVM host (#5417)
Addresses #3015

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-14 03:12:53 -03:00
Abhishek Kumar
c85eb107a6
server: fix addCluster for vmware, others (#5421)
With 87ddc76, value column in cloud.cluster_details has been made non-nullable.
While adding a cluster (especially VMware), addCluster API can be called without username password. Username and password are updated in cluster details entry later after successful discovery.
This PR stores an empty string instead of a null value when initial cluster entry is made in the DB.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-14 11:17:17 +05:30
Pearl Dsilva
7c7b624955
ui: Fix Scale VM failure - missing args when customized compute offering is used (#5439) 2021-09-14 02:46:40 -03:00
Abhishek Kumar
6e50e10470
ui: select newly created network in deploy vm (#5423)
Form tries to find newly created network which belongs to the same account, created in last 30s and was not present in the networks list before opening create network dialog.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-14 00:34:10 -03:00
davidjumani
470ceb4351
ui: Allow searching in dropdowns (#5395) 2021-09-13 11:50:19 -03:00
Rohit Yadav
931ba55909
utils: remove duplicate commons-lang3 dependency (#5441)
The same is declared at lines 128-131 in utils/pom.xml

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-09-13 19:29:23 +05:30
davidjumani
d162005e4c
ui: Send deployvm api call as post (#5438) 2021-09-13 14:35:16 +05:30
davidjumani
8ca3e4a915
ui: Remove double footer (#5437) 2021-09-13 14:32:21 +05:30
nicolas
2a243b8b69
Merge branch '4.15' into main 2021-09-10 23:15:53 -03:00
Nicolas Vazquez
4147d5a888
ui: Move eventBus listener to mounted (#5435)
This PR fixes the action buttons for IP addresses, needed a refresh before the fix
2021-09-10 21:15:30 +05:30
Abhishek Kumar
c6055a23f3
api, ui: return default ui pagesize as part of capability response (#5432)
listConfigurations is not available for all roles and therefore not fit to use in UI for a generic functionality.
This PR makes default ui pagesize a part for listCapabilities API response to make it available for UI across different role accounts.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-10 19:15:38 +05:30
Abhishek Kumar
8baf384359
ui: fix add management ip range form (#5427)
Add management IP range form shows same pod multiple times when the pods has multiple IP ranges.
This PR fixes the behaviour.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-10 19:02:32 +05:30
Nicolas Vazquez
35efdd1842
ui: Hide settings button if not on development mode (#5431)
* Display colors Save settings only in dev mode

* Hide entirely the dic section if not on dev

* Hide the settings floating widget if not on development
2021-09-10 18:23:49 +05:30
Abhishek Kumar
eba577c0a9
ui: show nicAdapter selection for VMware non-readfromova template (#5429)
* ui: show nicAdapter selection for non-readfromova template

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

* show keyboardcontroller and ostype elements in different rows

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-10 17:32:36 +05:30
DK101010
dc17cf4f39
Prevent double counting storage pools (#5398)
* Prevent double counting storage pools

Currenly, getStoragePoolUsedStats fetch all pools
undepended if a pool have a parent. Therefore as soon
as a datastore cluster is used, the cluster and the storages it contains are calculated together
The change fetch all storages without cluster and all datastore cluster

* Update server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

Co-authored-by: DK101010 <dirk.klahre@itelligence.de>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-09-10 08:57:35 -03:00
Junxuan Wu
f6073052aa
Fix potential NullPointerException in findStoragePool (VolumeOrchestrator) (#5358)
* fix null pointer exception when vm is null

* add null checker to getPreferredStoragePool method

Co-authored-by: junxuan <atrocitythemetms@gmail.com>
2021-09-08 23:43:33 +05:30
Pearl Dsilva
30aeeb09d2
travis: Fix failing test due to change in test name (#5416) 2021-09-08 17:47:08 +05:30
Daniel Augusto Veronezi Salvador
8ffba83214
Keep volume policies after migrating it to another primary storage (#5067)
* Add commons-lang3 to Utils

* Create an util to provide methods that ReflectionToStringBuilder does not have yet

* Create method to retrieve map of tags from resource

* Enable tests on volume components and remove useless tests

* Refactor VolumeObject and add unit tests

* Extract createPolicy in several methods

* Create method to copy policies between volumes and add unit tests

* Copy policies to new volume before removing old volume on volume migration

* Extract "destroySourceVolumeAfterMigration" to a method and test it

* Remove javadoc @param with no sensible information

* Rename method name to a generic name

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-09-08 09:13:41 -03:00
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