35493 Commits

Author SHA1 Message Date
John Bampton
fa39e61a4c
Fix spelling (#6609) 2022-11-01 08:30:01 +01:00
dahn
0c93a85b3a
add ip rule for VPC extra IPs (#6846) 2022-10-31 15:13:19 +01:00
Harikrishna
d7dedfff1f
Changed userdata names on Add instance page (#6854)
* Changed userdata names on Add instance page
2022-10-30 19:54:06 +01:00
Bryan Lima
23033fbb74
Add live migration of system VMs (KVM) (#6491)
Co-authored-by: Rodrigo D. Lopez <19981369+RodrigoDLopez@users.noreply.github.com>
2022-10-28 13:14:09 +02:00
Bryan Lima
f580a8d7a2
Quota enable config to user/domain scope (#6690)
* Add quota plugin to accout/domain scope

* Add check in quota usage calculation to skip accounts with quota disabled

* Set quota config enabled default to true

* Fix if condition

* Update condition to use primitive boolean expression

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Remove unused var

* Add quota state as a column in the Quota Summary view

* Remove trailling spaces

* Address review

Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-10-27 08:48:54 -03:00
Rodrigo D. Lopez
adfaa730b1
Externalizes logrotate service frequency timer in VR (#6507)
Co-authored-by: Lopez <rodrigo@scclouds.com.br>
2022-10-26 09:04:12 +02:00
João Jandre
14937e1adb
Fixed NPE on volume creation from snapshot (#6839)
Co-authored-by: João Jandre <joao@scclouds.com.br>
2022-10-26 08:44:01 +02:00
dahn
13d22c2f54
Set network state to implemented when no services (#6838)
Co-authored-by: Nicolas Vazquez <nicovazquez90@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2022-10-24 08:59:17 +02:00
Stephan Krug
c37709c44b
Removing extra details in error message (#6835)
Co-authored-by: Stephan Krug <stephan.krug@scclouds.com.br>
2022-10-23 11:54:08 +02:00
dahn
4a06363749
Ova download fix (#6758) 2022-10-21 14:31:19 +02:00
Wei Zhou
48ffa5dc0b
Support multiple ceph monitors (#6792) 2022-10-21 10:37:30 +02:00
Bryan Lima
17fe98432d
Remove unnecessary escape method (#6692) 2022-10-20 14:37:05 +02:00
Daan Hoogland
ce84336ef6 Merge release branch 4.17 to main
* 4.17:
  UI: Fix Volume Snapshot from user VM as admin (#6824)
2022-10-20 11:14:43 +02:00
Daniel Augusto Veronezi Salvador
2ca164ac96
Quota custom tariffs (#5909)
Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-10-17 10:03:50 +02:00
Marcus Sorensen
289a43f758
packaging: Uses rng-tools for entropy, not haveged for cloudstack-management (#6775)
* EL8 uses rng-tools, not haveged, to gather entropy

* packaging: use rng-tools/rngd consistently across all distros

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-10-14 16:51:17 +05:30
SadiJr
a7ba6a18e6
[Veeam] Improve remove backup process (#6580)
* Allow delete backups but keep backup offering

Co-authored-by: SadiJr <sadi@scclouds.com.br>
2022-10-14 10:14:12 +02:00
Daniel Augusto Veronezi Salvador
7936eb04e9
server: Fix delete parent snapshot (#6630)
ACS + Xenserver works with differential snapshots. ACS takes a volume full snapshot and the next ones are referenced as a child of the previous snapshot until the chain reaches the limit defined in the global setting snapshot.delta.max; then, a new full snapshot is taken. PR #5297 introduced disk-only snapshots for KVM volumes. Among the changes, the delete process was also refactored. Before the changes, when one was removing a snapshot with children, ACS was marking it as Destroyed and it was keeping the Image entry on the table cloud.snapshot_store_ref as Ready. When ACS was rotating the snapshots (the max delta was reached) and all the children were already marked as removed; then, ACS would start removing the whole hierarchy, completing the differential snapshot cycle. After the changes, the snapshots with children stopped being marked as removed and the differential snapshot cycle was not being completed.

This PR intends to honor again the differential snapshot cycle for XenServer, making the snapshots to be marked as removed when deleted while having children and following the differential snapshot cycle.

Also, when one takes a volume snapshot and ACS backs it up to the secondary storage, ACS inserts 2 entries on table cloud.snapshot_store_ref (Primary and Image). When one deletes a volume snapshot, ACS first tries to remove the snapshot from the secondary storage and mark the entry Image as removed; then, it tries to remove the snapshot from the primary storage and mark the entry Primary as removed. If ACS cannot remove the snapshot from the primary storage, it will keep the snapshot as BackedUp; however, If it does not exist in the secondary storage and without the entry SNAPSHOT.DELETE on cloud.usage_event. In the end, after the garbage collector flow, the snapshot will be marked as BackedUp, with a value in the field removed and still being rated. This PR also addresses the correction for this situation.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2022-10-13 12:31:11 +05:30
Nicolas Vazquez
79e5e7fe36
UI: Fix Volume Snapshot from user VM as admin (#6824) 2022-10-13 08:56:35 +02:00
Eduardo Zanetta
5a54dc19b6
Rename validateUUID method to isUuid (#6793)
* Rename validateUUID method to isUuid

* adds JavaDoc to isUuid method

Co-authored-by: Eduardo Zanetta <eduardo.zanetta@scclouds.com.br>
2022-10-12 20:42:12 +02:00
GaOrtiga
8d276c0220
Improve description of secstorage.encrypt.copy (#6811)
The description of the configuration secstorage.encrypt.copy fails to mention that it is also used to make sure the certificate assigned to the zone is used when creating links for external access (download/upload of disks,templates and ISOs). This PR improves this description.

Co-authored-by: Gabriel Ortiga Fernandes <gabriel.fernandes@scclouds.com.br>
2022-10-11 21:16:36 +05:30
João Jandre
d6044fb5a6
Fix to make recovered volumes be accounted for by Usage (#6772) 2022-10-11 14:05:14 +02:00
Daniel Augusto Veronezi Salvador
f7b29856d1
Refactor SnapshotDataStoreDaoImpl (#6751)
* Refactor SnapshotDataStoreDaoImpl and add unit tests

* Create constants for duplicated literals

* Refactor search builders

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-10-11 13:53:02 +02:00
Codegass
69e158d77d
Refactor TestHttp.testHttpclient to avoid the Exception Suppression (#6733)
* Refactor TestHttp.testHttpclient to avoid the Exception Suppression

* Remove the unnecessary import
2022-10-09 15:22:32 +05:30
Bryan Lima
0535d9b5e1
ui: Add message upon network offering creation to warn user of VR creation (#6684)
This PR aims to improve the user experience upon creation of Network Offerings warning the user of the scenarios in which a VR is created. For this, the service offering field is always shown in the form and a warning message is displayed if the user's configuration does not require the creation of a VR. These scenarios include a network offering with guest type L2, and a with a guest type Shared or Isolated when none of the following services are enabled: (VPN, DHCP, DNS, Firewall, LB, UserData, SourceNat, StaticNat and/or PortForwarding). Finally, the message for the Isolated and Shared networks disappear when one of the aforementioned services are selected.
2022-10-09 15:21:41 +05:30
João Jandre
82d91d596b
api: Return object name in the listHypervisorCapabilities API (#6771)
The hypervisorCapabilitiesResponse does not set an object name, returning a null object name instead. This PR adds an object name to the response.
2022-10-09 08:46:08 +05:30
Rohit Yadav
9a381db956 Merge remote-tracking branch 'origin/4.17' 2022-10-08 12:21:04 +05:30
Ann
0400765e1f
packaging: rpm dependencies: which and file (#6638)
createtmplt.sh will use file, and setup-sysvm-tmplt will use which. this is log:

/usr/share/cloudstack-common/scripts/storage/secondary/setup-sysvm-tmplt: line 74: which: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 56: file: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 75: file: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 42: file: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/setup-sysvm-tmplt: line 74: which: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 56: file: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 75: file: command not found
/usr/share/cloudstack-common/scripts/storage/secondary/createtmplt.sh: line 42: file: command not found
when no which and file, systemvm template can not be import correctly(not decompressed, stay bzip2), then libvirtd will report error:

Could not open backing file: Image is not in qcow2 format
Then systemvm can not be started.
2022-10-08 12:08:25 +05:30
Peinthor Rene
eff10bcd8d
server: always use iops settings from new disk-offer (#6681)
If you had an disk-offer which would compute-only == false,
it wouldn't apply the iop settings of the new disk-offer and instead
use null for the settings.
2022-10-08 12:07:37 +05:30
Peinthor Rene
ff961c9594
linstor: support QoS(IOPs) and small improvements (#6682)
This PR has 3 improvements for the Linstor primary storage driver:

- Create a separate jar of it and move all Linstor related classes into the correct project (similar to the storpool plugin)
- Add aux properties for Cloudstack volumes in Linstor to make it easier to identify them in Linstor
- Add support for IOPs settings with the Linstor storage plugin
2022-10-08 12:06:49 +05:30
Stephan Krug
b8d834e759
quota: Improves email configurations descriptions (#6806)
The alert.email.addresses description is ambiguous and can cause doubts to operators. This description has been altered to avoid confusion. In addition, typos in alert.smtp.useStartTLS and project.smtp.useStartTLS have been fixed.

Co-authored-by: Stephan Krug <stephan.krug@scclouds.com.br>
2022-10-08 11:59:55 +05:30
Wei Zhou
6786c24138
kvm: fix backup volume snapshot fails on RBD storage (#6790)
This PR fixes the issue that volume snapshot fails on RBD storage with the following error

qemu-img: Could not open 'driver=raw,file.filename=rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': Could not open 'rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': No such file or directory

However, it works without using image options

Therefore, do not pass the image options if the image format is not QCOW2 and LUKS.
2022-10-08 11:55:33 +05:30
GaOrtiga
eb26ca1f95
server: Allow download of system vm templates (#6750)
Currently, ACS does not allow the user to download System VM Templates, even though it may be usefull as it can speed up the registration process of the template for production once the homologation is done beforehand. This PR changes this, allowing the user to download said VM Templates

Co-authored-by: Gabriel Ortiga Fernandes <gabriel.fernandes@scclouds.com.br>
2022-10-08 11:52:37 +05:30
Step Security Bot
de8aae1619
[StepSecurity] ci: Harden GitHub Actions in merge-conflict-checker.yml (#6802) 2022-10-08 11:40:43 +05:30
Marcus Sorensen
8785f781b6
Ignore calls to PowerFlex for host revocation when host is null (#6742)
This PR Fixes #6739 (for PowerFlex/ScaleIO only, Datera still needs to be addressed), which can occur if the last host the VM ran on is deleted from CloudStack. At the point the VM is deleted, cloudstack attempts to make a final call to revoke access to volumes, passing the last host the VM ran on. If this host is gone, we get an error and are unable to delete the VM.

It's possible that there may be a more holistic fix to this by identifying all of the places where revokeAccess() is called and checking for null host. It's possible other storage plugins don't even need host information to revoke access to volumes and may need this call to revoke. Therefore I'm only applying this fix to the ScaleIOPrimaryDataStoreDriver to skip revoking access when there is no host to revoke access for, and this should protect us as well when a new part of the code tries to use revokeAccess() in the future.

Signed-off-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-10-08 07:19:19 +05:30
Marcus Sorensen
93f09265c3
server: Don't allow service offering change if encryption value would change (#6776)
This PR blocks change of service offering if the offering root volume encryption values don't match. We don't support dynamically removing or adding encryption to a VM.

Signed-off-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
2022-10-07 11:40:44 +05:30
Harikrishna
713a236843
UserData as first class resource (#6202)
This PR introduces a new feature to make userdata as a first class resource much like existing SSH keys.

Detailed feature specification document:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Userdata+as+a+first+class+resource
2022-10-05 17:34:59 +05:30
Wei Zhou
c83dee5851
server: fix exception in DeploymentPlanningManagerImplTest (#6799)
previously
```
[INFO] Running com.cloud.deploy.DeploymentPlanningManagerImplTest

java.lang.NullPointerException
	at com.cloud.deploy.DeploymentPlanningManagerImpl.planDeployment(DeploymentPlanningManagerImpl.java:403)
	at com.cloud.deploy.DeploymentPlanningManagerImplTest.failEncRootLastHostNotSupportingEncryptionTest(DeploymentPlanningManagerImplTest.java:644)

...
[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.407 s - in com.cloud.deploy.DeploymentPlanningManagerImplTest

```

with this PR

```
[INFO] Running com.cloud.deploy.DeploymentPlanningManagerImplTest

[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.481 s - in com.cloud.deploy.DeploymentPlanningManagerImplTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0
```
2022-10-04 10:57:12 +05:30
Hoang Nguyen
6a0c9079ed
ui: fixes ui style on Edge (#6791)
Fixes #6787
2022-10-04 10:55:03 +05:30
Hoang Nguyen
b69292c376
ui: disable getResource in login page (#6788)
Fixes #6731
2022-10-04 10:53:39 +05:30
Sina Kashipazha
4e2f461b31
Prometheus exporter enhancement (#4438)
* Export count of total/up/down hosts by tags

* Export count of vms by state and host tag.

* Add host tags to host cpu/cores/memory usage in Prometheus exporter

* Cloudstack Prometheus exporter: Add allocated capacity group by host tag.

* Show count of Active domains on grafana.

* Show count of Active accounts and vms by size on grafana

* Use prepared statement to query database for a number of VM who use a specific tag.

* Extract repeated codes to new methods.
2022-09-30 17:02:01 +02:00
Rohit Yadav
784578d46c Merge remote-tracking branch 'origin/4.17' 2022-09-30 13:48:27 +05:30
dahn
89d9a70dce
server: Allow template names upto 255 chars (#6768)
* Allow template names upto 255 chars

* Update error message

* externalise name length in constant

Fixes: #6766
2022-09-30 10:46:50 +05:30
Abhishek Kumar
67024b036a
vr: fix packet interface mismatch (#6656)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Daan Hoogland <daan@onecht.net>
2022-09-29 17:02:28 +02:00
João Jandre
33bd08369b
Show name instead of description in the infocards and breadcrumbs (#6769)
Co-authored-by: João Paraquetti <joao@scclouds.com.br>
2022-09-29 15:22:02 +02:00
Rohit Yadav
7fa41ddfcc
README: update and refactor project README page (#6782)
- Refactor links, use https://
- Add link to UI/QA website for new users try out CloudStack via simulator
- Update screenshot photo

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

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-09-29 11:15:25 +02:00
dahn
53b658636f
fix usage charging for deleted/resized volumes (#6737) 2022-09-29 11:07:54 +02:00
Abhishek Kumar
432a03fb02
api: fix event type and description for createTag (#6779)
Fixes #6777

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

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-09-29 11:10:30 +05:30
Rohit Yadav
d9dd4c1e3a
mvn: bump version ahead of next major release (#6767)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-09-28 14:41:32 +02:00
Abhishek Kumar
2e5588c5ea Merge remote-tracking branch 'apache/4.17' into main
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-09-28 10:20:28 +05:30
João Jandre
8ab8fdc1db
Fix migrate volume permissions (#6224)
* changed when to show migrate volume button on the UI.

Co-authored-by: Joao <JoaoJandre@gitlab.com>
2022-09-27 10:26:07 +02:00