Commit Graph

555 Commits

Author SHA1 Message Date
liuhongtong
40694e5ef3 utils: lengthen open-cas service timeout
Signed-off-by: liuhongtong <hongtongliu@126.com>
2019-11-29 19:52:01 +08:00
Robert Baldyga
d797bc7211
Merge pull request #209 from liuhongtong/master-lht-casctl
utils: casctl needs python 3.5+
2019-11-29 11:41:57 +01:00
Rafal Stefanowski
f68d34b3ad Add fault injection tests (same ID, remove IO)
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-11-29 10:44:07 +01:00
liuhongtong
087dd29560 utils: casctl needs python 3.5+
opencas.py invokes subprocess.run().
Only python 3.5 and later versions support subprocess.run().

Signed-off-by: liuhongtong <hongtongliu@126.com>
2019-11-29 11:12:58 +08:00
Robert Baldyga
18c77daec9
Merge pull request #198 from rafalste/improve_process_killing
Improve handling of process killing ('open-cas-linux' + 'test-framework' changes)
2019-11-28 16:57:41 +01:00
Rafal Stefanowski
923015ed1e Improve handling of process killing
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-11-28 11:50:44 +01:00
Katarzyna Łapińska
fd5824cacd
Merge pull request #180 from Deixx/ioclass-export
Test for exporting IO class configuration + IoClass
2019-11-28 11:35:04 +01:00
Daniel Madej
695d9a688f Changes after review
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-27 15:27:48 +01:00
Daniel Madej
830bcfd1b0 Test for exporting current IO class configuration to a file
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-27 15:27:48 +01:00
Daniel Madej
ca115949ad Create IoClass class for rule management
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-27 15:27:48 +01:00
Daniel Madej
c1872c3365 Update test-framework version
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-27 15:27:48 +01:00
Robert Baldyga
c1a82dd5ff tests: Don't copy previous results to DUT during CAS installation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-27 13:42:25 +01:00
Michał Mielewczyk
8cef2b41b0
Merge pull request #202 from robertbaldyga/dont-use-log-before-its-crated
tests: Don't use log before it's created
2019-11-27 13:24:02 +01:00
Robert Baldyga
913be2c7b8 tests: Don't use log before it's created
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-27 13:10:01 +01:00
Robert Baldyga
8dff1defca
Merge pull request #201 from robertbaldyga/add-import-pytest
tests: Add missing import pytests in conftest.py
2019-11-27 13:02:01 +01:00
Robert Baldyga
6e1770804b tests: Add missing import pytests in conftest.py
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-27 12:46:38 +01:00
Michał Mielewczyk
e70a807839
Merge pull request #200 from robertbaldyga/fix-exceptions
tests: Handle pytest test state properly
2019-11-27 11:11:31 +01:00
Robert Baldyga
116d13364b tests: Handle pytest test state properly
- Log information about test fail in case of exception.
- Skip teardown in case of test skip (setup is skipped by default).

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-27 10:42:25 +01:00
Robert Baldyga
51a71f5c43
Merge pull request #199 from Ostrokrzew/typo
Typo fix
2019-11-26 17:32:49 +01:00
Slawomir_Jankowski
d4a419dc75 Typo fix
Fix missing space in phrase.

Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
2019-11-26 16:49:45 +01:00
Katarzyna Łapińska
e46cd24892
Merge pull request #196 from rafalste/fix_indent
Fix CacheConfig class indentation issue
2019-11-26 09:27:00 +01:00
Michał Mielewczyk
43a4a92821
Merge pull request #195 from rafalste/flush_handling
tests: Improve flush handling during cache mode change
2019-11-25 16:53:51 +01:00
Rafal Stefanowski
66c695bd1e Fix CacheConfig class indentation issue
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-11-25 16:53:07 +01:00
Rafal Stefanowski
901fc402fd tests: Improve flush handling during cache mode change
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2019-11-25 09:27:59 +01:00
Michal Rakowski
a08e6fffef
Merge pull request #194 from mmichal10/extend-dut-config-file
Extend dut config file
2019-11-22 11:23:05 +01:00
Michal Rakowski
c9d41b2959
Merge pull request #193 from micrakow/get_set_seq_fix
casadm: fix get/set seq cutoff param
2019-11-22 09:57:48 +01:00
Michal Rakowski
31bc2d2787 casadm: fix get/set seq cutoff param
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-22 09:45:50 +01:00
Michał Mielewczyk
1ffe1dd0a2
Merge pull request #179 from micrakow/seq_tests
Basic sequential cut off tests
2019-11-21 17:36:31 +01:00
Michal Rakowski
2203a46319 tests: add basic sequential cut off tests 2019-11-21 12:24:37 +01:00
Michal Mielewczyk
be438dbe7c Extend example dut config wih 'allow_disk_autoselect' option.
By setting 'allow_disk_autoselect: True' user grants to framework permission
to autodiscover and override DUT's disks.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-11-20 22:09:40 -05:00
Michal Mielewczyk
9c31e15d48 Override DUT's disks in conftest.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-11-20 22:07:19 -05:00
Michal Rakowski
56b9ec1794 tests: sequential cut off related methods fixup
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-20 07:52:06 +01:00
Michal Rakowski
db8ff10cd5 casadm: add err log in case of failed param getting/setting
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-20 07:52:05 +01:00
Michał Mielewczyk
ac59a8f746
Merge pull request #183 from robertbaldyga/test-guidelines
tests: Introduce test writing guidelines
2019-11-19 09:00:44 +01:00
Jan Musiał
50d340f815
Merge pull request #191 from imjfckm/fix-lvm
Try to load devices on change udev event
2019-11-18 16:24:36 +01:00
Jan Musial
c4e15a1af7 Try to load devices on change udev event
This fixes CAS-on-LVM scenario. Currently how CAS works:

