36012 Commits

Author SHA1 Message Date
Abhishek Kumar
588287af17
test: use normal user for createing networks, vpcs (#6988)
When using admin=True in account creation with domain it creates a domain admin. It would be better to run tests as normal user.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-19 11:19:56 +01:00
Abhishek Kumar
87b25b94f5
scripts: parametrize systemvm, router restart (#6574)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-19 11:16:22 +01:00
dahn
41717b0977
allow a new upgrade version without DB changes to be inserted (#6858) 2022-12-19 11:03:07 +01:00
Nicolas Vazquez
43b4525f71
[VMware] Remove unnecessary logs on VM deployments (#6996) 2022-12-19 11:01:51 +01:00
Abhishek Kumar
fb22c5c3c9
kvm: correctly set vm cpu topology (#6870)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-19 11:01:10 +01:00
Rodrigo D. Lopez
96aaeac2a0
Fixes script that perform change password on hosts (#6783)
Co-authored-by: Lopez <rodrigo@scclouds.com.br>
2022-12-16 17:21:44 +01:00
Rohit Yadav
239e9dd861 Merge remote-tracking branch 'origin/4.17' into main 2022-12-16 15:37:41 +00:00
Rohit Yadav
458883575a Updating pom.xml version numbers for release 4.17.3.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-16 15:25:16 +00:00
Alexandre Mattioli
1af4f2c47a
Rephrasing confusing messages (#6876) 2022-12-16 12:18:18 +01:00
Rodrigo D. Lopez
2ed7868f27
Inserts timer in check detach volume (#6508)
Co-authored-by: Lopez <rodrigo@scclouds.com.br>
Co-authored-by: Stephan Krug <stekrug@icloud.com>
2022-12-16 09:35:27 +01:00
dahn
162af93e11
make api rate limit test more robust (#6984)
* make api rate limit test a little more robust

* Update condition for time exeeded
2022-12-16 08:49:17 +01:00
Rodrigo D. Lopez
fc5bd85ecb
Improves CPU usage info (#6784)
* improve CPU usage info

* Update ResourceStatsInfo.vue

remove extra comma

* fixes missing chart message

* fix typo

Co-authored-by: Lopez <rodrigo@scclouds.com.br>
2022-12-15 15:33:32 -03:00
GaOrtiga
8fd4ed88c2
delete configuration task.cleanup.retry.interval (#6910)
* fix range of configuration `task.cleanup.retry.interval`

* delete unused configuration

* fix on sql

* add name of the PR to the sql

Co-authored-by: Gabriel Ortiga Fernandes <gabriel.fernandes@scclouds.com.br>
2022-12-14 18:09:02 -03:00
Rohit Yadav
5b9a989ab0 Updating pom.xml version numbers for release 4.17.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
4.17.2.0
2022-12-14 05:22:52 +00:00
Rohit Yadav
f7f03adddb Merge remote-tracking branch 'origin/4.17' into main 2022-12-14 05:21:35 +00:00
Abhishek Kumar
0075717612
api: fix listVirtuaMachinesMetrics API for user (#6985)
Fixes #6983

In case of multiple classes for and API class, ApiServer returns an API command class for User role only when ResponseView is set to Restricted in annotation.
This PR set Restricted ResponseView for ListVMsMetrics class. It also adds a smoke test for User role account for the listVirtualMachinesMetrics API.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-14 10:48:40 +05:30
John Bampton
def7ce655d
Fix spelling (#6898)
Co-authored-by: davidjumani <dj.davidjumani1994@gmail.com>
2022-12-13 14:58:14 +01:00
dahn
3106dba28c
git-pr py3 compatible (#6961)
* py3 print statement

* python3
2022-12-13 15:45:13 +05:30
Marcus Sorensen
f2e7d6b90e
Allow ssvm agent certs to contain host IP for NAT situations (#6864)
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-12-13 10:58:43 +01:00
Rohit Yadav
72b6ab9c51 Merge remote-tracking branch 'origin/4.17' into main
Due to merge conflict, and schema changes in 4.17 branch the previous
4.17.1->4.18.0 DB upgrade path class was renamed to 4.17.2->4.18.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-13 07:50:36 +00:00
Rohit Yadav
d331b2f98f
schema: Add upgrade path from 4.17.1.0 to 4.17.2.0 (#6981)
This implements a blank/noop upgrade path from 4.17.1.0 to 4.17.2.0
which implements DbUpgradeSystemVmTemplate to kick the systemvm template
upgrade.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-13 12:42:20 +05:30
Rohit Yadav
01b79e797c Merge remote-tracking branch 'origin/4.17' into main
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-12 14:16:31 +00:00
Abhishek Kumar
5516f74fce
systemvm: fix management route (#6921)
Fixes #6873
When the management server is in a different subnet than the pod in which a VPC VR is deployed, an ip route must be added just after creation of eth0 to allow the connectivity between the VR and the management server.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-12 17:41:54 +05:30
Rohit Yadav
1be7c2f348 Merge remote-tracking branch 'origin/4.17' 2022-12-12 13:29:28 +05:30
slavkap
66747d04c4
storpool: fix on remove the Iops limits (#6902)
Remove the Iops limits when resizing a volume with disk offering without iops limits or with a custom Iops limits in offerings.
2022-12-12 12:53:54 +05:30
Stephan Krug
90203934ec
server: Fix double ServiceOfferingDao (#6911)
This PR fixes a double declaration of ServiceOfferingDao in UserVmManagerImpl.

Co-authored-by: Stephan Krug <stephan.krug@scclouds.com.br>
2022-12-12 12:51:28 +05:30
Wei Zhou
0b49142747
debian: add python3-setuptools to dependencies (#6930)
This PR fixes the marvin build error for ubuntu
2022-12-12 12:49:49 +05:30
SadiJr
19a4e9dd50
veeam: Fix escape powershell comand when listing Veeam repository names (#6943)
PR #5774 introduced a functionality to allow operators to choose in which Veeam's repository, if more than one is configured, ACS' clone job will be executed. However, a change was missing in the PR and caused the errors reported in #6599.

This PR addresses the fix for #6599.

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-12-12 12:46:30 +05:30
tt0suzy
8aaa5edaa1
api: fixed flaky test (#6967)
Similar as 6875.

The test org.apache.cloudstack.api.command.test.ResetVMUserDataCmdTest.testUserdataDetails, is a flaky tests. It can pass mvn test but when run using the tool NonDex, it fails. NonDex is a tool that will introduce non-determinism in certain java collections.

The cause of failure is because the test is comparing the string format of two hashmaps, however, as per Oracle's documentation:

The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.

So the result of toString() is non-deterministic. Use hashmap's own equal methods is more reasonable.
2022-12-12 12:44:14 +05:30
Daniel Augusto Veronezi Salvador
ed1ac1c161
schema: Fix migration path (#6927)
PR #5909 was created before the announce of release 4.17.1.0 and the changes in the databases were addressed in the 4.17.0.0 -> 4.18.0.0 migration path. However, #5909 was merged after 4.17.1.0 releasing, with the original migration path.

This PR intends to fix the migration path of PR #5909.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-12-12 12:42:34 +05:30
Rohit Yadav
44e13900e6
schema: Add upgrade path from 4.17.2.0 same as 4.17.1.0 (#6965)
There's no DB upgrade path b/w 4.17.1.0 and 4.17.2.0, this adds the
same upgrade path of 4.17.1.0 when source version is 4.17.2.0.

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

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-12-12 12:38:57 +05:30
Abhishek Kumar
4de66f9855
server: fix listing vm metrics for infra resources (#6851)
Fixes #6786 

listVirtualMachinesMetrics does not support some of the params that are supported by admin API call for listVirtualMachines.
These parameters are used in UI.

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Co-authored-by: Daan Hoogland <daan@onecht.net>
2022-12-12 11:22:07 +05:30
Abhishek Kumar
335e26bb1d
test: fix failure on non-VMware env (#6969)
PR #6964 added some changes for VM import test which are causing exceptions on non-VMware environments. This PR fixes those error and correctly skips unmanage and import tests for non-VMware env.

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-12 10:32:29 +05:30
Abhishek Kumar
7f760cc395
test: add nic validation in import vm test (#6964)
Add smoke test to prevent any regression such as #6951.

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-09 18:10:46 +05:30
Wei Zhou
11d27a5a3a
systemvm: vpc router fix /etc/network/interfaces is misconfigured (#6435)
This PR fixes that the /etc/network/interfaces is misconfigured in VPC VR startup, which causes VPC VR to be stuck for 1 minute and continue working.

The issue is because ifup eth0 and ifdown eth0 do not work when /etc/network/interfaces is not correct in VPC VR.
2022-12-09 18:10:20 +05:30
Abhishek Kumar
b7f845ab13
server: fix nic device id fro imported vm (#6953)
Fixes #6951

Adds deviceid for NICs of an imported VM. Device Id will be set 0..n in the order which they are returned by hypervisor.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-08 22:29:32 +05:30
mprokopchuk
ffe2fa51d5
When VM is created and ROOT volume is created it should emit a VOLUME.CREATE event (#6939)
* When VM is created and ROOT volume is created it should emit a VOLUME.CREATE event

Co-authored-by: Maxim Prokopchuk <mprokopchuk@apple.com>
2022-12-08 09:14:17 -07:00
Wei Zhou
74623aa3d3 Merge remote-tracking branch 'apache/4.17' 2022-12-07 13:37:30 +01:00
Abhishek Kumar
a4d3780143
ui: fix incorrect hypervisor in deploy VM wizard (#6952)
Fixes #6756

Pass hypervisor parameter for deployVirtualMachine API only when ISO is selected and not for a template.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-07 17:40:50 +05:30
Abhishek Kumar
9fd2d82af9
vmware: fix vmware vm snapshot operations for datastorecluster (#6912)
Fixes #6894

Fixes NPE observed when VM volume is present on the same child datastore.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-12-07 14:43:44 +05:30
Rahul Agarwal
90413cb307
client: Improve cloudstack-setup-management message (#6822)
Improve the cloudstack-setup-management output message

Co-authored-by: Rahul Agarwal <rahul.agarwal@shapeblue.com>
Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Co-authored-by: Stephan Krug <stekrug@icloud.com>
2022-12-07 13:17:40 +05:30
GaOrtiga
684f3f4c49
Improvements and cleanup on the javadocs of QemuImg (#6917)
* Cleanup in the javadocs of QemuImg

* Update QemuImg.java

* Apply suggestions from code review

Co-authored-by: Stephan Krug <stekrug@icloud.com>

Co-authored-by: cloudstack-lab-gabriel <gabriel.fernandes@scclouds.com.br>
Co-authored-by: Stephan Krug <stekrug@icloud.com>
2022-12-06 17:59:03 -03:00
João Jandre
7c61d8aeaf
Set root volume as destroyed when destroying a VM (#6868)
* Set root volume as destroyed when destroying a VM

* Address review

* Address review

Co-authored-by: João Jandre <joao@scclouds.com.br>
2022-12-06 17:48:35 -03:00
Wei Zhou
d182eacf86
host affinity: fix vm cannot be started if a vm is stopped in the affinity group (#6936) 2022-12-06 10:05:49 +01:00
Wei Zhou
a63b2aba7a
VM Autoscaling with virtual router (#6571) 2022-12-05 15:23:03 +01:00
Rohit Yadav
3d8ea4f3b3 Merge remote-tracking branch 'origin/4.17'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-11-30 21:02:17 +05:30
Daniel Augusto Veronezi Salvador
cf32f77e3d
systemvm: Fix C2S VPN in parallel to S2S VPN (#6907)
PR #5375, introduced in version 4.15.2.0, removed parameter %any of VPNs client-to-site (C2S) IPSec secrets:

structure before PR vr: ipsec/l2tp vpn secret with no ID selectors #5375:
<IP> %any : PSK "<PSK>"
structure after PR vr: ipsec/l2tp vpn secret with no ID selectors #5375:
<IP> : PSK "<PSK>"
Because of that, when a VPN site-so-site (S2S) is created in parallel to a VPN C2S in the same network, the C2S will not handle any IP (%any) anymore and, as the network is being tunneled to the other VPN, the connection will be handled by the final peer. This way, when a VPN S2S is created in parallel to a VPN C2S in the same network, it is only possible to connect to the C2S with the S2S PSK.

As ACS is only able to implement a single C2S per network (ACS allows setting more than one IP of the network as VPN, however, only the first will be implemented) and every S2S has its own secret file, the secrets structure of C2S was changed to contain only the PSK:

: PSK "<PSK>"
By doing that, StrongSwan will handle correctly C2S connections from any IP and still will use the correct PSK for S2S.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-11-30 18:29:05 +05:30
vivekcek
4abb8b9ebf
python command not working in ubuntu 20.04 for apidocs and marvin (#6889)
Co-authored-by: Vivek Ps <vivekcek@gail.com>
2022-11-30 09:12:03 +01:00
yannizhou05
94fd03df13
fix flaky tests (#6905)
Co-authored-by: Yanni <yz97@illinois.edu>
2022-11-30 08:53:11 +01:00
Abhishek Kumar
47946db888
server: fix volume migration on user vm scale (#6704)
Fixes #6701

When volume migration is initiated by system, account check is not needed.

Introduces a new global setting - allow.diskoffering.change.during.scale.vm. This determines whether to allow or disallow disk offering change for root volume during scaling of a stopped or running VM.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-11-30 12:58:48 +05:30