Commit Graph

521 Commits

Author SHA1 Message Date
Slawomir Jankowski
903486f984 Modify message in configure script
There is no generic way to check apart presence of kernel headers and kernel devel packages.
If we know system, we could use package manager, but without this knowledge,
we can't distinguish which headers in kernel headers directory belongs to which package.
Resolves #280 issue

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-01-20 08:43:40 +01:00
Katarzyna Łapińska
acd6171848
Merge pull request #265 from micrakow/kedr
Add basic kedr test
2020-01-16 12:51:21 +01:00
Sławomir Jankowski
0fb4d76e35
Merge pull request #279 from katlapinka/groups_cleanup
Cleanup test groups directories (fault injection and cache ops)
2020-01-16 10:36:58 +01:00
Katarzyna Lapinska
3cf0cf2642 Cleanup test groups (fault injection and cache ops) 2020-01-16 09:52:30 +01:00
Jan Musiał
51bb7677f1
Merge pull request #268 from mmichal10/fix_mem_leak
Free memory of all allocated threads.
2020-01-16 09:26:26 +01:00
Jan Musiał
11386ab584
Merge pull request #278 from micrakow/report_v20.1
Update reported CAS version to 20.1
2020-01-16 09:25:00 +01:00
Michal Rakowski
34e7a81635 Add tests using kedr - load/unload modules, start/stop cache
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-01-15 16:29:00 +01:00
Michal Rakowski
4e7653b736 Update reported CAS version to 20.1 2020-01-15 16:12:14 +01:00
Robert Baldyga
5b2cd745cf
Merge pull request #277 from Ostrokrzew/ocf_update
Casadm update
2020-01-15 15:05:03 +01:00
Michal Rakowski
9acb679ede installer.py: determine if CAS is installed on modules presence instead of casadm only
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-01-15 15:02:48 +01:00
Michal Rakowski
d9c0c0e83a cas_module.py: fixup load/unload methods
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-01-15 15:02:48 +01:00
Michal Rakowski
5edbf2a5a9 conftest: execute casadm-related cleanup only if CAS is installed during teardown
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2020-01-15 15:02:48 +01:00
Daniel Madej
97c8d07b77
Merge pull request #271 from robertbaldyga/test-example-power-control
tests: Add example test using power_control plugin
2020-01-15 14:40:16 +01:00
Ostrokrzew
bbc03abdf7 Casadm update
Add extended error message in casadm.
Add shortened code mapping for new error code.

Signed-off-by: Ostrokrzew <slawomir.jankowski@intel.com>
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-01-15 14:30:58 +01:00
Katarzyna Łapińska
45e862fdbd
Merge pull request #264 from rafalste/tests_software_hot_plug
Add tests for cache/core software hotplug
2020-01-15 09:08:35 +01:00
Robert Baldyga
e7d3fada4d
Merge pull request #248 from katlapinka/init-config-class
Create init config class representation
2020-01-14 13:31:17 +01:00
Rafal Stefanowski
f13602cbf6 Add tests for cache/core software hotplug
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-01-14 11:36:48 +01:00
Michal Rakowski
e2eabd4caa
Merge pull request #274 from imjfckm/fix-failing-upgrade
Fix upgrade errors
2020-01-14 11:22:42 +01:00
Robert Baldyga
9dc7f9aea7 tests: Add example test using power_control plugin
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-01-14 10:27:45 +01:00
Jan Musial
b5f014f689 Fix upgrade errors
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-01-14 09:53:03 +01:00
Katarzyna Lapinska
53664937ba Create init config class representation 2020-01-14 09:35:30 +01:00
Michał Mielewczyk
dd908053fb
Merge pull request #272 from robertbaldyga/tests-enable-serial-log-plugin
tests: Enable serial_log plugin
2020-01-13 16:37:47 +01:00
Jan Musiał
64625b718b
Merge pull request #241 from robertbaldyga/test-cas-startup
tests: Add test for CAS startup on reboot
2020-01-13 16:09:58 +01:00
Robert Baldyga
5756edac1b tests: Enable serial_log plugin
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-01-13 16:09:25 +01:00
Michal Mielewczyk
4ec277433d Free memory of all allocated threads.
This pach fixes memory leak which appeared due to commit d483951ebe.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-13 06:38:07 -05:00
rafalste
4acc7fb328
Merge pull request #269 from imjfckm/dont-fail-on-missing-config
Don't fail boot if opencas config is missing
2020-01-13 11:55:31 +01:00
Jan Musial
7cdb71d5b7 Don't fail boot if opencas config is missing
Signed-off-by: Jan Musial <jan.musial@intel.com>
2020-01-13 10:42:19 +01:00
Katarzyna Łapińska
e435f3017a
Merge pull request #267 from mmichal10/remove-semicolon
Remove semicolons after 'if' condition
2020-01-07 15:56:45 +01:00
Michal Mielewczyk
79631867b8 Remove semicolons after 'if' condition
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-07 09:41:16 -05:00
Robert Baldyga
714552d300
Merge pull request #212 from liuhongtong/master-lht-casctl
utils: lengthen open-cas service timeout
2020-01-07 09:47:43 +01:00
Robert Baldyga
ee88cafc26 tests: Add test for CAS startup on reboot
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-01-07 09:43:55 +01:00
Michal Rakowski
8180736c67
Merge pull request #263 from robertbaldyga/tests-update-tf-plugins
tests: Update TF - plugins
2020-01-07 09:09:17 +01:00
Robert Baldyga
a38f76d28a tests: Update TF - plugins
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2020-01-07 08:59:00 +01:00
Robert Baldyga
74c9fcd01b
Merge pull request #239 from Ostrokrzew/security
Add security test
2020-01-04 11:12:32 +01:00
Robert Baldyga
d53c7bac78
Merge pull request #231 from mmichal10/ioclt-interrupt
Ioctl interrupt
2020-01-04 10:50:03 +01:00
Ostrokrzew
154fb6567f Add security test
Check if non-root user can change OpenCAS service status by casctl.
Check if non-root user can use casadm.

