3833 Commits

Author SHA1 Message Date
Pearl Dsilva
cd3851946b
tests: Fix k8s test failures on VMware (#4896)
This PR fixes the k8s test failures noticed on vmware.

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-04-09 12:34:10 +05:30
Nicolas Vazquez
35b20b2367
vmware: Fix worker VM hardware version format (#4851)
This PR fixes a small bug when explicitly setting VM hardware versions lower than version 10.

Vmware expects the hardware version in format: vmx-DD where DD is a two-digit representation of the virtual hardware version. For hardware version lower than 10, CloudStack was not using to digits for the hardware version number, which ended up on an error while creating worker VMs. (vmx-8 for example instead of vmx-08)
2021-04-06 16:28:52 +05:30
slavkap
52c36cadf0
kvm: Fix deploy VM from ISOs with UEFI (#4773)
This PR fixes #4244
deploying of VMs from ISOs and from templates with UEFI boot type
deploying of VMs from ISOs and from templates with UEFI boot type with
volumes in RAW format
2021-04-06 15:00:21 +05:30
Rohit Yadav
6c3f4b43aa Merge remote-tracking branch 'origin/4.14' into 4.15 2021-04-05 14:58:41 +05:30
Abhishek Kumar
6048afb464
xenserver: retrieve correct name-label for presetup store (#4816)
Fixes #4729

As reported in the issue ACP 4.7 used a normal UUID in db for a presetup primary store on Xenserver.
Later the value has been changed to store's path with '/' removed.
Current changes try to retrieve SR's name-lable from store's path if UUID doesn't match path field for a pre-setup store.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-04-05 14:28:27 +05:30
Wei Zhou
09428380f7
kvm: remove unnecessary new String (#4870)
Thanks @rubieHess to point it out.
see #4800 (comment)
2021-04-04 13:08:29 +05:30
Pearl Dsilva
97176690b8
server: Fix issue with volume resize on VMWare (deploy as-is templates) (#4829)
This PR fixes the issue pertaining to volume resize on VMWare for deploy as-is templates. VMware deploy as-is templates are those that are deployed as per the specification in the imported OVF. Hence override root disk size will not be adhered to for such templates. Moreover, when we deploy VMs in stopped state and resize the volume, the root disk doesn't get resized but the volume size is merely updated in the DB.
This PR also includes the following (for deploy as-is templates):
- Disables overriding root disk size during VM deployment on the UI
- Disables selection of compute offerings with root disk size specified, at the time of deployment
- Provided users with the option to deploy VM is stopped state via UI (so as to give an option to users to resize the volumes before starting the VM)

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2021-03-29 12:54:47 +05:30
Wei Zhou
952b242722
kvm: Do not set backing file format of DATADISK in vm start/migration (#4800)
* kvm: Do not rebase DATADISK in vm start/migration

* #4800: add comment and use isBlank
2021-03-24 20:22:51 +01:00
Rohit Yadav
97c1b7278f Merge remote-tracking branch 'origin/4.14' into 4.15 2021-03-04 15:02:24 +05:30
Abhishek Kumar
f893c5c0e3
cks: fix token TTL, set it to never expire (#4747)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-03-04 15:00:41 +05:30
Abhishek Kumar
f8ad3adaff
cks: use HttpsURLConnection for checking api server (#4639)
* cks: use HttpsURLConnection for checking api server

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

* ignore ssl certificate validation

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-03-02 12:39:51 +05:30
Rohit Yadav
fa067e02a7 Updating pom.xml version numbers for release 4.14.2.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-03-02 12:32:27 +05:30
Rohit Yadav
2e36e905d9 Tagging release 4.14.1.0 on branch 4.14.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEXtHhEi3F6KSkURLCSEJIIQ7j2IQFAmAhGGIACgkQSEJIIQ7j
 2IQN7RAAtyIlEUYp0X0KABNJKaAFOCy/GkBxETTmkjYgMNMX1GOj16F8X3ZXAJ/D
 q0ZBBsvLu62WmTzG6hWTMllFz0w5HRl4X4lObDnBci1u35oa+f6KUh0tyWsAYgWM
 qsIAtePcudJA60MOPwffTZjkxwTUNl2fjwCOxCBOLLTiIa6F0DA4zjNQ4L1/frSS
 KefQt9UDM5GsGrZIGlZIwFD7aqL6PIilxh++3PfCseAUPY6FZiHDYNwN1gPWkziM
 vjQbJyT5cmZdcCs7vlm3fcKYIvXL5S3p64C80L5U/NMdcYQ1mHabwZGQTsTkhDt3
 a7aeXBKIm/V8Aeq3jIRCtNb2m0qiIjmxlLrYRQaUfyIhCU9jRO4gWMzneLVoeUtY
 UACzTpFJvAgSR8viYwtlKgBCbiRVvcJgaPR58pIroiUvc2TIaERw121u4wxDVT5Z
 JqX4zpJjuhXcClHPis6AV8AISjftAbSl24D+IoL0rUn2w3/oH1dMrfkIPPF0wbDw
 /0pwvGHCwXZ5sBqos+OSy1ChPt8KiKHfWDRrHQm5TLDk738uuUV4hf6v4OMKa3Hy
 Tyu/9ZDZbLGBdYit6R7DHWPJ0/y5J+zC7Opt9ufqP3dH6ZIV+j0yvqs9HQJMvZ7F
 LuPcjjWVq2tXnSeLBzjkBTvCrpejb6MJyPO8mcLKw1+BRM93XZY=
 =jGff
 -----END PGP SIGNATURE-----

Merge tag '4.14.1.0' into 4.14

Tagging release 4.14.1.0 on branch 4.14.
2021-03-02 12:30:08 +05:30
Rafael Weingärtner
569720fcc2 Merge forward PR#4668 of Branch 4.14 on branch 4.15 2021-02-25 21:15:21 -03:00
Rafael Weingärtner
7be87f1cf8 Merge forward PR#4668 of Branch 4.13 on branch 4.14 2021-02-25 21:01:18 -03:00
Daniel Augusto Veronezi Salvador
e1f3179446
Adjust tests to fix a problem with the container builders (https://github.com/khos2ow/cloudstack-deb-builder) (#4668)
* Changes to allow builders containers to build ACS

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-02-25 20:28:11 -03:00
Abhishek Kumar
88337bdea4
server: fix finding pools for volume migration (#4693)
While finding pools for volume migration list following compatible storages:
- all zone-wide storages of the same hypervisor.
- when the volume is attached to a VM, then all storages from the same cluster as that of VM.
- for detached volume, all storages that belong to clusters of the same hypervisor. 

Fixes #4692 
Fixes #4400
2021-02-25 22:13:50 +05:30
Greg Goodrich
af0f6422ec
kvm: Suspending the VM prior to deleting snapshots to avoid corruption, th… (#4032)
These changes are related to PR #3194, but include suspending/resuming the VM when doing a VM snapshot as well, when deleting a VM snapshot, as it is performing the same operations via Libvirt. Also, there was an issue with the UI/localization changes in the prior PR, as that PR was altering the Volume snapshot behavior, but was altering the VM snapshot wording. Both have been altered in this PR.

Issuing this in response to the work happening in PR #4029.
2021-02-25 22:11:00 +05:30
Wei Zhou
db1e0f49dc
kvm: set Backing Format of qcow2 images in vm start and migration (#4656)
In previous cloudstack versions, qcow2 image does not have a backing file format.
however, it is required in newer qemu versions, for example qemu 4.2 on ubuntu 20.04.

steps to reproduce the issue
(1) install cloudstack 4.14 or previous version, and ubuntu 19.04 or 18.04/16.04 LTS.
(2) create vms.
(3) upgrade to 4.15, upgrade os to ubuntu 20.04 , or install a new server with ubuntu 20.04.
(4) migrate vm from old ubuntu version to ubuntu 20.04, failed with exception below
```
2021-02-04 13:43:07,397 DEBUG [resource.wrapper.LibvirtMigrateCommandWrapper] (agentRequest-Handler-1:null) (logid:93da9385) ExecutionException : org.libvirt.LibvirtException: Requested operation is not valid: format of backing image '/mnt/03b6f487-9eaf-38bf-ad2d-d985423b832f/66990fcc-fd98-4932-9649-989bf6583d59' of image '/mnt/03b6f487-9eaf-38bf-ad2d-d985423b832f/a3dd1f0f-2557-4e07-951c-e4eb7b3f38b2' was not specified in the image metadata (See https://libvirt.org/kbase/backing_chains.html for troubleshooting)
```
(5)stop vm, and start it on ubuntu 20.04 server. failed with exception below
```
2021-02-04 13:46:29,766 WARN  [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-5:null) (logid:b54745a7) LibvirtException
org.libvirt.LibvirtException: Requested operation is not valid: format of backing image '/mnt/03b6f487-9eaf-38bf-ad2d-d985423b832f/66990fcc-fd98-4932-9649-989bf6583d59' of image '/mnt/03b6f487-9eaf-38bf-ad2d-d985423b832f/a3dd1f0f-2557-4e07-951c-e4eb7b3f38b2' was not specified in the image metadata (See https://libvirt.org/kbase/backing_chains.html for troubleshooting)
```

To make testing easier, step 1 and 2 can be replaced by
```
qemu-img create -f qcow2 -b <backing file> <qcow2 image>
```
so qcow2 image does not have a backing file format.
2021-02-19 14:06:47 +05:30
Pearl Dsilva
d6509f0a21
API discovery: Prevent overwrite of API parameters in case the API names are the same (#4609)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2021-02-18 14:37:20 +05:30
Rohit Yadav
66f0beda5f Updating pom.xml version numbers for release 4.14.1.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-02-08 16:24:09 +05:30
Daan Hoogland
b6b778f003 Merge release branch 4.14 to 4.15
* 4.14:
  server: select root disk based on user input during vm import (#4591)
  kvm: Use Q35 chipset for UEFI x86_64 (#4576)
  server: fix wrong error message when create isolated network without SourceNat (#4624)
  server: add possibility to scale vm to current customer offerings (#4622)
  server: keep networks order and ips while move a vm with multiple networks (#4602)
  server: throw exception when update vm nic on L2 network (#4625)
  doc: fix typo in install notes (#4633)
2021-02-01 09:57:35 +00:00
jairov4
e9dda98a87
kvm: Use Q35 chipset for UEFI x86_64 (#4576)
Fix #4245

This PR uses Q35 chipset for UEFI in x86_64.
Currently this mistakenly only enabled for secure boot
2021-02-01 14:22:29 +05:30
div8cn
c9a1d300cb
kvm: Fix RBD primary storage host port null error (#4565)
Add RBD main storage through UI, it will fail when there is no host port parameter;
Because when we created the pool, we did not add the port target in the xml
2021-01-14 06:20:16 +05:30
Rohit Yadav
b482da8c91 Updating pom.xml version numbers for release 4.15.1.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-11 13:58:30 +05:30
Daan Hoogland
280c13a4bb Updating pom.xml version numbers for release 4.15.0.0
Signed-off-by: Daan Hoogland <dahn@onecht.net>
2021-01-05 15:51:02 +00:00
Rohit Yadav
c82688a355
kvm: Fix double-escape issue while creating rbd disk options (#4568)
This fixes issue introduced in c3554ec31dafbdfaa0ed646afb17a6f3378571f5
which enable block of code that will double escape rados host/monitor
port.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-01-05 15:23:38 +05:30
Daan Hoogland
81e9e6809b Updating pom.xml version numbers for release 4.15.1.0-SNAPSHOT
Signed-off-by: Daan Hoogland <dahn@onecht.net>
2021-01-04 11:34:46 +00:00
Daan Hoogland
01b3e361c7 Updating pom.xml version numbers for release 4.15.0.0
Signed-off-by: Daan Hoogland <dahn@onecht.net>
2020-12-23 16:32:25 +00:00
Alexandru Bagu
fdb2ee3165
storage: Fix hypervisor type cast to string (#4516)
This PR addresses an error that appears when you try to add a new host. I don't even understand why there was a cast to String in the first place. I will assume some classes send HypervisorType and some send a string (empty or otherwise). Shouldn't this be addressed to use the same type everywhere? With this fix adding a new xenserver host works fine.

Co-authored-by: dahn <daan.hoogland@gmail.com>
2020-12-14 11:56:44 +05:30
lujiefsi
2aa7fac9ac
CLOUDSTACK-10423:Potential sensitive information disclosure (#4536)
* fixing CLOUDSTACK-10423

* make the message clear

Co-authored-by: lujie <lujie@foxmail.com>
2020-12-14 11:40:23 +05:30
Rohit Yadav
e5b7733498 Merge remote-tracking branch 'origin/4.14'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-12-10 14:58:23 +05:30
Wei Zhou
1a47719588
kvm: set cpu topology only if cpucore per socket is positive value (#4527)
This PR fixes a regression issue in #4497

In cloudstack 4.14 or before, the cpu topology is set only when cpucore per socket is set (to 4 or 6).
in other conditions, there is no cpu topology in vm xml definition.

with #4497, vm will have cpu topology in its xml definition, if cpucore per socket is not set.

    <topology sockets='<vm cpu cores>' cores='1' threads='1'/>
Not sure if it causes any issue. I think it would be better not to add this part in vm xml definition if cpucore per socket is not set.
2020-12-10 14:29:28 +05:30
Rohit Yadav
e0242d5793
xenserver: check and eject patch vbd for systemvms (#4525)
XenServer 7.1 has an file descriptor/tapdisk iso-caching issue where new systemvm.iso are not recognised and inside the VR/ssvm/cpvm file IO error is seen. This was only reproducible with XS7.1 (intermittently), the fix was to check and eject the systemvm.iso (old/stale/cached), then insert the new systemvm.iso and then eject it.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-12-10 00:42:41 +05:30
Wei Zhou
93f3d35207
kvm: FIX cpucorespersocket is not working on KVM (#4497) 2020-12-09 15:07:51 +01:00
Alexandru Bagu
cd356c0513
change debug to warn for unknown exceptions (#4521)
Co-authored-by: Alexandru Bagu <abagu@bsss-MacBook-Pro.local>
2020-12-09 12:24:54 +01:00
Harikrishna
51034be270
Fix migrateVMwithVolumes API in case of multiple volumes on VMware (#4480)
Problem:
When migrateVMwithVolumes API is tried on a VM with two volumes to migrate to a different host and tried to migrate only one volume, Cloudstack migrates both the Volumes but then marks only one of them migrated. This makes volume inaccessible due to inconsitency in path of volume in cloudstack and vsphere

Solution:
Set the target datastore in relocate spec properly for each volume
2020-11-20 12:38:06 +00:00
Daan Hoogland
4fd2b74f57 Merge branch '4.14' 2020-11-20 08:59:51 +00:00
Pearl Dsilva
daec77f2ef
Fix k8s cluster upgrade in shared networks (#4458)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-11-20 08:33:06 +00:00
davidjumani
a3f2ee431f
Fixing misleading HostMetricsResponse param description (#4485) 2020-11-20 08:09:41 +00:00
Pearl Dsilva
1692df421c
cks: Fix destroying k8s cluster on shared networks (#4461)
* Fix destroying k8s cluster on shared networks

* Extracted code

Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-11-19 04:51:57 +05:30
Spaceman1984
87e1fa9e02
Removed sensitive info from UI/API when volume attach/detach fails (#4476)
* Removed sensitive info from UI when attach/detach fails

* minor formatting change
2020-11-19 04:39:37 +05:30
Rakesh
735b6de296
Cleanup download urls when SSVM destroyed (#4078)
Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
2020-11-18 14:01:31 +01:00
Pearl Dsilva
fb78fb24c7
fix login issue post upgrade (#4465)
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
2020-11-12 13:09:25 +00:00
davidjumani
45f7b33fa9
Returning nic details in KubernetesClusterResponse (#4456) 2020-11-11 09:05:45 +01:00
davidjumani
26272580f3
Adding public ip to listKubernetesClusterResponse (#4414) 2020-10-28 09:47:37 +01:00
davidjumani
8a8947aa1e
Including instance details in KubernetesClusterResponse (#4420) 2020-10-27 14:44:44 +01:00
davidjumani
86f2b796cf
CKS : More log changes from uuid to name (#4415) 2020-10-27 07:45:43 +01:00
nvazquez
7d7e7f7941 Check there is at least a host to verify pool compatibility for a storage policy 2020-10-26 09:07:23 -03:00
nvazquez
85f5512ec3 Fix unit test failure 2020-10-25 02:53:43 -03:00