10877 Commits

Author SHA1 Message Date
Rohit Yadav
5f23171ff3 Merge remote-tracking branch 'origin/4.13' into 4.14 2020-06-23 12:27:48 +05:30
Spaceman1984
97f21c1835
xenserver: Fixed null pointer and deployment issue on Xenserver with L2 Guest network with configDrive (#4004)
This PR fixes an issue where an instance fails to deploy due to a null pointer when using an L2 Guest Network with DefaultL2NetworkOfferingConfigDrive on Xenserver. It also fixes migrating an instance to another host.

This has been tested by:
- Creating an L2 Guest network, using DefaultL2NetworkOfferingConfigDrive as the network offering.
- Deploying an instance using the L2 Guest network created.
- Migrating the instance away from the host and back
2020-06-23 12:21:50 +05:30
dahn
475ae904c0
Update UserVmManagerImpl.java (#4162) 2020-06-22 14:37:43 +02:00
Rohit Yadav
5f695c910d Merge remote-tracking branch 'origin/4.14' 2020-06-18 19:48:45 +05:30
Rohit Yadav
148fab4e43 Merge remote-tracking branch 'origin/4.13' into 4.14 2020-06-18 19:48:12 +05:30
davidjumani
06f3ff0b04
api: listVirtualMachinesMetrics should extend ListVMsCmd instead of ListVMsCmdByAdmin (#4145)
Fixes #4143

Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-06-18 19:47:13 +05:30
Rohit Yadav
a2c92029f5 Merge remote-tracking branch 'origin/4.14' 2020-06-18 09:50:54 +05:30
Rohit Yadav
88c5e6e6df Merge remote-tracking branch 'origin/4.13' into 4.14 2020-06-18 09:50:20 +05:30
harikrishna-patnala
0d4f67ad8c
server: NPE occured when dynamic scaling tried on VM and as part of this when VM tries to migrate if current host does not have capacity. (#3998)
Repro Steps:
1. Create a VM on host1
2. Make host1 capacity full by deploying multiple VMs
3. Try Dynamic scaling on VM on host1
4. NPE occurs when MS tries to find host to migrate the VM and then scale.

Root cause: VM profile is not initiated properly with serviceoffering before planning for deployment

Solution: Iniate VM profile with serviceoffering and also make sure custom compute parameters are handled
2020-06-18 09:19:19 +05:30
davidjumani
e9f59e2fd3
server: Adding showunique parameter to list templates and isos (#4140)
Adds a new parameter showunique to listTemplate and listIsos to return only unique templates / isos across all zones

Fixes #4041
2020-06-18 09:05:36 +05:30
Rohit Yadav
2a82fb99ce Merge remote-tracking branch 'origin/4.14' 2020-06-17 08:10:32 +05:30
Rohit Yadav
0a034da81c Merge remote-tracking branch 'origin/4.13' into 4.14
Fixes build failure due to forward merge

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-06-17 08:06:19 +05:30
Rohit Yadav
090cbf4a44 Merge remote-tracking branch 'origin/4.14' 2020-06-17 07:38:49 +05:30
Rohit Yadav
c94315545f Merge remote-tracking branch 'origin/4.13' into 4.14 2020-06-17 07:38:14 +05:30
Spaceman1984
88d51ce353
server: Restarting all networks that needs a restart in a VPC (#4007)
When a VPC is restarted, the networks in the VPC is not restarted, this PR will add the logic to restart the networks in the VPC that needs a restart when the VPC is restarted.

Fixes #3816
2020-06-17 07:12:04 +05:30
Rohit Yadav
567524a2a5 Merge remote-tracking branch 'origin/4.14' 2020-06-16 13:31:29 +05:30
Rohit Yadav
b54d19b3b9
server: fix TransactionLegacy DB connection leaks due to DB switching by B&R thread (#4121)
BackupSync task would switch between databases to update backup usage
metrics in the cloud_usage.usage_backup table. The current framework
and the usage in ManagedContext causes database connection
(LegacyTransaction) leaks. When the thread runs faster, the issue is
easily reproducible and checking via heap dump analysis or using JMX
MBeans. This fixes by moving the task of backup data updation for
usage data to the usage server by publishing usage events instead of
switching between databases in a local thread while in a
ManagedContextRunnable.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-06-16 13:30:31 +05:30
Rohit Yadav
612100c84a Merge remote-tracking branch 'origin/4.14' 2020-06-16 12:23:23 +05:30
Rohit Yadav
77947f23fd Merge remote-tracking branch 'origin/4.13' into 4.14
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-06-16 12:21:48 +05:30
harikrishna-patnala
5054766d9f
server: Submitting multiple dynamic VM Scaling API commands for the same instance can result in two usage events in the same second causing a compound key violation in usage service (#3991)
Root cause:
Even though dynamic scaling job is handled in vmworkjob queue which ensures serilizing multiple jobs but the database updating and generating usage events are out of the job queue.

Solution:
Moved all updations into the job queue

Firstly I have tested all the scenarios to check if nothing is broken:
Scaling on a running VM with normal compute offering
Scaling on a stopped VM with normal compute offering
Scaling on a running VM with custom compute offering
Scaling on stopped VM with custom compute offering
Scaling on stopped/running VM between custom compute offering and normal compute offering and combinations among these. Checked if the custom parameters have been populated or deleted accordingly based on the offering to which the VM is scaled
Since this is a corner scenario I could not test the exact point where two usage events are recorded at the same time for two different API calls on same VM.
2020-06-16 11:41:14 +05:30
sureshanaparti
185d44a265
server: Check the max data volumes limit using the actual hypervisor version (#4122)
Fix to pick the max data volumes limit using the actual hypervisor version, instead of "default" version. Use the hypervisor version in the host table when product_version parameter in host details doesn't exist or is empty

Fixes #4101
2020-06-15 08:28:57 +05:30
deargopinath
b4937725b0
server: Fix error messages to replace the word 'matches' with 'match' (#3982)
Fixes #3642
2020-06-15 08:27:34 +05:30
Rakesh
20f9639842
api: Display network name for IP in shared networks (#4073)
In the list publicipaddress api call, display the network
name if ip is associated to shared network

Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
2020-06-13 06:00:46 +05:30
Rakesh
1fe96cc426
server: Search VR using redundant state (#4075)
Allow VR's to be searched using its redundant state
Under Infrastructure -> Virtual Routers -> Search box
we can search using "MASTER", "BACKUP" and this will display
the VR's matching the state.

Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
2020-06-12 12:22:31 +05:30
Gabriel Beims Bräscher
6e47c49fbf
server: Fix String.format arguments (#3980)
Simple log fix. I have found out a few log messages that hold unused/misused arguments on their respective String.format building.
2020-06-12 10:28:04 +05:30
Rakesh
f4f238e18e
server: Disable searching by instance name for customers (#4077)
Only admins should be able to search VM by instance name
Customers should not see or serach VM's using the instance name (i-)

Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
2020-06-11 17:22:23 +05:30
dahn
0795cd430b
Boot into hardware setup menu on Vmware (#4021) 2020-06-11 11:47:20 +00:00
Rakesh
6bf3769c09
Display image store disk size used and total disk size in (#4046)
list imagestore api response
2020-06-08 07:05:58 +05:30
Rohit Yadav
220448aa94 Merge remote-tracking branch 'origin/4.14' 2020-06-08 07:02:34 +05:30
Rohit Yadav
cd63d6812f Merge remote-tracking branch 'origin/4.13' into 4.14 2020-06-08 07:01:52 +05:30
Nicolas Vazquez
056e6768a2
server: Cannot migrate VM on PVLAN shared network (#4062)
Fix casting issue.

Fixes #4061
2020-06-08 07:01:11 +05:30
Gabriel Beims Bräscher
597f3cf1de
Enhance KVM running VM snapshot exception log (#4126) 2020-06-04 08:53:49 +00:00
Artem Smotrakov
28a19311f4
server: Enable revocation checking for uploaded certificates (#4065)
This update turns on certificate revocation checking for uploaded certificates:

- Updated `CertServiceImpl` to be able to enable revocation checking.
- Introduced a new parameter `ENABLED_REVOCATION_CHECK` for `UploadSslCertCmd`.
- Updated `CertServiceTest`.

Even if no CLRs are specified via `PKIXParameters`, the certificates
themselves may still provide info for revocation checking:

- The AIA extension may contains a URL to the OCSP responder.
- The CLRDP extension contains a URL to the CLR.

Those extensions may need to be explicitly enabled by setting the system properties `com.sun.security.enableAIAcaIssuers` and `com.sun.security.enableCRLDP` to true. See [Java PKI Programmer's Guide](https://docs.oracle.com/en/java/javase/11/security/java-pki-programmers-guide.html).

Using a revoked certificate may be dangerous. One of the most common reasons why a certificate authority (CA) revokes a certificate is that the private key has been compromised. For example, the private key might have been stolen by an adversary.

If I understand correctly, the `CertServiceImpl` bean is used for operations with certificates on a load balancer. In particular, it validates a certificate chain without revocation checking while uploading a certificate. If a compromised revoked certificate is then used by the load balancer, then it may result to compromising TLS connections. However, the attacker has to be able to implement man-in-the-middle attack to compromise the connections. So the attacker has to be quite powerful. Therefore, such an attack is definitely not easy to implement. On the other hand, the impact may be significant because of loss of confidentiality.

This has been discussed on security@cloudstack.apache.org
2020-06-04 07:47:05 +05:30
Lucas Asth
630d826ce0
cleanup of redundant check for sameOwner (#4110)
Entity ownership is already being verified at line 508.
2020-05-30 13:33:39 +02:00
andrijapanicsb
5f926c3353 Updating pom.xml version numbers for release 4.15.0.0-SNAPSHOT
Signed-off-by: andrijapanicsb <andrija.panic@shapeblue.com>
2020-05-23 10:18:39 +01:00
andrijapanicsb
638a77281c Merge branch '4.14' 2020-05-23 10:14:29 +01:00
andrijapanicsb
05e9b11694 Updating pom.xml version numbers for release 4.14.1.0-SNAPSHOT
Signed-off-by: andrijapanicsb <andrija.panic@shapeblue.com>
2020-05-23 09:59:32 +01:00
davidjumani
1756b0f64a
noVNC console integration (#3967)
* Adding noVNC repo

* Adding support for noVNC

* Adding Ctl+Esc

* Removing device name from novnc header
2020-05-19 14:14:04 +02:00
andrijapanicsb
6f96b3b2b3 Updating pom.xml version numbers for release 4.14.0.0
Signed-off-by: andrijapanicsb <andrija.panic@shapeblue.com>
2020-05-11 15:03:14 +01:00
andrijapanicsb
398e685e01 Updating pom.xml version numbers for release 4.13.2.0-SNAPSHOT
Signed-off-by: andrijapanicsb <andrija.panic@shapeblue.com>
2020-04-29 12:29:12 +01:00
andrijapanicsb
b2ffa3efa5 Updating pom.xml version numbers for release 4.13.1.0
Signed-off-by: andrijapanicsb <andrija.panic@shapeblue.com>
2020-04-23 19:17:09 +01:00
Daan Hoogland
8e4be6dc60 Merge branch '4.13' 2020-04-16 15:27:52 +02:00
dahn
6a72e6e9f8 do not put in default accept rules for DNS and BOOTPS 2020-04-16 15:09:51 +02:00
Sina Kashipazha
208e185714
FIX: prevent empty sshkey name. (#4023)
* FIX: prevent empty sshkey name.

* Move sshKeyName check before database access.

Co-authored-by: Sina Kashipazha <s.kashipazha@global.leaseweb.com>
2020-04-14 16:19:24 +02:00
Daan Hoogland
b984184b7a Merge release branch 4.13 to master
* 4.13:
  Snapshot deletion issues (#3969)
  server: Cannot list affinity group if there are hosts dedicated… (#4025)
  server: Search zone-wide storage pool when allocation algothrim is firstfitleastconsumed (#4002)
2020-04-11 16:45:00 +02:00
Wei Zhou
e0b67a4c68
server: Cannot list affinity group if there are hosts dedicated… (#4025) 2020-04-10 09:10:51 +02:00
Wei Zhou
6bf92fb136
server: Search zone-wide storage pool when allocation algothrim is firstfitleastconsumed (#4002) 2020-04-06 22:01:40 +02:00
Andrija Panic
d52f3f4a6b
Update schema-41310to41400.sql (#3999)
* Update schema-41310to41400.sql

* update desc

* update the config key as well

* Update schema-41310to41400.sql (#4012)

* Update schema-41310to41400.sql

* update configkey desc
2020-04-04 14:07:14 +02:00
Daan Hoogland
66f5ecf908 Merge branch '4.13' 2020-03-28 19:30:17 +01:00
harikrishna-patnala
78fda2d163
With basic zone and VMware hypervisor, VR fails to start since eth1 is getting empty instead of a private IP. (#3977)
Though VMware does not support security groups, but in a basic zone with VMware and no isolation VMs should be able to deploy.

Root cause:
In case of VMware and basic zone control nic is set to 0.0.0.0 assuming control network will be shared with guest network.
But to have access to VMware instances management/private needs to be assigned to it.

Solution:
Assing a private ip even in case of basic zone VMware.
2020-03-27 19:46:01 +01:00