79 Commits

Author SHA1 Message Date
Paul Angus
8b25fdf520 tests: fix some Marvin smoketests (#2869)
Fixes intermittent failures:
- Add a pause to avoid  tests restarting before VRs recovering from HA have fully booted.
- Add some pauses to allow services to restart and hosts to reconnect before continuing tests.
- Adding a loop around this method because sometimes VRs are overloaded and just respond with exception, so it'll catch it and try 5 times with 30sec cooldown. If that fails as well it'll fail the test.
- wait until host is up using explicit check
2019-03-26 15:33:40 +05:30
Rohit Yadav
f60f3cec34
router: Fixes #2789 fix proper mark based packet routing across interfaces (#2791)
Previously, the ethernet device index was used as rt_table index and
packet marking id/integer. With eth0 that is sometimes used as link-local
interface, the rt_table index `0` would fail as `0` is already defined
as a catchall (unspecified). The fwmarking on packets on eth0 with 0x0
would also fail. This fixes the routing issues, by adding 100 to the
ethernet device index so the value is a non-zero, for example then the
relationship between rt_table index and ethernet would be like:

100 -> Table_eth0 -> eth0 -> fwmark 100 or 0x64
101 -> Table_eth1 -> eth1 -> fwmark 101 or 0x65
102 -> Table_eth2 -> eth2 -> fwmark 102 or 0x66

This would maintain the legacy design of routing based on packet mark
and appropriate routing table rules per table/ids. This also fixes a
minor NPE issue around listing of snapshots.

This also backports fixes to smoketests from master.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-08-08 12:05:42 +05:30
Rohit Yadav
d4e302dcc6
smoketest: Fix test_vm_life_cycle secure migration tests (#2715)
This fixes intermittently failing secure live VM migration tests on KVM.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-06-20 21:18:38 +05:30
Rohit Yadav
85ad4639b0 test/integration: fix invalid VMware smoketests failures
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-04 12:37:23 +05:30
Rohit Yadav
8da2462469
CLOUDSTACK-10333: Secure Live VM Migration for KVM (#2505)
This extends securing of KVM hosts to securing of libvirt on KVM
host as well for TLS enabled live VM migration. To simplify implementation
securing of host implies that both host and libvirtd processes are
secured with management server's CA plugin issued certificates.

Based on whether keystore and certificates files are available at
/etc/cloudstack/agent, the KVM agent determines whether to use TLS or
TCP based uris for live VM migration. It is also enforced that a secured
host will allow live VM migration to/from other secured host, and an
unsecured hosts will allow live VM migration to/from other unsecured
host only.

Post upgrade the KVM agent on startup will expose its security state
(secured detail is sent as true or false) to the managements server that
gets saved in host_details for the host. This host detail can be accesed
via the listHosts response, and in the UI unsecured KVM hosts will show
up with the host state of ‘unsecured’. Further, a button has been added
that allows admins to provision/renew certificates to KVM hosts and can
be used to secure any unsecured KVM host.

The `cloudstack-setup-agent` was modified to accept a new flag `-s`
which will reconfigure libvirtd with following settings:

    listen_tcp=0
    listen_tls=1
    tcp_port="16509"
    tls_port="16514"
    auth_tcp="none"
    auth_tls="none"
    key_file = "/etc/pki/libvirt/private/serverkey.pem"
    cert_file = "/etc/pki/libvirt/servercert.pem"
    ca_file = "/etc/pki/CA/cacert.pem"

For a connected KVM host agent, when the certificate are
renewed/provisioned a background task is scheduled that waits until all
of the agent tasks finish after which libvirt process is restarted and
finally the agent is restarted via AgentShell.

There are no API or DB changes.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-04-20 00:36:18 +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
Rohit Yadav
8323a175f1 CLOUDSTACK-9860: Power off VMs when stopVM is called with forced=true
The 'force' option provided with the stopVirtualMachine API command is
often assumed to be a hard shutdown sent to the hypervisor, when in fact
it is for CloudStacks' internal use. CloudStack should be able to send
the 'hard' power-off request to the hosts.

When forced parameter on the stopVM API is true, power off (hard shutdown)
a VM. This uses initial changes from #1635 to pass the forced parameter
to hypervisor plugin via the StopCommand, and fixes force stop (poweroff)
handling for KVM, VMware and XenServer.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-05-25 17:25:22 +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
Sanjeev Neelarapu
8f1e0510cd Skipping all unsupported tests on LXC
This closes #379
2015-06-10 13:47:28 +05:30
Alex Brett
20d3cf1acc CLOUDSTACK-7727 Skip various BVT tests on LXC
A number of BVT tests are not valid for LXC (e.g. migrating a VM), so this patch
ensures they skip if LXC is in use.

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-10-16 17:23:04 +05:30
Koushik Das
23f5772c30 Removed 'BugId' tag from tests for fixed bugs 2014-09-08 16:00:08 +05:30
Doug Clark
6220947dbe CLOUDSTACK-7281: Fix error in debug line
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-07 21:00:13 +05:30
Gaurav Aradhye
1e3a689793 CLOUDSTACK-6873: Moved test cases that run only on simulator and those should be run serially to misc folder and also tagged them with required_hardware='simulator only'
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
2014-08-07 12:49:28 +05:30
Doug Clark
f7c72cdedc test_06_destroy_vm in test/integration/smoke/test_vm_life_cycle.py fails because the expunge parameter is set to true, this also cause tests that execute in test_vm_life_cycle.py after this test to fail.
Signed-off-by: Nitin Mehta <nitin.mehta@citrix.com>
2014-08-05 11:04:26 -07:00
Koushik Das
43dffaad5f Revert "CLOUDSTACK-7107: Disabling failed test case"
This reverts commit 186606a0bf82402e7755cd7998f133023cc96c6c.
2014-07-21 12:05:55 +05:30
Gaurav Aradhye
186606a0bf CLOUDSTACK-7107: Disabling failed test case 2014-07-16 21:36:57 -04:00
santhosh
aab6e1222f Fixed Regression issues mentioned under CLOUDSTACK-6708
Signed-off-by: santhosh <santhosh.edukulla@gmail.com>

Conflicts:

	test/integration/smoke/test_deploy_vm.py
	test/integration/smoke/test_network.py
	test/integration/smoke/test_routers.py
	test/integration/smoke/test_vm_life_cycle.py
2014-07-11 20:49:00 +05:30
Girish Shilamkar
2fedc281b7 Disable testcases 2014-06-29 22:30:56 -07:00
Gaurav Aradhye
0df156c09e CLOUDSTACK-6984: Resolving issues found during simulator run 2014-06-24 20:54:05 +05:30
Girish Shilamkar
fef55acbbf CLOUDSTACK-6914: Disabling few failing BVTs 2014-06-24 13:14:14 +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
sedukull
b43517c496 CLOUDSTACK-6856 : Fixed few data corruption and retries issues for failing cases
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
2014-06-06 21:52:03 +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
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
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
Girish Shilamkar
47c5b63881 CLOUDSTACK-5674: Fixed all BVTs and some marvin functions 2014-02-19 16:33:42 +05:30
Girish Shilamkar
2d93d83b44 CLOUDSTACK-5674: Added missing import for FAILED 2014-02-14 14:59:35 +05:30
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
Girish Shilamkar
995e3f5b5d Revert "CLOUDSTACK-5674: Few new fixes"
This reverts commit 3493f17bad3b8b57778b62d464c5e7f910351cc0.
2014-02-11 12:36:07 +05:30
Girish Shilamkar
3493f17bad CLOUDSTACK-5674: Few new fixes 2014-02-09 16:04:31 -05:00
Gaurav Aradhye
9174020d9a CLOUDSTACK-6066: Improved migration code to handle scenarios
according to hypervisor type
2014-02-12 10:04:39 +05:30
Santhosh Edukulla
bf72441d13 CLOUDSTACK-6006: Remove integration folder and lib 2014-02-04 12:01:58 +05:30
Girish Shilamkar
226df296d0 CLOUDSTACK-5674: Some fixes to marvin and resultant changes to tests. 2014-01-28 02:11:24 -05:00
Girish Shilamkar
6c5b1670b2 CLOUDSTACK-5925: Removed incorrect import 2014-01-27 19:14:45 -05:00
Girish Shilamkar
7305063fb4 CLOUDSTACK-5925: get_*() functionality changed in marvin, changed BVT too. 2014-01-28 11:12:24 +05:30
Girish Shilamkar
6a2cc9fbd0 CLOUDSTACK-5925: Moved test data from testsuites to marvin/config
Also merged redundant testdata as they were found.
2014-01-22 12:21:07 +05:30
Prasanna Santhanam
fee7a868e1 CLOUDSTACK-3916: Fix silly string formatting mistake
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-07-31 11:12:48 +05:30
Prasanna Santhanam
d875a36e5c CLOUDSTACK-3916: The size test is invalid
ISO size can differ from the mounted packages within the ISO. Remove the
size check and only perform attach and detach in the guest.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-07-30 14:12:33 +05:30
Prasanna Santhanam
f4dd80989f add debug message
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 56043eb6cf3835f541c65675666ad082f91f49d9)
2013-07-30 11:43:02 +05:30
Prasanna Santhanam
3fec71e748 Fix domain deletion in test_project_resources.py
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit a019f34572ef591b238adb256a0036565bb21579)
2013-07-28 11:56:50 +05:30
Prasanna Santhanam
40b59d7e2a CLOUDSTACK-2882: We are mounting an ISO not a volume
So fdisk -l doesn't list the mounted iso. Instead use showmount -e to
find the mounted device.

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 93f79e1a158cb1f69915a4036f5c1840a38c5e53)
2013-07-27 21:53:16 +05:30
Prasanna Santhanam
738523b57c CLOUDSTACK-2882: Additional device types for IDE/SCSI
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit b39d302888f965c5c26812b556c2dc395c53bb5c)
2013-07-27 21:53:11 +05:30
Prasanna Santhanam
2af6db24ed cmds is not a list. just regular string to ssh
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-27 20:30:36 +05:30
Prasanna Santhanam
c1e37f60ac Cycle all possible device combinations for ISO attach/detach
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-20 16:47:05 +05:30
Prasanna Santhanam
9e2eeb21ab Remove invalid references to diskdevice from tests
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-18 12:47:50 +05:30
Prasanna Santhanam
52f9d5efe2 Improve debug message when failing the test
Added the listVM response as part of debug logging

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-10 13:38:33 +05:30
Prasanna Santhanam
195e823b10 CLOUDSTACK-2882: Fix the diskdevice based on hypervisor
KVM > /dev/vda
Xen > /dev/xvdd

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
2013-06-07 17:08:19 +05:30