34525 Commits

Author SHA1 Message Date
Rohit Yadav
0facba9372 Merge remote-tracking branch 'origin/4.15' into main 2021-09-20 13:42:43 +05:30
Wei Zhou
747608f75f
Add New API endpoint: UpdateVlanIpRange (#5411)
* Added Logic to update the user_ip_address table

* Edited ConfigurationManagerImpl

* Refactor UpdateVlanIpRangeCmd location

* Checkstyle corrections

* Mock updateVlanAndPublicIpRange

* Changes:
- UpdateVlanIpRangeCmd - changed since to 4.15.0
- ConfigurationService - Updated Javadoc
- ConfigurationManager - Updated Javadoc
- Added Unit tests
- Added license
- Update server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
- fix some bugs in #5411 and add support for ipv6 and forsystemvms
- fix #5411: disallow forsystemvms if ip range is dedicated
- update #5411: ui changes
- update #5411: support gateway/netmask change
- update #5411: change to sync call and fix bugs

Co-authored-by: kioie <kioieddy@google.com>
Co-authored-by: kioie <kioi@outlook.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2021-09-20 10:56:29 +05:30
Wei Zhou
f50cc27a5c
server: fix list public ip returns duplicated records (#5464)
* server: fix list public ip returns duplicated records

* update #5464: fix shared network
2021-09-20 10:49:53 +05:30
Rakesh
3b4523f22a
Display vlan ip range for specified domainid (#4634)
* Display vlan ip range for specified domainid

Currently if we try to list vlan ip range by passing
domainid then it lists for all domain. Make sure that
it lists only for that domain

* orgazine imports

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2021-09-20 10:37:21 +05:30
Pearl Dsilva
40b4b2c894
ui: Move resource icon to first colume for VM list view (#5465) 2021-09-19 21:50:06 -03:00
Nicolas Vazquez
8228ecee43
[Vmware] Add missing condition to cleanup nics if there are commands to send (#5449)
* [Vmware] Add missing condition to cleanup nics if there are commands to send
2021-09-17 21:54:52 +05:30
Rohit Yadav
939ef4ec4b Merge remote-tracking branch 'origin/4.15' into main 2021-09-17 12:57:44 +05:30
Wei Zhou
f2315ec0e2
ui: list static routes with listall=true (#5463) 2021-09-17 12:56:55 +05:30
Rohit Yadav
696c716741 Merge remote-tracking branch 'origin/4.15' into main 2021-09-17 12:55:11 +05:30
Rakesh
854a0a1a73
Display ACL id for the private gateway (#5460)
* Display ACL id for the private gateway

Display link for acl id which is associated
with the private gateway

* Update ui/src/components/view/InfoCard.vue

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>

* Update InfoCard.vue

* Update InfoCard.vue

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
Co-authored-by: Rohit Yadav <rohit@apache.org>
Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2021-09-17 12:54:50 +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
sureshanaparti
191424431d
server: Updated the event message with proper json format for cmd info and job result. (#5453) 2021-09-17 10:31:48 +05:30
davidjumani
f0eac35e3d
kvm: Add check if host meets the minimum requirements (#5369)
* kvm: Add check if host meets min req

* Fix typo

* Update serviceConfig.py

* Remove obsessive checks

* Update error message
2021-09-17 10:21:05 +05:30
Abhishek Kumar
981dac7bca
server: allow listing custom offerings for a running VM (#5420)
* server: allow listing custom offerings for a running VM

listServiceOffering API when called for a running VM only fails to list all possible offerings especially the custom offerings and all offerings when VM is deployed using a custom offering.
This improves the list behviour by adding adding appropriate conditions for the custom offerings.

Fixes #5412

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

Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2021-09-17 01:48:24 +05:30
Nicolas Vazquez
3ca3843b02
[Vmware] Fix for ovf templates with prefix (#5448)
* [Vmware] Fix for ovf templates with prefix

* Support multiple hardware versions
2021-09-16 16:16:41 -03:00
dahn
35990d7ca3
tests: move misc tests to broken (#5456)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-09-16 11:10:59 +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
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
Rohit Yadav
4aaa850b63 Updating pom.xml version numbers for release 4.15.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
4.15.2.0
2021-09-10 21:19:58 +05:30
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