2947 Commits

Author SHA1 Message Date
nvazquez
92dc9a332a
Fix sonar cloud code smells 2022-08-16 00:18:13 -03:00
Suresh Kumar Anaparti
41d6dd6a23
Fixes issue with migration of VM with volumes (#179) 2022-06-30 10:58:07 +05:30
Marcus Sorensen
ba7adfa6f0
Volume encryption (#135)
This PR introduces volume encryption option to service offerings and disk offerings. Fixes #136

There is a hypervisor component and a storage pool component. Hypervisors are responsible for being capable of running/using the encrypted volumes. Storage pools are responsible for being able to create, copy, resize, etc. Hypervisors will report encryption support in their details, storage pools are marked for encryption support by pool type.

The initial offering for experimental release of this feature will have support for encryption on Local, NFS, SharedMountPoint, and ScaleIO storage types.

When volumes choosing an encrypted offering are allocated to a pool, the pool type must be capable of supporting encryption and this is enforced.

When VMs are started and they have an encrypted volume, the hypervisor must be capable of supporting encryption. Also, if volumes are attached to running VMs, the attach will only work if the hypervisor supports encryption.

This change includes a few other minor changes - for example the ability to force the KVM hypervisor private IP. This was necessary in my testing of ScaleIO, where the KVM hypervisors had multiple IPs and the ScaleIO storage only functions if the hypervisor as a ScaleIO client matches IPs with what CloudStack sees as the hypervisor IP.

For experimental release of this feature, some volume workflows like extract volume and migrate volume aren't supported for encrypted volumes. In the future we could support these, as well as migrating from unencrypted to encrypted offerings, and vice versa.

It may also be possible to configure encryption specifics in the future, perhaps at the pool level or the offering level. Currently, there is only one workable encryption offering for KVM that is supported by Libvirt and Qemu for raw and qcow2 disk files, LUKS version 1. This PR ensures we at least store this encryption format associated with each volume, with the expectation that later we may have LUKS v2 volumes or something else. Thus we will have the information necessary to use each volume with Libvirt if/when other formats are introduced.

I think the most disruptive change here is probably a refactoring of the QemuImg utility to support newer flags like --object. I've tested the change against the basic Qemu 1.5.3 that comes with EL7 and I believe it is good, but it will be nice to see the results of some functional tests. Most of the other changes are limited to changing behavior only if volume encryption is requested.

Working on documentation for the CloudStack docs. One thing to note is that hypervisors that run the stock EL7 version of Qemu will not support encryption. This is tested to be detected and report properly via the CloudStack API/UI. I intend to like to have a support matrix in the CloudStack docs.

I may add a few more unit tests. I'd also like some guidance on having functional tests. I'm not sure if there's a separate framework, or if Marvin is still used, or what the current thing is.

* Add Qemu object flag to QemuImg create

* Add apache license header to new files

* Add Qemu object flag to QemuImg convert

* Set host details if hypervisor supports LUKS

* Add disk encrypt flag to APIs, diskoffering

* Schema upgrade 4.16.0.0 to 4.16.1.0 to support vol encryption

* Add Libvirt secret on disk attach, and refer to it in disk XML

* Add implementation of luks volume encryption to QCOW2 and RAW disk prep

* Start VMs that have encrypted volumes

* Add encrypt option to service offering and root volume provisioning

* Refactor volume passphrase into its own table and object

* CryptSetup, use key files to pass keys instead of command line

* Update storage types and allocators to select encryption support

* Allow agent.properties to define the hypervisor's private IP

* Implement createPhysicalDisk for ScaleIOStorageAdaptor

* UI: Add encrypt options to offerings

* UI module security updates

* Revert "UI module security updates" - belongs in base

This reverts commit a7cb7cf7f57aad38f0b5e5d67389c187b88ffd94.

* Add --target-is-zero support for QemuImg

* Allow qemu image options to be passed, API support convert encrypted

* Switch hypervisor encryption support detection to use KeyFiles

* Fixes for ScaleIO root disk encryption

* Resize root disk if it won't fit encryption header

* Use cryptsetup to prep raw root disks, when supported

* Create qcow2 formatting if necessary during initial template copy to ScaleIO

* Allow setting no cache for qemu-img during disk convert

* Use 1M sparse on qemu-img convert for zero target disks

* UI: Add volume encryption support to hypervisor details

* QemuImg use --image-opts and --object depending on version

* Only send storage commands that require encryption to hosts that support encryption

* Move host encryption detail to a static constant

* Update host selection to account for volume encryption support

Only attach volumes if encryption requirements are met

* Ensure resizeVolume won't allow changing encryption

* Catch edge cases for clearing passphrase when volume is removed

* Disable volume migration and extraction for encrypted volumes

* Register volume secret on destination host during live migration

* Fix configdrive path editing during live migration

* Ensure configdrive path is edited properly during live migration

* Pass along and store volume encryption format during creation

* Fixes for rebase

* Fix tests after rebase

* Add unit tests for DeploymentPlanningManagerImpl to support encryption

* Deployment planner tests for encryption support on last host

* Add deployment tests for encryption when calling planner

* Added Libvirt DiskDef test for encryption details

* Add test for KeyFile utility

* Add CryptSetup tests

* Add QemuImageOptionsTest

* add smoke tests for API level changes on create/list offerings

* Fix schema upgrade, do disk_offering_view first

* Fix UI to show hypervisor encryption support

* Load details into hostVO before trying to query them for encryption

* Remove whitespace in CreateNetworkOfferingTest

* Move QemuImageOptions to use constants for flag keys

* Set physical disk encrypt format during createDiskFromTemplate in KVM Agent

* Whitespace in AbstractStoragePoolAllocator

* Fix whitespace in VolumeDaoImpl

* Support old Qemu in convert

* Log how long it takes to generate a passphrase during volume creation

* Move passphrase generation to async portion of createVolume

* Revert "Allow agent.properties to define the hypervisor's private IP"

This reverts commit 6ea9377505f0e5ff9839156771a241aaa1925e70.

* Updated ScaleIO/PowerFlex storage plugin to support separate (storage) network for Host(KVM) SDC connection. (#144)

* Added smoke tests for volume encryption (in KVM). (#149)

* Updated ScaleIO pool unit tests.

* Some improvements/fixes for code smells (in ScaleIO storage plugin).

* Updated review changes for ScaleIO improvements.

* Updated host response parameter 'encryptionsupported' in the UI.

* Move passphrase generation for the volume to async portion, while deploying VM (#158)

* Move passphrase generation for the volume to async portion, while deploying VM.
* Updated logs, to include volume details.

* Fix schema upgrade, create passphrase table first

* Fixed the DB upgrade issue (as noticed in the logs below.)
DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) CALL `cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('cloud.volumes', 'passphrase', 'id')
ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: CALL `cloud`.`IDEMPOTENT_ADD_FOREIGN_KEY`('cloud.volumes', 'passphrase', 'id')
ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) java.sql.SQLException: Failed to open the referenced table 'passphrase'
ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to execute upgrade script

* Fixes for snapshots with encrypted qcow2
Fixes #159 #160 #163

* Support create/delete encrypted snapshots of encrypted qcow2 volumes
* Select endpoints that support encryption when snapshotting encrypted volumes
* Update revert snapshot to be compatible with encrypted snapshots
* Disallow volume and template create from encrypted vols/snapshots

* Disallow VM memory snapshots on encrypted vols. Fixes #157

* Fix for TemplateManagerImpl unit test failure

* Support offline resize of encrypted volumes. Fixes #168

* Fix for resize volume unit tests

* Updated libvirt resize volume unit tests

* Support volume encryption on kvm only, and  passphrase generation refactor (#169)

* Fail deploy VM when ROOT/DATA volume's offering has encryption enabled, on non-KVM hypervisors
* Fail attach volume when volume's offering has encryption enabled, on non-KVM hypervisors
* Refactor passphrase generation for volume

* Apply encryption to dest volume for live local storage migration
fixes #161

* Apply encryption to data volumes during live storage migration

Fixes #161

* Use the same encryption passphrase id for migrating volumes

* Pass secret consumer during storage migration prepare

Fix for #161

* Fixes create / delete volume snapshot issue, for stopped VMs

* Block volume snapshot if encrypted and VM is running

Fixes #159

* Block snap schedules on encrypted volumes

Fix for #159

* Support cryptsetup where luks type defaults to 2

Fixes #170

* Modify domain XML secret UUID when storage migrating VM

Fix for #172

* Remove any libvirt secrets on VM stop and post migration

Fix for #172

* Update disk profile with encryption requirement from the disk offering (#176)

Update disk profile with encryption requirement from the disk offering
and some code improvements

* Updated review changes / javadoc in ScaleIOUtil

Co-authored-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2022-06-29 15:51:00 +05:30
Suresh Kumar Anaparti
dcf68b272e
Validate VM state before the reboot operation (#156)
* Prevent NPE on reboot stopped VM and start VM output with null display name
* Upstream PR: apache/cloudstack#6397
2022-05-26 20:54:33 +05:30
Abhishek Kumar
07abb808b1
schema: add schema changes for event improvements (#150)
Schema changes needed for Event Improvements functionality to work are being added in 4.16.0 to 4.16.1.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-05-12 12:51:09 +05:30
Abhishek Kumar
92931aeeb8
schema,server,api: events improvement (#127)
Add resource ID and resource type to event.
In UI, adds Events tab in resource view for the supporting resources.

Following SQL changes needed to support events with resource details in DB,
```
 -- Alter event table to add resource_id and resource_type
ALTER TABLE `cloud`.`event`
    ADD COLUMN `resource_id` bigint unsigned COMMENT 'ID of the resource associated with the even' AFTER `domain_id`,
    ADD COLUMN `resource_type` varchar(32) COMMENT 'Account role in the project (Owner or Regular)' AFTER `resource_id`;

DROP VIEW IF EXISTS `cloud`.`event_view`;
CREATE VIEW `cloud`.`event_view` AS
    SELECT
        event.id,
        event.uuid,
        event.type,
        event.state,
        event.description,
        event.resource_id,
        event.resource_type,
        event.created,
        event.level,
        event.parameters,
        event.start_id,
        eve.uuid start_uuid,
        event.user_id,
        event.archived,
        event.display,
        user.username user_name,
        account.id account_id,
        account.uuid account_uuid,
        account.account_name account_name,
        account.type account_type,
        domain.id domain_id,
        domain.uuid domain_uuid,
        domain.name domain_name,
        domain.path domain_path,
        projects.id project_id,
        projects.uuid project_uuid,
        projects.name project_name
    FROM
        `cloud`.`event`
            INNER JOIN
        `cloud`.`account` ON event.account_id = account.id
            INNER JOIN
        `cloud`.`domain` ON event.domain_id = domain.id
            INNER JOIN
        `cloud`.`user` ON event.user_id = user.id
            LEFT JOIN
        `cloud`.`projects` ON projects.project_account_id = event.account_id
            LEFT JOIN
        `cloud`.`event` eve ON event.start_id = eve.id;
```
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-05-05 13:44:33 +05:30
Nicolas Vazquez
d6b9c65ce6
Backport: Direct download certificates additions and improvements (#6104) (#140)
* Direct download certificates additions and improvements (#6104)

* Add direct download certificates listing

* Restore class to original project

* Small refactor

* Register API

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Refactor after review

* Fix checkstyle

* Add hosts mapping to API response

* Improvements on revoke certificate

* Refactor revoke certificate API

* Fix condition

* Filter only certificates not revoked for revokeCertificate API

* Improve upload certificate and add provision certificate API

* Improve certificate response output

* Address review comments

* Refactor revoke cert test

* Fix marvin test

* Address review comments

* Fix issues

* Improvements

* Refactor upload template API response

* Fix response

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Fix pom version

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2022-04-12 10:49:08 -03:00
Suresh Kumar Anaparti
cad9332082
Updating pom.xml version numbers for release 4.16.1.0
Signed-off-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
2022-02-25 19:01:16 +05:30
Pearl Dsilva
a8cc261143
[vmware, ssvm] Scale down of ssvm (#6042)
* [vmware, ssvm] Scale down of ssvm

* address comments - change variable name
2022-02-25 15:45:10 +05:30
Suresh Kumar Anaparti
027e6030af
[KVM] Disconnect the volumes with the proper storage adaptor. (#6029)
* [KVM] Disconnect the volumes with the proper storage adaptor.

* Improved / Added logs
2022-02-23 22:40:14 +05:30
Pearl Dsilva
e0a5df50ce
CKS Enhancements and SystemVM template upgrade improvements (#5863)
* This PR/commit comprises of the following:
- Support to fallback on the older systemVM template in case of no change in template across ACS versions
- Update core user to cloud in CKS
- Display details of accessing CKS nodes in the UI - K8s Access tab
- Update systemvm template from debian 11 to debian 11.2
- Update letsencrypt cert
- Remove docker dependency as from ACS 4.16 onward k8s has deprecated support for docker - use containerd as container runtime

* support for private registry - containerd

* Enable updating template type (only) for system owned templates via UI

* edit indents

* Address comments and move cmd from patch file to cloud-init runcmd

* temporary change

* update k8s test to use k8s version 1.21.5 (instead of 1.21.3 - due to https://github.com/kubernetes/kubernetes/pull/104530)

* support for private registry - containerd

* Enable updating template type (only) for system owned templates via UI

* smooth upgrade of cks clusters

* update pom file with temp download.cloudstack.org testing links

* fix pom

* add cgroup config for containerd

* add systemd config for kubelet

* add additional info during image registry config

* update to official links
2022-02-15 18:27:14 +05:30
dahn
8db598bc0f
set pod after migration (#5972)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
2022-02-11 18:47:45 +05:30
sureshanaparti
5297b52d98
Improve the guest OS hypervisor mappings addition on upgrade. (#5911)
- This removes the hardcoded guest os ids 305 - 329 in upgrade path 4.14.0 to 4.15.0, and 330 - 349 in upgrade path 4.15.0.0 to 4.15.1.0.
2022-02-10 14:43:03 +01:00
Abhishek Kumar
af58284560
server,config: respect storage.max.volume.size and make it dynamic (#5857)
* server,config: respect storage.max.volume.size and make it dynamic

Fixes #5830

* fix test

* size change

* fix check

* server: donot include ISO size while checking volume sizes

* revert size check

* refactor

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-08 13:29:35 +05:30
dahn
0f1cd6009d
add logging to deployment planners (#5859)
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-02-04 17:02:32 +01:00
Wei Zhou
ecf85aa65b
VMware7 support: Add schema changes for update2 and update3 (#5870)
* VMware7 u2 support: Add schema changes

* VMware7-u3: Add schema changes for 7.0.3.0
2022-02-04 12:34:05 +01:00
Abhishek Kumar
638779ca37
vm-import: fix unmanaged instance listing (#5400)
* vm-import: fix unmanaged instance listing

When the host and last host ID is not set for the VM, it may appear in the list of unmanaged instances.
This changes fixes the behaviour by filtering unmanaged instances list for host for following three criteria:
- host is set as host_id for the VM
- host is set as the last_host_id for the VM
- pod of the host is set as the pod_id for the VM and both host_id and last_host_id is NULL

* use SearchBuilder to fix query condition

* add paranthesis

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-03 10:27:05 +05:30
Abhishek Kumar
62b806ac13
api,server: add params for updatehypervisorcapabilities API (#5473)
* api,server: add params for updatehypervisorcapabilities API

Allows updating following capabilities for a hypervisor, version:
- Max DATA volumes limit
- Storage motion supported
- Max hosts per cluster
- VM snapshot enabled

* added test

* changes

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

* Update test/integration/smoke/test_hypervisor_capabilities.py

Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-02-03 10:21:23 +05:30
Abhishek Kumar
8adb8df2fe
server: find suitable disk offering for volume upload (#5852)
* server: find suitable disk offering for volume upload

Fixes #5696

* fix npe check

* fixes, refactor, rename method and handle custom iops

* ui: allow offering selection

* list only disk offerings

* show name

* revert error check

* use checkaccess

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2022-02-02 16:35:47 +05:30
dahn
fde34df560
Make sure other than user VMs can have multiple NICs in a network (#5896)
* only check user VMs

* Update engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2022-01-31 19:05:27 +05:30
Nicolas Vazquez
3e92a63155
[XenServer/XCP-ng] Pass the image store NFS version on storage commands (#5886)
* Add NFS version to mount command

* Remove extra line

* Extend NFS version to mount secondary storage

* Unused import

* Refactor NFS version to be granular

* Make use of the ConfigKey on the NFS version setting value
2022-01-31 12:21:13 +05:30
Nicolas Vazquez
1fc7d70da2
Add idempotent primary keys on tables missing them (#5785)
* In progress primary keys

* Refactor in progress to idempotent way

* Finish SQL changes

* Add java code to match new columns

* Fix imports

* Fix tests

* Remove comments

* Fix index name on vmsnapshot

* Fix parse from correct column on usage storage

* Fix parser columns

* Fix NPE

* Fix NPE for the rest of the occurrences

* Further fix for similar issue
2022-01-30 23:31:07 +05:30
Nicolas Vazquez
84f5768e64
[VMware][Deploy-as-is] OVF properties not importing when template is uploaded from local (#5861)
* Fix ova upload missing details

* Refactor and cleanup

* Unused import
2022-01-26 11:28:52 +05:30
DK101010
f639f56834
fill volume attached field (#5865)
Co-authored-by: DK101010 <dirk.klahre@itelligence.de>
2022-01-20 19:24:26 +05:30
Nicolas Vazquez
e18ff602f8
Prevent upgrade failures if there are existing annotations permissions (#5846)
* Do not fail if there are existing role permissions for annotations
* Refactor
* Improve refactor
* Do not update if there are existing role permissions for annotations
* Fix exception on upgrade
* Remove extra space from suggestion
* Apply suggestions from code review

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
2022-01-18 11:20:00 +05:30
Wei Zhou
216bea1978
ipv6: disable IPv6-only shared network with VR (#5810)
* ipv6: disable IPv6-only shared network with VR

* Update #5810: import org.apache.commons.lang3.StringUtils
* Update #5810: do not import org.apache.commons.lang3.StringUtils
* Update server/src/main/java/com/cloud/network/NetworkServiceImpl.java
* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2022-01-12 13:33:35 +05:30
dahn
028d338aaa
remove VmWorkJob after adding a nic to a vm (#5658)
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Suresh Kumar Anaparti <suresh.anaparti@shapeblue.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2022-01-10 16:31:50 +01:00
dahn
2774bc156f
use physical size instead of virtual size for migration. (#5750)
* Use Physical size to evaluate if migration is possible

* Improve logging and consider files skipped as failure in complete migration

* skipped can't be negative

* remove useless method

* group multidisk templates for secstor migration

* use enum

* Update engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java

Co-authored-by: sureshanaparti <12028987+sureshanaparti@users.noreply.github.com>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
Co-authored-by: Daan Hoogland <dahn@onecht.net>
Co-authored-by: Pearl d'Silva <pearl.dsilva@shapeblue.com>
2022-01-06 17:18:50 +05:30
Rakesh
2bd1dc1e14
Enable resetting config values to default value (#4230)
* Enable resetting config values to default value

Provide reset button to zone,cluster,domain,account,
primary and secondary storage so that config values
can be reset to default value

* fix ui issue

* Update test/integration/smoke/test_reset_configuration_settings.py

* Update test/integration/smoke/test_reset_configuration_settings.py

Co-authored-by: Rakesh Venkatesh <rakeshv@apache.org>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2022-01-03 21:55:30 +01:00
Daniel Augusto Veronezi Salvador
79d924f3ee
Insert correct template size when live migrating VM with volumes (#5758)
Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
2021-12-16 20:21:38 +05:30
davidjumani
dfd75d7bc0
api: Fix wrong logger class in *Cmd.java (#5740)
This PR changes the incorrect class name used in the logger in ListHypervisorsCmd
2021-12-02 15:16:28 +05:30
Harikrishna
4beca925d7
Fix NPE on scale VM operation after the corresponding template is deleted (#5736) 2021-12-01 17:53:09 +01:00
Wei Zhou
965316b842
server bug fix: remove network details when network is removed (#5675) 2021-11-25 21:15:51 +01:00
Wei Zhou
2b54b587fc
engine/schema: fix findActiveAccountById in AccountDaoImpl.java (#5704) 2021-11-25 12:20:48 +01:00
Wei Zhou
c95f8e263a
server: set network rate for additional public IPs (#5670)
This PR fixes #5669
2021-11-18 13:45:37 +05:30
nicolas
bdab51424a
New upgrade schema path and workaround for system VM template auto registration 2021-11-10 12:56:52 -03:00
nicolas
462e0511f4
Fix version and add schema upgrade path 2021-11-10 11:49:02 -03:00
nicolas
93c3c3b9ac
Updating pom.xml version numbers for release 4.16.1.0-SNAPSHOT
Signed-off-by: nicolas <nicovazquez90@gmail.com>
2021-11-09 22:50:22 -03:00
nicolas
44c08b5acc
Updating pom.xml version numbers for release 4.16.0.0
Signed-off-by: nicolas <nicovazquez90@gmail.com>
2021-11-04 14:14:57 -03:00
Nicolas Vazquez
261fe326ff
Revert "parallel nic adding (#5541)" (#5665)
This reverts commit 3574d8d20be01b90ca09e58ab4b492604c1a8d1f.
2021-11-04 13:29:59 -03:00
Abhishek Kumar
0ad742405c
api,server,engine/schema: admin listvm api clusterid (#5659)
* api,server,engine/schema: admin listvm api clusterid

Add clusterid parameter in listVirtualMachines API for admin

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

* import order

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

* set clusterid only for ListVMsCmdByAdmin

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-11-04 08:47:42 +05:30
Wei Zhou
1928723054
engine/schema: fix build error in #5642 (#5657) 2021-11-02 14:59:41 +01:00
Abhishek Kumar
d717d8a4cd
upgrade/systemvm: add template zone entries (#5642)
* upgrade/systemvm: add template_zone_ref entries

Fixes #5641

When registering a system VM template during an upgrade, entries in cloud.template_zone_ref must be created for the new template.
For a cross-zones template, entry for each zone must be added.

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

* fix for template-zone entry create

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

* change

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2021-11-02 17:19:04 +05:30
sureshanaparti
0a88e710b2
Check the pool used space from the bytes used in the storage pool stats collector, for non-default primary storage pools that cannot provide stats. (#5586)
* Check the pool used space from the bytes used in the storage pool stats collector, for  non-default primary storage pools that cannot provide stats.
Also, Update the used bytes from the pool stats answer for non-default primary storage pools if the pool can provide stats.

* Update server/src/main/java/com/cloud/storage/StorageManagerImpl.java

Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>

* space fix

Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
2021-10-25 08:23:07 -03:00
Pearl Dsilva
f2ca11fc68
Fix systemVM template name in metadata file (#5598) 2021-10-21 13:44:23 -03:00
Wei Zhou
f29aef8b70
VPC: support LB in multiple vpc tiers if LB provider is VpcVirtualRouter (#5580)
* VPC: support LB in multiple vpc tiers if LB provider is VpcVirtualRouter

* server: fix unit test CreateNetworkOfferingTest failures

[ERROR] Tests run: 10, Failures: 0, Errors: 10, Skipped: 0, Time elapsed: 13.902 s <<< FAILURE! - in org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest
[ERROR] createIsolatedNtwkOffWithVlan(org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest)  Time elapsed: 0.662 s  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadBalancerDaoImpl': Invocation of init method failed; nested exception is java.lang.NullPointerException
	at org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest.setUp(CreateNetworkOfferingTest.java:110)
Caused by: java.lang.NullPointerException
	at org.apache.cloudstack.networkoffering.CreateNetworkOfferingTest.setUp(CreateNetworkOfferingTest.java:110)

* update #5580: use java.util.Optional

* update #5580: create method listByNetworkIdOrVpcIdAndScheme
2021-10-17 06:55:24 +05:30
Nicolas Vazquez
a5372a98dc
Fix storage cleanup corner case preventing VM deletion (#5575)
* Fix storage cleanup corner case

* Improve deletion

* Refactor
2021-10-16 00:09:54 -03:00
Rohit Yadav
ad8f3750c9
engine/schema: add unique constraint for sshkeys UUID column (#5565)
This adds unique constraints much like other tables, instead of using
query that maybe incompatible with older 5.x mysql servers.

Fixes #5564

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2021-10-12 10:08:30 -03:00
Pearl Dsilva
79e6fe47c8
Fix warning caused due to duplicate declaration of plugin - pom.xml (#5568) 2021-10-12 10:10:53 +05:30
Gabriel Beims Bräscher
404e264caf
CloudStack fails to migrate VM with volume when there are datadisks attatched (#5410)
* Check if should map volume in createStoragePoolMappingsForVolumes

* Invert conditional at internalCanHandle
2021-10-08 11:50:37 +05:30