34226 Commits

Author SHA1 Message Date
nicolas
d2ab350a40 Merge branch '4.15' into main 2021-06-16 15:38:18 -03:00
Wei Zhou
46a3032178
server: set correct gateway when update vm nic on shared networks (#5105)
This PR fixes the issue that nic has wrong gateway after updating vm nic.

Steps to reproduce the issue
(1) create shared network (in advanced zone or advanced zone with sg)
(2) create new shared network (with same startip/endip/netmask, but different gateway).
(3) create a vm in new network
(4) stop vm and update vm nic ip address

Expected result:
The vm has correct gateway and netmask (of second network)

Actual result:
The vm has wrong gateway and netmask (of first network)
2021-06-16 21:19:42 +05:30
Pearl Dsilva
326e03bc9c
ui: Fix typo in error message on login page (#5118) 2021-06-16 17:58:46 +05:30
dahn
2e32c2fcd9
travis: allow big contents from error output in marvin tests (#5113)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2021-06-16 16:25:54 +05:30
sureshanaparti
07cabbe7ac
scaleio: Updated PowerFlex/ScaleIO gateway client with some improvements. (#5037)
- Added connection manager to the gateway client.
 - Renew the client session on '401 Unauthorized' response.
 - Refactored the gateway client calls, for GET and POST methods.
 - Consume the http entity content after login/(re)authentication and close the content stream if exists.
 - Updated storage pool client connection timeout configuration 'storage.pool.client.timeout' to non-dynamic.
 - Added storage pool client max connections configuration 'storage.pool.client.max.connections' (default: 100) to specify the maximum connections for the ScaleIO storage pool client.
 - Updated unit tests.
and blocked the attach volume operation for uploaded volume on ScaleIO/PowerFlex storage pool
2021-06-16 12:45:27 +05:30
Wei Zhou
67182dc49b
vxlan: arp does not work between hosts as multicast group is communicated over physical nic instead of linux bridge (#5078)
* vxlan: arp does not work between hosts as multicast group is communicated over physical nic instead of linux bridge

when linux bridge is setup (refer to http://docs.cloudstack.apache.org/projects/archived-cloudstack-getting-started/en/latest/networking/vxlan.html#configure-product-to-use-vxlan-plugin) and used as the kvm traffic label of physical networks, the vms on different hosts cannot reach each other.

(1) does not work:
```
/usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvxlan.sh -v 1001 -p eth1 -b brvx-1001 -o add
```
"bridge fdb" shows
```
00:00:00:00:00:00 dev vxlan1001 dst 239.0.3.233 via eth1 self permanent
```

(2) this works:
```
/usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvxlan.sh -v 1001 -p cloudbr1 -b brvx-1001 -o add
```
"bridge fdb" shows
```
00:00:00:00:00:00 dev vxlan1001 dst 239.0.3.233 via cloudbr1 self permanent
```

* vxlan: fix issue if kvm network label is not set
2021-06-16 08:52:31 +05:30
Gabriel Beims Bräscher
1c36ea9b4f
Enhance Documentation for changeServiceForVirtualMachine and scaleVirtualMachine (#5101) 2021-06-15 23:25:20 +02:00
Daniel Augusto Veronezi Salvador
e962f0f271
Unify SMTP mail sending (#4954)
* Add mail dependencies

* Create util to send SMTP mail

* Add unit tests to SMTP mail sender

* Use SMTP mail util on quota alert

* Use SMTP mail util on alert

* Use SMTP mail util on project

* Use SMTP mail util on usage alert

* Remove copyright line in license header

Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>

* Remove copyright line in license header

Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>

* Remove copyright line in license header

Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>

* Remove copyright line in license header

Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>

* Remove copyright line in license header

Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>

Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
Co-authored-by: Gabriel Beims Bräscher <gabrascher@gmail.com>
2021-06-15 23:18:26 +02:00
Abhishek Kumar
006d0fe4c4
ui: show read from ova only for ova format (#5108)
Fixes #5107

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2021-06-15 16:58:38 +05:30
fermosan
b6e4329aa3
ui: Greek (Hellenic) translation (#5109)
Modifications in TranslationMenu.vue as well
2021-06-15 15:31:49 +05:30
Gabriel Beims Bräscher
bc12833ccf
server: Failed to scale between Service Offerings with the same root disk size (#5095)
* Cover a case where resizing root disk failed; add isNotPossibleToResize method.

* remove format from resize validation

* Revert if-conditional changes that removed ImageFormat.ISO validation

* Add JUnit tests for VolumeApiServiceImpl.isNotPossibleToResize

* Fix checkstyle of test Class

* Use _templateDao.findByIdIncludingRemoved instead of _templateDao.findById

* Prevent null serviceOfferingView and Mock findByIdIncludingRemoved instead of findById
2021-06-14 12:49:55 +05:30
Abhishek Kumar
9dd0acf8c9
ui: add action syncStoragePool (#5098)
Added action in UI for syncStoragePool API for DatastoreCluster type primary storages.

Fixes #5086

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-06-11 20:07:07 +05:30
Harikrishna
12b2e80d82
vmware: Fix fetching chain_info of the volumes. It is used to assume datastore names are in the form of UUIDs but it can be any name. So fetch chain_info based on the datastore name. (#5097)
his PR fixes the problem of not updating the chain info or setting chain info to null after volume migrations.

Problem: While fetching the volume chain info, management server assumes datastore name to be a UUID (this is true only for NFS storages added by CloudStack) but datastore name can be with any name.
Solution: To fetch the volume chain info, use datastore name instead of UUID.

The fix is made in the flow of following API operations

migrateVirtualMachine
migrateVirtualMachineWithVolume
migrateVolume
2021-06-11 20:06:06 +05:30
Daniel Augusto Veronezi Salvador
bf6266188c
Improve logs on RemoteAccessVpnManagerImpl (#4960)
Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-06-10 16:51:45 +02:00
Daniel Augusto Veronezi Salvador
a5a368e353
Improve logs on ProcessRunner (#4703)
Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
2021-06-10 16:38:41 +02:00
Rohit Yadav
a0788f5816 Merge remote-tracking branch 'origin/4.15' 2021-06-10 12:39:44 +05:30
Nicolas Vazquez
9d9da01626
vmware: Fix lsilogcsas controller for deploy-as-is (#5076)
* Fix lsilogcsas controller for deploy-as-is

* Add virtual scsi controller type

* Rename virtual scsi key
2021-06-10 12:36:53 +05:30
Peinthor Rene
2777391689 maven: Use https for jenkins repo, to fix build with newer maven (#5039)
Maven 3.8.1 blocks non-secure repo connections per default.

(cherry picked from commit f1c83a0b05844fce21e1ba8af31831773ddf239e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-06-10 12:35:44 +05:30
Abhishek Kumar
da382993c3
ui: fix focus in deployvm form (#5089)
Fixes #5087

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-06-09 12:10:01 +05:30
slavkap
b0f2112dc2
kvm: Fix of some UEFI related issues (#5072)
* Fix of some UEFI related issues

1 - fix of attach/detach ISO of VM with UEFI boot type
2 - if OS type of an ISO is categorized as "Other" the bus type of the disk
will be set to "sata"

* Simplify the validation of OS types
2021-06-09 11:15:07 +05:30
Gabriel Beims Bräscher
1afcd823e0
server: Root disk size should be listed in GB at listServiceOffering (#5085)
* Root disk size should be listed in GB at listServiceOffering

* Update UI to handle rootdisk size in GB instead of Bytes
2021-06-09 11:14:18 +05:30
Harikrishna
083646b3c3
server: VM dynamic scaling option granularity (#4643)
This PR introduces new granularity levels to configure VM dynamic scalability. Previously VM is configured to be dynamically scalable based on the template and global setting. Now we bringing this option to configure at service offering and VM level also.

VM can dynamically scale only when all flags are ON at VM level, template, service offering and global setting. If any of the flags is set to false then VM cannot be scalable. This result will be persisted in DB for each VM and will be honoured for that VM till it is updated.

We are introducing 'dynamicscalingallowed' parameter with permitted values of true or false for deployVM API and createServiceOffering API.

Following are the API parameter changes:
createServiceOffering API: 
          dynamicscalingenabled: an optional parameter of type Boolean with default value “true”.
deployVirtualMachine API: 
          dynamicscalingenabled: an optional parameter of type Boolean with default value “true”.

Following are the UI changes:
Service offering creation has ON/OFF switch for dynamic scaling enabled with default value true
2021-06-08 17:10:00 +05:30
Rohit Yadav
1286ffd37b Merge remote-tracking branch 'origin/4.15' 2021-06-08 15:51:38 +05:30
Suresh Kumar Anaparti
958182481e cloudstack: make code more inclusive
Inclusivity changes for CloudStack

- Change default git branch name from 'master' to 'main' (post renaming/changing default git branch to 'main' in git repo)
- Rename some offensive words/terms as appropriate for inclusiveness.

This PR updates the default git branch to 'main', as part of #4887.

Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-06-08 15:47:20 +05:30
Pearl Dsilva
8fe0ff854b
ui: remove redundant columns in list VMs view (#5084) 2021-06-08 13:00:10 +05:30
Rohit Yadav
d10cdb495f Merge remote-tracking branch 'origin/4.15' 2021-06-07 15:34:52 +05:30
davidjumani
d0e3745797
ui: Fix error when no ipv6 address (#5081) 2021-06-07 15:34:33 +05:30
Gabriel Beims Bräscher
3ee563905d
kvm: Check for VLAN or VXLAN in NetworkDaoImpl.listByPhysicalNetworkPvlan (#5074)
This PR fixes #5071; where it was reported an issue when creating a network with VXLAN.
2021-06-05 22:25:01 +05:30
Rohit Yadav
5aefd3e204 Merge remote-tracking branch 'origin/4.15' 2021-06-02 14:03:54 +05:30
Abhishek Kumar
937def533a
ui: fix adduser form (#5063)
AddUser form wrongly shows the account dropdown when adding a user for an account. Account dropdown remains empty in the form.
When an account is not selected prior to opening the form, the account input should be required.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-06-02 13:48:59 +05:30
Wei Zhou
b25823213b
vr: remove old ips with same mac address in dhcpentry databag (#5059)
This PR fixes #5058

when start a vm, the old entries in databag for the vm (with same mac addresses) should be removed then set again, to avoid duplicated records in dhcpentry databag and also /etc/dhcphosts.txt 

Testing with Isolated networks:
(1) stop vm, change vm ip address, start vm
vm info is updated in /etc/dhcphosts.txt and /etc/cloudstack/dhcpentry.json
(2) stop vm, expunge vm.
vm is removed from /etc/dhcphosts.txt and /var/lib/misc/dnsmasq.leases

Testing with VPC:
(1) create vm in 2 vpc tiers
vm has 2 entries in /etc/dhcphosts.txt, and /etc/cloudstack/dhcpentry.json
(2) stop vm, change ip addresses, change nics order, start vm
entries are updated in /etc/dhcphosts.txt and /etc/cloudstack/dhcpentry.json
(3) remove a nic from vm (hot unplug)
vm nic is removed from /etc/dhcphosts.txt and /var/lib/misc/dnsmasq.leases
entry in /etc/cloudstack/dhcpentry.json is updated.
2021-06-01 20:57:26 +05:30
Rohit Yadav
8c7e39eb89
xenserver: attempt eject and destroying patch VBD separately (#5053)
Loop through all VMs and try to eject and remove systemvm.iso VBD upon host connect.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-06-01 20:55:57 +05:30
Harikrishna
5a841159c5
vmware: Create fcd folder on local storage in VMware vSphere (#5057)
This PR fixes the issue of missing fcd folder in local storage in case of VMware vSphere.
with this fix, a folder with name fcd is created whenever local storage is initiated.
2021-06-01 20:55:23 +05:30
davidjumani
704b24e68f
server: Fix string format error (#5061) 2021-06-01 17:34:19 +05:30
Rohit Yadav
d184e282b2 Merge remote-tracking branch 'origin/4.15' 2021-05-31 20:01:09 +05:30
Pearl Dsilva
d04fa0201d
server: usage generated for destroyed VMs with no backups (#5017)
Fixes: #4990
When a VM associated with a backup offering is destroyed/expunged, the backup offering isn't unassigned, and despite the VM having no backups present, backup usage is generated. This PR prevent usage record generation when there are no backups present for a VM with a backup offering associated to it. This is done by ensuring that usage event for backups is generated only when a the backup size > 0
2021-05-31 18:59:48 +05:30
sureshanaparti
b2fd548035
ui: Remove 'CONTRIBUTING.md' from ui directory (not relevant now as the repo already has a 'CONTRIBUTING.md' in its root directory) (#5054) 2021-05-31 18:58:11 +05:30
Spaceman1984
065ee9ecd3
ui: Removed download icon when iso is not extractable for users (#5028)
When an ISO is not marked as extractable, the download button should not be displayed in the UI.

Fixes: #4535
2021-05-31 16:06:35 +05:30
Rohit Yadav
57e4e3b6b1 Merge remote-tracking branch 'origin/4.15' 2021-05-31 16:04:42 +05:30
Rohit Yadav
fbc8610f6e Merge remote-tracking branch 'origin/4.14' into 4.15 2021-05-31 15:54:56 +05:30
Gabriel Beims Bräscher
a78f676037
engine: fix network with SG disabled still has security group script adding rules on KVM (#5049)
This PR fixes #5047 which can be reproduced on Zones with _(I) Advanced Networks, (II) Security Groups enabled for the Zone, (III)  network offering without Security Groups_; for instance, `DefaultSharedNetworkOffering` which does not list Security Group as supported service.

The issue is due to the following code inside the method `VirtualMachineManagerImpl.orchestrateReboot`:
[VirtualMachineManagerImpl.java#L3340](280c13a4bb/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java (L3340)).

```
  final Answer rebootAnswer = cmds.getAnswer(RebootAnswer.class);
  if (rebootAnswer != null && rebootAnswer.getResult()) {
      if (dc.isSecurityGroupEnabled() && vm.getType() == VirtualMachine.Type.User) {
          List<Long> affectedVms = new ArrayList<Long>();
          affectedVms.add(vm.getId());
          _securityGroupManager.scheduleRulesetUpdateToHosts(affectedVms, true, null);
      }
      return;
  }
```
2021-05-31 15:52:26 +05:30
Nicolas Vazquez
86508b7a31
vmware: Fix worker VM numeric invalid value (#5032) 2021-05-31 15:10:04 +05:30
Abhishek Kumar
b0cb087bd0
server: fixes NPE on empty vmware.root.disk.controller config (#5045)
* server: fixes NPE on empty vmware.root.disk.controller config

When global config - vmware.root.disk.controller is set to empty and template is registered with deployasis, server will throw NPE while deploying a VM. This change fixes the problem by using default value of the config in this case.

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

* use StringUtils utility

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>

* fix indentation

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

Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2021-05-31 14:30:11 +05:30
Abhishek Kumar
b104aca587 Merge remote-tracking branch 'apache/4.15' 2021-05-31 09:47:33 +05:30
Abhishek Kumar
dafa377086
secondary-storage: fix account template directory size (#5048)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-05-29 22:31:04 +05:30
Abhishek Kumar
4ec337fd2a
ui: pass requireshvm param for register/upload template API (#5050)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-05-29 16:15:40 +05:30
Gabriel Beims Bräscher
a3cdd1f836
Allow deploy Admin VMs and VRs in disabled zones/pods/clusters (#3600) 2021-05-28 10:45:30 +02:00
Daniel Augusto Veronezi Salvador
6531ee5871
Externalize config to set min memory/cpu with division by overprovisi… (#4722)
Co-authored-by: Daniel Augusto Veronezi Salvador <daniel@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2021-05-28 10:15:51 +02:00
Peinthor Rene
f1c83a0b05
maven: Use https for jenkins repo, to fix build with newer maven (#5039)
Maven 3.8.1 blocks non-secure repo connections per default.
2021-05-26 16:00:45 +05:30
Rohit Yadav
42e3b11579
systemvmtemplate: update to Debian 10.9 (#5038)
Update package ISO to Debian 10.9

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-05-26 15:06:58 +05:30