34697 Commits

Author SHA1 Message Date
Hoang Nguyen
4916f3c90d
UI - Fix Locked "Override Root Disk Size" switch (#5843)
* Fix Locked "Override Root Disk Size" switch

* fixes ut
2022-01-10 19:04:46 +05:30
Hoang Nguyen
0f926b5d68
UI: Add s3 provider option to create secondary storage (#5726)
* add s3 provider option to create secondary storage

* fixes label name

* add storagepolicy for swift provider
2022-01-10 19:01:53 +05:30
Nicolas Vazquez
946f9156e5
vmware: Persist empty values instead of null (#5748)
This PR allows deploying VMware appliances missing default values on some properties
Fixes: #5747
2022-01-08 08:58:46 +05:30
slavkap
48006de3e3
kvm: Set RAW format to RBD DATADISK (#5801)
While deploying a VM with data disk on Ceph the volume format was in
QCOW2.

Fixes #5531
2022-01-08 08:54:21 +05:30
Abhishek Kumar
feb4343abe
ui: fix create network/vpc offering form (#5840)
* ui: fix create network/vpc offering form

Fixes #5838

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

* fix inlinemode

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-01-08 08:41:58 +05:30
Wei Zhou
84b9b61b9b
api: fix typo in Volume Destroy state - volume can be recovered (#5833)
* api: fix type Destroy volume can be recovered

* Update api/src/main/java/com/cloud/storage/Volume.java

Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-01-07 13:19:26 +05:30
Wei Zhou
6d35b520d3
server: fix vm can be recovered by other accounts (#5822) 2022-01-07 13:13:48 +05:30
Hoang Nguyen
3cbde8cd6c
UI - Hide shrink disk option on XCP-NG/Xenserver (#5829)
* hide shrink disk option on XCP-NG/Xenserver
2022-01-06 17:41:54 +05:30
dahn
2774bc156f
use physical size instead of virtual size for migration. (#5750)
* Use Physical size to evaluate if migration is possible

* Improve logging and consider files skipped as failure in complete migration

* skipped can't be negative

* remove useless method

* group multidisk templates for secstor migration

* use enum

* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Pearl d'Silva <pearl.dsilva@shapeblue.com>
2022-01-06 17:18:50 +05:30
Abhishek Kumar
51f69f7134
server: do not return inaccessible entity details to normal users (#5827)
Fixes #5534

As pre 3.x APIs allow using internal DB IDs, even normal users can use internal IDs.
This fix removes additional information in error message when the caller doesn't have access to the resource.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-01-06 16:42:57 +05:30
Hoang Nguyen
f071873d84
UI: Fix new UI missing 4 parameters when adding a BareMetal host (#5812)
* fix new UI missing 4 parameters when adding a BareMetal host

* remove test options

* add rule for hosttag with baremetal

* fixes password not provided
2022-01-04 15:13:31 +05:30
Rakesh
2bd1dc1e14
Enable resetting config values to default value (#4230)
* Enable resetting config values to default value

Provide reset button to zone,cluster,domain,account,
primary and secondary storage so that config values
can be reset to default value

* fix ui issue

* Update test/integration/smoke/test_reset_configuration_settings.py

* Update test/integration/smoke/test_reset_configuration_settings.py

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-01-03 21:55:30 +01:00
dahn
e06a66ba14
ldap: truststore per domain (#5816)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-01-03 21:01:51 +05:30
Hoang Nguyen
4392cc4d48
ui: refactoring $notification according to the old version (#5819)
Related to PR #5549 changed the notification from $notification to $showNotification. This PR aims to change it back to the way it was for easier use while keeping the delete all button.
2022-01-03 20:59:49 +05:30
dahn
5f93bc8948
assume a property is one when it isn't a number (#5647)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-01-03 12:53:18 +05:30
Wei Zhou
4ba2ad5397
test: fix component test test_configdrive.py (#5528)
* test: fix test_configdrive.py and move it to smoke test

(sleep 30s as vm crashes after migration in ubuntu 20.04)

* Update test/integration/smoke/test_configdrive.py

Co-authored-by: dahn <daan.hoogland@gmail.com>

* test: fix test_configdrive.py

* Update #5528: move back to component test

Co-authored-by: dahn <daan.hoogland@gmail.com>
2021-12-30 16:31:31 +05:30
Hoang Nguyen
10bda8549b
ui: auto-prefill edit tariff label (#5714) 2021-12-30 16:27:56 +05:30
Abhishek Kumar
d7a9873053
ui: fix add network offering for vpc (#5809)
* ui: fix add network offering for vpc

Fixes issues with form related to supported services provider and router service offering when offering to be created for VPC.

Fixes #5807

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

* fix issues getting with making select element update on options change (loop infinity) (#72)

* fixes

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

Co-authored-by: Hoang Nguyen <hoangnm@unitech.vn>
2021-12-30 16:26:54 +05:30
Hoang Nguyen
eb04a46541
ui: Add clear all notification button (#5549)
* add clear all notification button

* change position set count notify

* get notification count

* set label transliteration

* add margin for notification

* change position of clear notification button
2021-12-30 16:24:17 +05:30
Hoang Nguyen
5eccbc9521
ui: Add footer text option for login screen (#5628)
* add footer text option for login screen

* using single key for policy

* set empty for default policy text

* rename footer text key

* rename the footer text property name

* change position avoid breaking with docHelp

* change position of properties
2021-12-30 16:21:40 +05:30
Wei Zhou
8952cd5955
kvm: add hosts using cloudstack ssh private key (ccc21 hackathon) (#5684)
This PR provides the option to add kvm hosts with empty or wrong password.
To support this, the cloudstack ssh public key needs to be added in the ~/.ssh/authorized_keys on host.

Feature work:

1. get cloudstack public key from management server (/var/lib/cloudstack/management/.ssh/id_rsa.pub)

![image](https://user-images.githubusercontent.com/57355700/141449653-85f644b5-c32e-44ca-9c6b-77570262c046.png)


2. add the key to ~/.ssh/authorized_keys on kvm hosts

![image](https://user-images.githubusercontent.com/57355700/141449722-e906eea5-74fd-4f81-a4d3-41563beeb79c.png)

3. add kvm host with empty password

<img src="https://user-images.githubusercontent.com/57355700/141449865-6ffee1f0-b0d7-4ea4-b11a-32df42e2fe91.png" height="50%" width="50%">

Tested as:
1. add host, with correct password,  works as expected.
2. put host to maitenance, stop cloudstack-agent, cancel maintenance, remove the host. all work.
3. add host, with empty password (ssh public key is added to  ~/.ssh/authorized_keys),   works as expected.
4. put host to maitenance, stop cloudstack-agent, cancel maintenance. all work as expected.
2021-12-30 16:20:04 +05:30
Wei Zhou
9798fa08b5
kvm: support qemu-system-x86>=5.2 (#5755) 2021-12-30 16:16:08 +05:30
Nicolas Vazquez
c0ddda361a
[VMware] Fix service offerings listing on appliances deployment options (#5752)
* Fix list service offerings for VMware deployment options

* UI fix to allow selecting offerings
2021-12-30 16:13:41 +05:30
Marcus Sorensen
dcdcd09058
Randomize managed volume copy host (#5789)
* Randomize managed volume copy host

* Managed volume copy was always returning first host that could see storage pools

* Fix null value in logging for ScaleIOPrimaryDataStoreDriver due to if/else logic error

Signed-off-by: Marcus Sorensen <mls@apple.com>

* Use String.format for ScaleIO debug message

Signed-off-by: Marcus Sorensen <mls@apple.com>

* Update debug message for ScaleIO copy methods

Signed-off-by: Marcus Sorensen <mls@apple.com>

Co-authored-by: Marcus Sorensen <mls@apple.com>
2021-12-30 16:11:00 +05:30
Gabriel Beims Bräscher
62089767f6
Fix UI issue 5777 Root disk size is not shown as 'Disk Size' on VM deployment. (#5796)
In the UI, when selecting a service offering that has a root disk enforced, stills show the root disk size of the template (or the custom size gave by the user). This PR fixes this issue, that thas been reported in #5777.
Fixes: #5777
2021-12-30 15:21:11 +05:30
Abhishek Kumar
d13057ace5
ui: show tags only for supported resources (#5798)
* ui: prevent incorrect tags displa for primary storage

Tags in info card of the UI are related to tags functionality(create/delete/lsitTags API)
UI was incorrectly showing storage tags as these tags in the UI.

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

* remove logging

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

* ui: show tags only for supported resources

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-12-30 15:20:37 +05:30
Rohit Yadav
6728b696cd
kvm: don't always force scsi controller for aarch64 VMs (#5802)
* kvm: don't force scsi controller for aarch64 VMs

This would allow use of virtio disk controller with Ceph, etc or as
defined in the VM's root disk controller setting, rather than always
enforce SCSI.

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

* remove test that doesn't apply now

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

* address review comment

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-12-30 15:19:32 +05:30
Pearl Dsilva
9a5a0738b0
ui: Fix configure Sticky policy form (#5814) 2021-12-30 10:31:24 +01:00
Hoang Nguyen
ae62e1dd5e
fixes cannot add new port forwarding rules after auto select VM next time (#5690) 2021-12-30 09:53:51 +01:00
Wei Zhou
7823868746
network: update ip in lb/pf/dnat tables when update vm nic ip (#5757)
* network: update ip in lb/pf/dnat tables when update vm nic ip

* Update: create 3 separated methods for DNAT/LB/PF update

* Update: invert if condition to reduce code indentation
2021-12-28 01:35:29 +05:30
Gabriel Beims Bräscher
19325d0286
Change UI VM deployment to show SSH keys only if user has keys (#5804) 2021-12-28 01:23:36 +05:30
Rakesh
8ba5b92a83
server: Fix NPE while deleting a domain (#5753)
* server: Fix NPE while deleting a domain

While deleting a domain, if vlan ip range cant be found
then this will throw NPE. Just return false if vlan ip
range cant be found

* return true if vlan is not found

* change output message

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2021-12-28 01:21:43 +05:30
Rakesh
9607ae9639
server: Fix NPE while adding network to VPC (#5723)
* server: Fix NPE while adding network to VPC

Sometimes adding network to VPC fails because of libirt error.
In that case the new network wont have any VR's associated with it
and hence it will return null.

* use collectionutils

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
2021-12-25 19:57:18 +05:30
Hoang Nguyen
12d95a2027
Remove unused gravatar fetch (#5806) 2021-12-24 17:07:14 +05:30
sureshanaparti
9b0a1418ec
Provision to sort ISOs from UI, and Updated Templates/ISOs API response to return in the order of sortkey (#5800) 2021-12-24 12:44:50 +05:30
dahn
f03ed8c721
cleanup of unused code and cleanup of cleanup procedure (#5562)
* cleanup of unused code and cleanup of cleanup procedure

* remove unnecessary egress rule

* remove rule and add rule removal

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-12-23 10:10:38 +05:30
sureshanaparti
39e41f6b6e
Allow force reboot VM from user account, to start VM on the same host (#5791) 2021-12-22 17:43:02 +01:00
Pearl Dsilva
936ebbb90f
api: Fix search cluster by name (#5782) 2021-12-22 10:41:06 +05:30
Gabriel Beims Bräscher
995ce06cb7
Enhance log message in FirstFitPlanner (#5762)
* Enhance log message in FirstFitPlanner

When cluster reached capacity threshold the message is:
"capacity threshold defined at each cluster/ at global value for capacity Type : 0"

Admins hardly remember the Capacity Type and it can take a while to look at which is the resource for the respective ID. This enhancement addes log message pointing to the capacity name (e.g. Memory / CPU) as well as global settings parameter name and value to be looked at.

* Change formatation in String 'warnMessageForClusterReachedCapacityThreshold'
2021-12-22 10:10:40 +05:30
Hoang Nguyen
29c7518613
UI: Fixes error when delete domain (#5710)
* fixes error when delete domain with polljob response not have jobstatus

* fix listdomain not refresh after deleted
2021-12-20 12:35:32 +05:30
Daniel Augusto Veronezi Salvador
79d924f3ee
Insert correct template size when live migrating VM with volumes (#5758)
Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2021-12-16 20:21:38 +05:30
Wei Zhou
cc856277de
UI: fix create Isolated/L2 network form (#5779) 2021-12-16 11:24:11 +05:30
Gabriel Beims Bräscher
8ace2722e7
Set length for parameters that expect a list of domain ids. (#5763)
Currently, when updating a service offering there is a limitation of the number of domains the offering can be updated.

Multiple domain ids lead to the following API error:
Error: (HTTP 431, error code 9999) Unable to execute API command updateserviceoffering due to invalid value. Value greater than max allowed length 255 for param: domainIds"
2021-12-15 13:38:15 +05:30
Wei Zhou
d49f67ceb9
travis: install python3-setuptools (#5767) 2021-12-13 16:22:21 +01:00
dahn
8bc69e919c
conditional broadcastUri (#5745)
* conditional broadcastUri

* add filter to keep order and apply to details as well

* use global isAdmin method

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-12-08 10:27:58 +05:30
dahn
a47e53fcee
internal ref replaced by uuid (#5738)
* internal ref replaced by uuid

* remove all internal DB IDs from usage records

* remove superfluent .append(")")

Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-12-07 10:09:38 +05:30
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
Hoang Nguyen
19880687b7
UI fix: button next not working when adding more physical networks (#5734) 2021-12-06 12:31:38 +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
Wei Zhou
a277e4e08c
server: fix non-root users are able to list system networks by id (#5729) 2021-12-03 10:36:33 +01:00