1. LVM instantinates device nodes (not usable at this point)
2. CAS tries to add cores (fails)
3. LVM ends device configuration and issues change uevent
4. We ignore change uevents so we do nothing

This patch makes sure we don't ignore change uevents.
Still, some messages about not being able to open core device
can show up in syslog - there's room for improvement.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-11-18 15:59:37 +01:00
Michał Mielewczyk
cccb69dc91
Merge pull request #190 from imjfckm/wait-for-cas-ctrl
Wait for cas_ctrl device in casctl
2019-11-18 15:37:17 +01:00
Jan Musial
b91fc1ca4a Wait for cas_ctrl device in casctl
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-11-18 15:00:31 +01:00
Jan Musiał
126615add1
Merge pull request #184 from katlapinka/improve-error-handling
Improve error handling and exception messages
2019-11-18 13:57:49 +01:00
Michał Mielewczyk
ce5db43e42
Merge pull request #166 from imjfckm/fix-startup
Fix startup
2019-11-18 13:57:10 +01:00
Jan Musial
df1ba933de Update tests
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-11-18 09:18:05 +01:00
Jan Musial
aaedfb35dd Change startup procedure
Current startup procedure works on an assumption that we will
deal with asynchronously appearing devices in asynchronous way
(udev rules) and synchronous events in the system (systemd units)
won't interfere. If we would break anything (mounts) we would just
take those units and restart them. This tactic was working as long
as resetting systemd units took reasonable time.

As hackish as it sounds it worked in all systems that the software
has been validated on. Unfortunately it stopped working because
of *.mount units taking MUCH longer time to restart even on
mainstream OSes, so it's time to change.

This change implements open-cas systemd service which will wait
synchronously with systemd bootup process for all required Open CAS
devices to start. If they don't we fail the boot process just as
failing mounts would. We also make sure that this process takes place
before any mounts (aside from root FS and other critical FS's) are
even attempted. Now opencas-mount-utility can be discarded.

To override this behaviour on per-core basis you can specify
lazy_startup=true option in opencas.conf.

Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-11-14 12:20:08 +01:00
Katarzyna Lapinska
783daba8d4 Improve error handling and exception messages 2019-11-14 10:47:57 +01:00
Michał Mielewczyk
db1cb96010
Merge pull request #186 from robertbaldyga/4kib-blocks-string
casadm: Unify "4KiB Blocks" string
2019-11-13 11:36:31 +01:00
Daniel Madej
235def1ec5 Remove logging objects
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-12 18:56:15 +01:00
Daniel Madej
252f7104ca Fix - core and cache could use the same device
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-12 18:56:15 +01:00
Daniel Madej
ccfc7001dc casadm returns Stats object instead of dict
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-12 18:56:15 +01:00
Daniel Madej
034fa9b61c Use CmdException for casadm outputs
Signed-off-by: Daniel Madej <daniel.madej@intel.com>
2019-11-12 18:55:22 +01:00
Robert Baldyga
9b17135694 casadm: Unify "4KiB Blocks" string
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-12 17:17:22 +01:00
Robert Baldyga
17241575d5 tests: Introduce test writing guidelines
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-11-08 17:30:19 +01:00