91 Commits

Author SHA1 Message Date
davidjumani
d949302d0f
packaging: Adding Centos8, Ubuntu 20.04, XCPNG8.1 Support (#4068)
* DB : Add support for MySQL 8

- Splits commands to create user and grant access on database, the old
statement is no longer supported by MySQL 8.x
- `NO_AUTO_CREATE_USER` is no longer supported by MySQL 8.x so remove
that from db.properties conn parameters

For mysql-server 8.x setup the following changes were added/tested to
make it work with CloudStack in /etc/mysql/mysql.conf.d/mysqld.cnf and
then restart the mysql-server process:

    server_id = 1
    sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
    innodb_rollback_on_timeout=1
    innodb_lock_wait_timeout=600
    max_connections=1000
    log-bin=mysql-bin
    binlog-format = 'ROW'

    default-authentication-plugin=mysql_native_password

Notice the last line above, this is to reset the old password based
authentication used by MySQL 5.x.

Developers can set empty password as follows:

    > sudo mysql -u root
    ALTER USER 'root'@'localhost' IDENTIFIED BY '';

In libvirt repository, there are two related commits

2019-08-23 13:13 Daniel P. Berrangé            ● rpm: don't enable socket activation in upgrade if --listen present
2019-08-22 14:52 Daniel P. Berrangé            ● remote: forbid the --listen arg when systemd socket activation

In libvirt.spec.in

        /bin/systemctl mask libvirtd.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-ro.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-admin.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tls.socket >/dev/null 2>&1 || :
        /bin/systemctl mask libvirtd-tcp.socket >/dev/null 2>&1 || :

Co-authored-by: Wei Zhou <w.zhou@global.leaseweb.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2020-08-17 16:28:30 +05:30
Rohit Yadav
00ff536f81 Merge remote-tracking branch 'origin/4.11' into 4.12
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-14 14:26:11 +05:30
Anurag Awasthi
f9b61bc737 orchestration: Allow VM that has never started to have volumes attached (#3276)
With this patch b766bf7
we started tracking disks in attaching state so that other attach request can fail gracefully. However this missed the case where disks were in allocated state but attach was requested.

For the use case where users want to attach disk in allocated state but not ready, we need to have allocated-attaching transition as well. We must take care of returning to the original state - allocated or ready - when attach request has completed.

For the use case of unstarted vm's the disk must proceed as follows - "Allocated" -> Attaching -> Allocated. When VM is started, the disk is "created" and pool is assigned. For the use case of started VMs it's more trivial and disk proceeds as follows - Ready -> Attaching -> Ready.

Test this by creating a VM with "startvm=false", create a disk and try attaching it in allocated state. It would give an exception on latest 4.11 but will be fixed on this patch.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2019-05-10 23:40:38 +05:30
Boris Stoyanov - a.k.a Bobby
bd7a09b5d9 Fix migrate vol xen vmware test (#2755) 2018-08-17 13:32:15 +02:00
Rafael Weingärtner
d6cbd774b7
[CLOUDSTACK-10323] Allow changing disk offering during volume migration (#2486)
* [CLOUDSTACK-10323] Allow changing disk offering during volume migration

This is a continuation of work developed on PR #2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume.

The API method will have the following parameters:

* storageid (required)
* volumeid (required)
* livemigrate(optional)
* newdiskofferingid (optional) – this is the new parameter

The expected behavior is the following:

* If “newdiskofferingid” is not provided the current behavior is maintained. Override mechanism will also keep working as we have seen so far.
* If the “newdiskofferingid” is provided by the admin, we will execute the following checks
** new disk offering mode (local/shared) must match the target storage mode. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** we will check if the new disk offering tags match the target storage tags. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem.
** check if the target storage has the capacity for the new volume. If it does not have enough space, then an exception is thrown and the operator will receive a message indicating the problem.
** check if the size of the volume is the same as the size of the new disk offering. If it is not the same, we will ALLOW the change of the service offering, and a warning message will be logged.

We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.

* Code formatting

* Adding a test to cover migration with new disk offering (#4)

* Adding a test to cover migration with new disk offering

* Update test_volumes.py

* Update test_volumes.py

* fix test_11_migrate_volume_and_change_offering

* Fix typo in Java doc
2018-04-26 20:05:55 -03:00
Rohit Yadav
fa7c1e2e65
CLOUDSTACK-10227: Stabilization fixes for 4.11.0.0 (#2403)
This fixes regression failures seen in Trillian, fixes NPEs that cause Travis related failures.
This also removes the aria2 dependency from rpms that require users to enable/install epel-release.
This finally updates the checksums for 4.11 systemvmtemplates in db upgrade path.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-15 00:08:36 +05:30
Abhinandan Prateek
64832fd70a CLOUDSTACK-4757: Support OVA files with multiple disks for templates (#2146)
CloudStack volumes and templates are one single virtual disk in case of XenServer/XCP and KVM hypervisors since the files used for templates and volumes are virtual disks (VHD, QCOW2). However, VMware volumes and templates are in OVA format, which are archives that can contain a complete VM including multiple VMDKs and other files such as ISOs. And currently, Cloudstack only supports Template creation based on OVA files containing a single disk. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, only the first disk is attached to the new instance and other disks are ignored.
Similarly with uploaded volumes, attaching an uploaded volume that contains multiple disks to a VM will result in only one VMDK to being attached to the VM.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+OVA+files+containing+multiple+disks

This behavior needs to be improved in VMWare to support OVA files with multiple disks for both uploaded volumes and templates. i.e. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, the first disk should be attached to the new instance as the ROOT disk and volumes should be created based on other VMDK disks in the OVA file and should be attached to the instance.

Signed-off-by: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-10 22:10:41 +05:30
Rohit Yadav
15b11a3b27 CLOUDSTACK-10013: Fix VMware related issues and fix misc tests
This fixes test failures around VMware with the new systemvmtemplate.
In addition:

- Does not skip rVR related test cases for VMware
- Removes rc.local
- Processes unprocessed cmd_line.json
- Fixed NPEs around VMware tests/code
- On VMware, use udevadm to reconfigure nic/mac address than rebooting
- Fix proper acpi shutdown script for faster systemvm shutdowns
- Give at least 256MB of swap for VRs to avoid OOM on VMware
- Fixes smoke tests for environment related failures

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-12-23 09:22:44 +05:30
Boris Stoyanov - a.k.a Bobby
f506a99df5 CLOUDSTACK-10154: fixing some smoketests failures (#2335)
* CLOUDSTACK-10154: fixing some smoketests failures

* Adding wait_until pattern to test_volumes
2017-11-28 09:55:35 +05:30
Abhinandan Prateek
4627fb2cd7 CLOUDSTACK-9972: Enhance listVolume API to include physical size and … (#2158)
* CLOUDSTACK-9972: Enhance listVolume API to include physical size and utilization.
Also fixed pool, cluster and pod info

* CLOUDSTACK-9972: Fix volume_view and duplicate API constant

* CLOUDSTACK-9972: Backport Do not allow vms to be deployed on hosts that are in disabled pod

* CLOUDSTACK-9972: Fix localization missing keys

* CLOUDSTACK-9972: Fix sql path
2017-11-05 21:44:43 +05:30
Boris
074ad5ea0e CLOUDSTACK-9979 - Fix test_volumes.py test 2017-07-23 23:25:31 +02:00
Rohit Yadav
cdbe847d29 CLOUDSTACK-9688: Fix failing test_volumes on centos7/kvm
Due to OS/hypervisor/environmental configuration, detaching a disk/device
using libvirt can be successful without updating the domain configuration (xml).
This leads to reattachment failure as the device is blocked until the next
reboot. This fixes a specific environment case by performing stop/start on
the VM only in case of KVM, which will recreate a fresh domain config (xml)
as KVM VMs have transient domain configs (xmls don't persist).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 15:23:00 +05:30
sanjeev
18fee95109 Removed medium dictionary from test_data and modified the tests dependent on it
Removed duplicate test data related to vm properties.Modified tests dependent on it

Removed duplicte service offerings from test data and modified tests dependent on it
Bug-Id: CLOUDSTACK-8617
This closes #644
2015-08-06 11:29:13 +05:30
Daan Hoogland
1c408dec37 Merge branch '4.5' after 4.5.1 vote passes 2015-05-07 16:03:26 +02:00
Gaurav Aradhye
bede34d297 CLOUDSTACK-8394: Skip test cases through setUp() instead of setUpClass()
Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #203
2015-04-28 12:33:54 +05:30
SrikanteswaraRao Talluri
3384888c39 CLOUDSTACK-8161: mark the data volume related operations on LXC as skipped if RBD storage pool is not available
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-16 18:46:03 +05:30
SrikanteswaraRao Talluri
2c515395d7 CLOUDSTACK-8161: mark the data volume related operations on LXC as skipped if RBD storage pool is not available
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2015-01-16 18:45:19 +05:30
sanjeev
8567701f07 CLOUDSTACK-7552: In hyper-v additional data disks will be mapped to /dev/sdb
Made changes to test_volumes.py accordingly
2014-09-16 11:59:12 +05:30
Koushik Das
23f5772c30 Removed 'BugId' tag from tests for fixed bugs 2014-09-08 16:00:08 +05:30
John Dilley
9b783d19ad CLOUDSTACK-7228 Only shrink disk when CLVM is in use.
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-09-03 12:30:59 +05:30
Alex Brett
24dd6cee78 CLOUDSTACK-7467 Fix TestVolumes.test_07_resize_fail
Previously if you had a volume using a non customisable disk offering, and
attempted to resize it passing in the same disk offering id, the command would
be accepted, but it would actually be resized to its current size (i.e. the
provided size parameter was ignored). This is what the test used to check.

Commit de6a3112b6b80952d1598acaa112ac50a3ef9d32 modified the logic to check if
the provided diskofferingid was the same as the current one, and if so treat it
as if it hadn't been provided - this means the resize command now fails, which
is probably the more sensible thing to do (rather than giving the impression it
will be resized but actually not doing so).

This change therefore modifies the test logic to match.

Signed-off-by: Mike Tutkowski <mike.tutkowski@solidfire.com>
2014-09-02 13:09:40 -06:00
John Dilley
d75961d973 CLOUDSTACK-7192: Skip tests on Hyper-V which don't apply 2014-08-12 16:49:56 +05:30
Girish Shilamkar
e4e9b745e1 Fixing resize volume test case 2014-07-25 19:58:40 +05:30
Girish Shilamkar
88f35179ef Revert "CLOUDSTACK-7130: Adding BugId to failed test cases"
This reverts commit 24da72f37395a6bb612ea1d073db0155289cf000.
2014-07-21 19:10:34 -04:00
Gaurav Aradhye
24da72f373 CLOUDSTACK-7130: Adding BugId to failed test cases 2014-07-18 04:09:43 -04:00
Girish Shilamkar
fef55acbbf CLOUDSTACK-6914: Disabling few failing BVTs 2014-06-24 13:14:14 +05:30
Girish Shilamkar
5638c493ff CLOUDSTACK-6906: Fixing volume resize BVT 2014-06-20 20:44:16 +05:30
Gaurav Aradhye
e65b746b34 CLOUDSTACK-6906: Fixed volume resize BVT failure 2014-06-18 13:05:21 +05:30
Santhosh Edukulla
7c15f148da CLOUDSTACK-6914: Fixed the mentioned issue
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2014-06-17 14:26:44 +05:30
Alex Brett
cdfa265060 Fix for test_01_create_volume to use the correct volume name for KVM
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-06-11 16:02:03 +05:30
Koushik Das
3f947f6124 CLOUDSTACK-6767: [Automation] integration.smoke.test_volumes.TestVolumes.test_07_resize_fail is failing on simulator
This test is not supported for simulator, updated tags from 'selfservice' to 'provisioning'
2014-05-27 11:45:32 +05:30
Gaurav Aradhye
a0ad836fd2 CLOUDSTACK-6758: [Marvin] Detect failed job and throw exception
Signed-off-by: Abhinandan Prateek <aprateek@apache.org>
2014-05-26 10:50:08 +05:30
Doug Clark
f1ef34550e Add the shrinkok flag to allow volume shrinking in resize tests
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-05-23 11:54:17 +05:30
Doug Clark
6f0b57216c Fix for Marvin utils.py:checkVolumeSize Fix for test_01_create_volume to use the correct volume name for XenServer
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-05-22 11:12:37 +05:30
Gaurav Aradhye
2e9cc58af6 CLOUDSTACK-6657: Adding condition for checking error code 530 across test cases
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-05-17 16:12:33 +05:30
Girish Shilamkar
247c796693 CLOUDSTACK-6536: Code cleanup - removing unnecessary waits after VM stop operation, modifying imports, removing white-spaces, adding try catch blocks whenever necessary 2014-05-07 02:43:10 -04:00
SrikanteswaraRao Talluri
e9fb906599 CLOUDSTACK-6511: fixed for bvt and component test failures 2014-04-25 18:13:47 +05:30
Santhosh Edukulla
ef9e2a9367 Fixed issues in CLOUDSTACK-6489
Fixed issues for CLOUDSTACK-6489
Along with fixed few indent issues.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-04-24 15:02:49 +05:30
SrikanteswaraRao Talluri
d22adf943d Merge branch 'marvin'
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>

Conflicts:
	test/integration/component/test_dynamic_compute_offering.py
	test/integration/smoke/test_deploy_vm.py
	test/integration/smoke/test_disk_offerings.py
	test/integration/smoke/test_volumes.py
2014-04-23 11:45:43 +05:30
Marcus Sorensen
11f5bdd78d CLOUDSTACK-6191 Add support for specifying volume provisioning
type (thin, sparse, fat) in disk/compute offerings.

Submitted-by: Yoshikazu Nojima <mail@ynojima.net>
Reviewed-by: Marcus Sorensen, Mike Tutowski
2014-04-10 09:23:04 -06:00
Girish Shilamkar
ef9471692d CLOUDSTACK-5674: Remove assigning accountname which was useless 2014-04-10 17:49:39 +05:30
SrikanteswaraRao Talluri
0e223d6787 Merge branch 'master' into marvin
Conflicts:
	test/integration/component/test_base_image_updation.py
	test/integration/component/test_cpu_domain_limits.py
	test/integration/component/test_cpu_limits.py
	test/integration/component/test_cpu_project_limits.py
	test/integration/component/test_ip_reservation.py
	test/integration/component/test_memory_limits.py
	test/integration/component/test_mm_domain_limits.py
	test/integration/component/test_mm_project_limits.py
	test/integration/component/test_persistent_networks.py
	test/integration/component/test_portable_ip.py
	test/integration/component/test_routers.py
	test/integration/smoke/test_deploy_vm.py
	test/integration/smoke/test_deploy_vm_with_userdata.py
	test/integration/smoke/test_internal_lb.py
	test/integration/smoke/test_vm_life_cycle.py
	test/integration/smoke/test_volumes.py
	tools/marvin/marvin/codes.py
	tools/marvin/marvin/configGenerator.py
	tools/marvin/marvin/lib/base.py
	tools/marvin/marvin/lib/common.py
	tools/marvin/marvin/lib/utils.py
2014-04-08 17:53:37 +05:30
SrikanteswaraRao Talluri
818d4a6d9d CLOUDSTACK-6316: Fixed component and smoke test failures for wrong references 2014-04-08 16:08:27 +05:30
SrikanteswaraRao Talluri
bacfd109e2 CLOUDSTACK-6316: Fixed bvt failures because of test data and wrong references
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-04-04 21:35:30 +05:30
SrikanteswaraRao Talluri
102c1bc9c8 CLOUDSTACK-6125: added smoke tests with following tags 1. selfservice - tests which can be run on simulator. 2. provisioning - tests that need actual hypervisor resource.
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-03-25 15:43:05 +05:30
Marcus Sorensen
d638d04cbf CLOUDSTACK-6181: Merge of resize root feature (resize-root branch) 2014-03-14 07:17:33 -06:00
Girish Shilamkar
f3a77c79e8 CLOUDSTACK-5674: cls.fail does not work in setUpClass fixed it with assert. 2014-02-14 14:27:13 +05:30
Santhosh Edukulla
3dbb2ae488 CLOUDSTACk-5674: Added fix for CLOUDSTACK-5674 2014-02-12 17:34:34 +05:30
Girish Shilamkar
c1d34369aa Revert "CLOUDSTACK-5674: Few fixes"
This reverts commit e6b93b0a6824a3f2845fb42596c04b348ae147e2.
2014-02-12 17:27:47 +05:30
Girish Shilamkar
e6b93b0a68 CLOUDSTACK-5674: Few fixes 2014-02-11 14:54:46 +05:30