Signed-off-by: Ostrokrzew <slawomir.jankowski@intel.com>
2020-01-03 08:45:12 +01:00
Michal Mielewczyk
9a42ad730b Update OCF
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
2449ab0b17 Add extended error message to casadm.
If waiting for the operation to finish was interrupted, casadm should print
informative error message.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
36e34b5a69 Don't try to restore cache after stop error.
In current OCF cache stop implemetation no error should occur, so there is no
need to handle it in adapter.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
232f13a8a4 Allow to interrupt cache init, load and stop.
When device used as cache had a big size, it took a lot of time to initialize.
If user would interrupt waiting, asyc OCF init procedure would continue, but
after finish, there was nobody to perfrom kernel part of start nor error
handling.

Now error handling and kernel part of start procedure are moved to completion.
If user will interrupt waiting at any point, newly started cache instance will
be stopped.

Since cache init and load vary only with check for old metadata and initializing
exported objects, they are now merged into one function.

Async cache stop is part of this commit because it was needed for rollback path.

Load, init and stop have common context, because in case of non interrupted
attach CAS needs to wait for rollback to be completed. Common context makes
passing `struct completion` easier between load, init and stop.

This commit is part of patch that will allow to interrupt waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
0b5ed3f00b Allow flush operations to be interrupted.
When context was allocated on the stack and waiting for completion was
interrupted, completion function would attempt to save flush result in
memory which might in use by other process. This would cause a system crash.

To prevent such scenario, context is allocated dynamiclly and extended with
reference counter. In case of interrupt, completion function doesn't have to
save result in context, it can simply free it's memory.

This commit also enables possibility to interrupt regular flush properly, by
seding SIGING to casadm.

This commit is part of patch that will allow to interrupt waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
b7f1dd69a9 Allow waiting for metadata flush to be interrupted.
When context was allocated on the stack and waiting for completion was
interrupted, completion function would attempt to save flush result in
memory which might in use by other process. This would cause a system crash.

To prevent such scenario, context is allocated dynamiclly and extended with
reference counter. In case of interrupt, completion function doesn't have to
save result in context, it can simply free it's memory.

This commit is part of patch that will allow to interrupt waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
de823b15fc Allow cache r&w locks to be interrupted.
When context was allocated on the stack and waiting for completion was
interrupted, completion function would attempt to save lock/unlock result in
memory which might in use by other process. This would cause a system crash.

To prevent such scenario, context is allocated dynamiclly and extended with
reference counter. In case of interrupt, completion function doesn't have to
save result in context, it can simply free it's memory.

This commit is part of patch that will allow to interrupt waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
7af5d296e1 New error code for interrupted waiting.
This commit is part of patch that will allow to interrupt waiting for OCF
operation.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
f7d88c4b3f Don't allow core add, remove nor detach interruptions
They are usually not time comsuming operations, so risk of hung task is low.
So it's easier to temporarily disable interrupts instead of properly handle
async completion.

This commit is part of patch that will handle interrupt of waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
2ac8214379 Don't allow probe interruption.
Usually metadata probe is non time consuming. To avoid dealing with
synchronization problems, noninterruptible wait is performed.

This commit is part of patch that will handle interrupt of waiting for OCF
operations.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 18:34:30 -05:00
Michal Mielewczyk
d483951ebe Free thread memory after it is stopped.
After marking thread as ready to stop, CAS was waiting this for thread to exit
out of main execution loop (in _cas_io_queue_thread()). In case of management
queue it lead to deadlock because both stoping queue and main execution loop was
performed in the same execution context.

Since freeing memory is the only operation after stopping thread, it can be
moved just after the main thread loop. After this little reordering,
synchronising between _cas_stop_thread() and _cas_io_queue_thread() in no longer
needed, and no deadlock will occur.

This change is needed to put management qeueue from completion context. Without
this cachnge, there will be no possiblitiy to stop cache from completion context
and to make rollback.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Michal Mielewczyk
3eda503095 Additional null check when starting cache instance
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Michal Mielewczyk
49c87c9527 Fix legacy error messages.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-01-02 09:22:13 -05:00
Daniel Madej
0d663a37f1
Merge pull request #230 from Ostrokrzew/init2
Cache configuration load - every mode - 1 cache 1 or 4 cores
2020-01-02 13:03:46 +01:00