4287 Commits

Author SHA1 Message Date
Marcus Sorensen
f23a4db6d2
kvm: Add usermode interface option to Libvirt Domain XML builder (#6640)
This PR provides constructors and the associated changes to use LibvirtVMDef for creating user mode network interfaces.

While this isn't used directly in the CloudStack KVM agent today, it could be used in the future for e.g. pod networking/management networks without needing to assign a pod IP. The VIF driver used by the CloudStack Agent is also pluggable, so this allows plugin code to create user mode network interfaces as well.

Note that the user mode network already exists in the GuestNetType enum, but wasn't usable prior to this change.

Also included unit test to ensure we continue to create the expected XML.

Additionally, this uncovered a null pointer on _networkRateKBps and this PR fixes it. The decision to add bandwidth throttling assumes this field is not null and simply checks for > 0.

Signed-off-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-08-18 13:14:50 +05:30
Abhishek Kumar
7ae6fdf053 Merge remote-tracking branch 'apache/4.17' into main 2022-08-16 17:51:09 +05:30
Abhishek Kumar
770df60bbe
vmware,cks: fix attachiso failure with vmware drs (#6625)
Fixes #4314

Failure in attaching k8s ISO is seen when VMware DRS is enabled. Log reported VM is not found. This fix tries to find VM on peer hosts when the VM is not found on the given host.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-08-16 16:17:13 +05:30
Abhishek Kumar
d9b770eb48 Merge remote-tracking branch 'apache/4.17' into main 2022-08-12 23:44:42 +05:30
Ruben Bosch
696b93f421
kvm: update host memory stats (#6622)
Fixes #6621

Each time getMemStat() is called, a static value is returned. This value
should instead be refreshed to return the actual memory used.

Co-authored-by: Ruben Bosch <ruben.bosch@cldin.eu>
2022-08-12 17:14:04 +05:30
Rohit Yadav
840c3f6a7a Merge remote-tracking branch 'origin/4.17' 2022-08-10 23:11:09 +02:00
Harikrishna
d3ec27dc79
Fixed Veeam listing restore points (#6555)
Fixes issue #6465 where listing backup restore points are failing with Veeam version v11.0.1.1261.

Though this version is not fully supported for backup and recovery, existing backups, restore points for the VMs can continue to work with the Veeam version v11.0.1.1261. I've created a separate ticket here to fully support the version #6554
2022-08-10 16:59:10 +05:30
slavkap
76f52af8f3
removed the use of SharedMountPoint storage type for the StorPool plugin (#6552)
Fixes #6455

The default storage adaptor - LibvirtStorageAdaptor - is used by different storage types and doesn't use the annotation @StorageAdaptorInfo. In this case, a storage plugin that wants to adopt one of the predefined storage pool types will override the default behaviour. If fixing the issue in general (for new storage plugins or current ones that want to reuse the existing storage pool types) would affect all volume/snapshot/VM cases. This will lead to the need of extensive testing for each storage plugin for which we don't have the resources to do it. That's why this patch fixes the old behaviour for the SharedMountPoint by adding a new storage pool type for the StorPool plugin.
2022-08-10 14:41:32 +05:30
João Jandre
9c63c39371
Add new parameter to createLoadBalancerRule API (#6460)
* Add new parameter to createLoadBalancerRule API

* address review

Co-authored-by: João Paraquetti <joao@scclouds.com.br>
2022-08-08 10:48:21 +02:00
John Bampton
f9347ecf2c
Fix spelling (#6597) 2022-08-03 15:43:47 +05:30
Rohit Yadav
5f04018bf0 Merge remote-tracking branch 'origin/4.17' 2022-07-27 12:41:31 +02:00
Rohit Yadav
441edf3ca7
utils: use safer parsing utility across codebase (#6562)
This addresses SonarQube/SonarCloud quality checks to use safer xml
parser to resist potential XXE attacks.

https://sonarcloud.io/organizations/apache/rules?open=java%3AS2755&rule_key=java%3AS2755

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-27 14:31:51 +05:30
SadiJr
61e4e862c4
[Veeam] externalize restore timeout (#6320)
* [Veeam] add global timeout configuration for backup restore process

* Use 'this'

* Address reviews

* Address reviews

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-07-21 12:17:13 +05:30
Rohit Yadav
c4c4c71591 cherry-pick ce7c3694c82232b5fa08f5a3fa8d5ff2b95542a3
This fixes cherry-pick issue, while merging 4.17.0.1 on 4.17 branch

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-20 16:18:32 +05:30
Harikrishna
d4460a8afc
Scope setting changes in ldap and utils pom.xml files (#6557) 2022-07-20 13:42:44 +05:30
Rohit Yadav
661956cc60 Merge remote-tracking branch 'origin/4.17' 2022-07-20 11:52:26 +05:30
Harikrishna
2c05b63495
kvm: Fix for Revert volume snapshot (#6527)
This PR fixes the issue #6209 where the snapshot revert operation fails after certain volume operations like Migrate VM with volume / migrate volume / reinstall VM.

The root cause of the issue after these volume operations, the primary storage entry is getting deleted for that volume. We have fixed it here to get the primary datastore entry wrt volume and continue the operation.
2022-07-20 11:34:02 +05:30
Bryan Lima
71bc088a70
Improve login time (#6412)
* Improve slow login

* Address review

* Address Daan's review

* Address Daniel reviews
2022-07-20 11:30:17 +05:30
Rohit Yadav
4baaf736b9 Merge remote-tracking branch 'origin/4.17'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-18 19:42:44 +05:30
Rohit Yadav
7a3e97d67e Tagging release 4.17.0.1 on branch b30a4a99d1b530efbf652373eda229f2cd5133b1.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEXtHhEi3F6KSkURLCSEJIIQ7j2IQFAmLRYi0ACgkQSEJIIQ7j
 2ISTWxAAlozJuDMoRnr4D1TDbNCr2hzWSgVn5AK+IZGwnd22OnaZnS7tVQUheTCq
 t9aQgRLb7oUGAzNngHEjDaQBnxlHdLHMKby+QGe+RjX/d9urFoEyHe2xyvCJPkwM
 hFM1uesMqtH/HKwhIL3l8fATGPHlucdhQEZ+XA4bu91IVzxog0gikSnm7SjbaljF
 yYNkn9CgOWtZYFek7lcOM7iuKB79QSdpYxN8PYLpE7esyQSu4KjU4Ekufv1u6Tql
 ILsY5PA5tzzxS7ArfW5PICgSxkXOUIkflBbPHObGgduKw9Q36bmnRM/701lNb2re
 EWE4NMlM2PDn8kKZ2zULD2VBIq5tVdJuZjXbjDyD17z/KiU9pd6hGeHABSitnpDW
 vAS6rLJVY3YT9eqoVDVhpkpFQZmvdfDC8L4nYU2E7dCHj4lF9FlsgYO08SCfSgvP
 InAnfg1jZvbhA9EDL+LiuhxCStn6ZpjRuRCC89hYfRfRM1ZdrT2FazDj8KwPuC0P
 xfEr8eTnMm7xM+B9JCBQ2Lskl3jxQk3KAYQX13LtZCUj05Y1f3crx/iq6t0qIrAH
 PU9keojKMZffLz5MBlFU8qor32stw+uNMky8dZgtDIx6kRjnuYuPYOxpcPDzl+Cs
 KBRcwpIP+GR9mePU8PKBNDClLA45vDE1XqeK6KnOOf7MBSprU5o=
 =ETOD
 -----END PGP SIGNATURE-----

Merge tag '4.17.0.1' into 4.17

Tagging release 4.17.0.1 on branch b30a4a99d1b530efbf652373eda229f2cd5133b1.
2022-07-18 19:40:53 +05:30
Rohit Yadav
4ed1be821c Tagging release 4.16.1.1 on branch b7415bf127ee3317554af752c0f83e2b580dd7bd.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEXtHhEi3F6KSkURLCSEJIIQ7j2IQFAmLQBOkACgkQSEJIIQ7j
 2IS+nRAAl8qEGHMCtbh64Uc517UwsATEZwEqm+s5cWrbi6GpkuJ00ITnchgK1QvY
 q9NQudL548oYWB8pvmeql8eeVJFGx4loh8e32GXdW5dNDcmIC/0YZ7VJFokPuHf6
 79GEDfcui5A15mvIL8DyTSHlZd/6x3LKusfM5Nu3f88B75yy1AkfxH8JcVTM8P9/
 ijtVTpy8zWkBWO+nnFUiwRjcQStOwNKd1jHxoapJIpFlNcUZw2DkRlaVIV7uU+ne
 Z7Y4JAJHzvki4ewkl/F5XwkRPiZlEMXVgEAb4dUmt5hg4GCWQvuDvHDio4fQ6Ws1
 CSNdiSV5rKMxa/fcE4l/oxvZ5oGxA7afbyJWo6Y4/s+UENKmZ3LiehkTptuOTSh0
 rgBTUKO7ZPtYuqD6kwaKYoxL431zYRJsdF1TUnts4nJTQQsWn6JlA3oTsX7nxlte
 qdxRtqmE7NTcpNH/+sU8MDKBYaHEqF3VOfzhw5Ta8ztQhebrGMHPJX0i3ypDBAll
 QEVH+cMpIoo5MQZWRFnIeKW/uTZuEZAMcJ8a/AS7gHSjLtiNGJExE5qvVXVnP8Im
 PruZSmk1ZovQ/XbtN0SD0DDS93CppYFH6fJRAeq6yqkEnYUm+dxFkBvEZqp8nr/X
 Z3vySZlH08+iz3fLlpbkGJRZSUfFXYKrGyZjLaFvKIf0FpedfOM=
 =/arX
 -----END PGP SIGNATURE-----

Merge tag '4.16.1.1' into 4.16

Tagging release 4.16.1.1 on branch b7415bf127ee3317554af752c0f83e2b580dd7bd.
2022-07-18 19:34:32 +05:30
Rohit Yadav
1c7efcbd0d Updating pom.xml version numbers for release 4.17.0.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-15 18:18:40 +05:30
dahn
731a83babf
add global setting to allow parallel execution on vmware (#6413)
* add global setting to allow parallel execution on vmware

* cleanup setting distribution for vmware.create.full.clone

* query setting in vmware guru

* don´t touch other hypervisor's commands

* guru hierarchy cleanup
2022-07-15 10:01:35 +02:00
Rohit Yadav
ce7c3694c8 storpool: fix mvn pom.xml build issue
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-14 17:36:02 +05:30
Rohit Yadav
f27de63644 saml: Safer DocumentBuilderFactory and ParserPool configuration
This implements safer DocumentBuilderFactory and ParserPool utilities
to be used throughout the codebase to prevent potential XXE exploits.

References:
https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8e0e68ef368ebe2793ef80e2c3821eaecb47b593)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-14 17:31:12 +05:30
Rohit Yadav
ebfdef5777 Updating pom.xml version numbers for release 4.16.1.1
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-14 17:28:08 +05:30
Rohit Yadav
b7415bf127 saml: Safer DocumentBuilderFactory and ParserPool configuration
This implements safer DocumentBuilderFactory and ParserPool utilities
to be used throughout the codebase to prevent potential XXE exploits.

References:
https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8e0e68ef368ebe2793ef80e2c3821eaecb47b593)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-14 16:58:08 +05:30
Rohit Yadav
35b5315dae
maven: update dependencies (#6539)
This upgrades mvn dependencies for the project.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-11 20:41:39 +05:30
Rohit Yadav
0cae4406fb Merge remote-tracking branch 'origin/4.17' 2022-07-07 14:37:34 +05:30
Rohit Yadav
3d316546bf
kvm: skip test that can't run and pass on M1 mac (#6537)
This fixes the build issue on M1 mac/osx.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-07 14:36:15 +05:30
Rohit Yadav
7ff3e7f968 Merge remote-tracking branch 'origin/4.17'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-07-06 12:53:45 +05:30
Abhishek Kumar
67e941f690
cks: fix k8s version upgrade (#6513)
Fixes #6514

On latest systemvm template used for CKS /usr/sbin is not present in the $PATH for normal user used during upgrade. This leads to failure for blkid command. Due to this during k8s version upgrade ISO is not being able to mount on the k8s cluster VMs and upgrade process is not carried out.
This PR fixes mounting of k8s version ISO and also returns failure for script when ISO mounting is failed.
Same failure is not seen during deployment of the cluster because setup-kube-system workflow is executed as ROOT user and it has a different value for $PATH.
From /etc/login.defs:

ENV_SUPATH	PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH	PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-07-06 12:34:49 +05:30
Rohit Yadav
e57a0f9980 Merge remote-tracking branch 'origin/4.17' 2022-07-06 09:34:02 +05:30
Luis Moreira
c6b611433b
saml: Fix SAML SSO plugin redirect URL (#6457)
This PR fixes the issue #6427 -> SAML request must be appended to an IdP URL as a query param with an ampersand, if the URL already contains a question mark, as opposed to always assume that IdP URLs don't have any query params.
Google's IdP URL for instance looks like this: https://accounts.google.com/o/saml2/idp?idpid=<ID>, therefore the expected redirect URL would be https://accounts.google.com/o/saml2/idp?idpid=<ID>&SAMLRequest=<SAMLRequest>

This code change is backwards compatible with the current behaviour.
2022-07-06 09:28:37 +05:30
Daan Hoogland
a470f3353a Merge branch '4.17' 2022-07-05 09:11:45 +02:00
John Bampton
7d23a0a759
Fix spelling (#6272) 2022-07-05 09:08:53 +02:00
João Jandre
e467ad02ce
Fix VMware memory retrieval (#6414)
* Fix VMware memory retrieval

* Address review

Co-authored-by: Joao <JoaoJandre@gitlab.com>
2022-07-01 23:36:40 -03:00
Rohit Yadav
6607a98597 Merge remote-tracking branch 'origin/4.17' 2022-07-01 10:44:29 +05:30
Harikrishna
637a102922
Fix for VMware VM migration with volume in local storage (#6483)
* Fix VMware VM migration with volume in case of local storage

* Break the loop once target host is found

* Code optimisations in getting the target host guid for local storage

* Fixed code smells and added unit test
2022-07-01 10:39:02 +05:30
Rohit Yadav
3fc825e246 Merge remote-tracking branch 'origin/4.17' 2022-06-30 12:17:29 +05:30
John Bampton
7ba43e447c
Enable flake8 rule W292 No newline at end of file (#6274)
https://www.flake8rules.com/rules/W292.html
2022-06-30 12:08:27 +05:30
Wei Zhou
a9a2aa953c
CKS: add created to k8s cluster and k8s version (#6446)
This PR adds created info to the response of kubernetes clusters and kubernetes supported version.
2022-06-30 12:03:12 +05:30
SadiJr
ea9124e49c
[KVM improve logs in migrate VM process (#6331)
* Add more logs to migrate VM process in KVM

* Remove unused imports

* Verify if debug is enable before write the log string

* Fix conflicts

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-06-28 08:58:19 +02:00
Wei Zhou
ff7831d751 Merge remote-tracking branch 'apache/4.17' 2022-06-28 08:27:36 +02:00
Suresh Kumar Anaparti
c70bc9d69c
kvm: Updated PowerFlex/ScaleIO storage plugin to support separate (storage) network for Hosts(KVM)/Storage connection. (#6367)
This PR enhances the existing PowerFlex/ScaleIO storage plugin to support separate (storage) network for Hosts(KVM)/Storage connection, mainly the SDC (ScaleIo Data Client) connection.
2022-06-27 14:42:51 +05:30
nvazquez
8333e8fbd7
Fix upgrade version on files 2022-06-06 12:26:52 -03:00
nvazquez
0bcc609f05
Updating pom.xml version numbers for release 4.18.0.0-SNAPSHOT
Signed-off-by: nvazquez <nicovazquez90@gmail.com>
2022-06-06 12:25:35 -03:00
nvazquez
7ed8d54db2
Fix version numbers 2022-06-06 12:22:11 -03:00
nvazquez
038a669d6b
Updating pom.xml version numbers for release 4.17.1.0-SNAPSHOT
Signed-off-by: nvazquez <nicovazquez90@gmail.com>
2022-06-06 12:19:44 -03:00
nvazquez
c56220fcf2
Updating pom.xml version numbers for release 4.17.0.0
Signed-off-by: nvazquez <nicovazquez90@gmail.com>
2022-05-31 14:33:47 -03:00