Commit Graph

499 Commits

Author SHA1 Message Date
Tony Breeds a624d8f855 Retire Packaging Deb project repos
This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).

Change-Id: Ic0c68767aff92861baade50fe504541d46e3fa83
2017-09-12 16:09:50 -06:00
Thiago da Silva 0cdfbf6f6e Release 1.5.0
Change-Id: Id6ea5043c983ec0f882feedb6c970e3994961d6c
2017-06-06 21:11:13 -04:00
Jenkins 4e0f35a34d Merge "Change the version reference" 2017-06-06 21:05:53 +00:00
Jenkins 6768ad4403 Merge "Simplify required-method check" 2017-06-06 20:53:33 +00:00
Thiago da Silva 4e94ec6c0b add six to test-requirements
Used by test_pyeclib_api.py

Change-Id: I0161e3589ec230a4cc2e344bfe3288a908c2e761
2017-05-25 14:31:40 -04:00
Jenkins c564b69731 Merge "Avoid segfault when raising exceptions" 2017-05-05 23:19:09 +00:00
Jenkins c4312307ab Merge "Fix error message with invalid parity number" 2017-05-03 22:52:25 +00:00
Tim Burke 95c7423142 Avoid segfault when raising exceptions
This came up when running the py3 unit tests after adding a test that
(erroneously) tried to encode native strings. At some point, we should
probably enforce tighter type-checking, but I'm not sure what all types
we need (or want) to support.

Change-Id: Ibb1f4f52207be83f842740d9f3c39c2a03fb1396
2017-05-03 14:32:14 -07:00
Tim Burke 607500d3c5 Simplify required-method check
Change-Id: I527ab490d707871cc9c08345e3213ec2da7c0c43
2017-05-02 16:20:28 -07:00
Jenkins ea1b479a81 Merge "Add explicit info for immeasurable throughput" 2017-04-26 00:30:51 +00:00
Jenkins b526576065 Merge "Add Phazr.IO libphazr backend support" 2017-03-10 06:03:56 +00:00
Jenkins 6a5ec37f15 Merge "Don't let nose play with our PYTHONPATH." 2017-03-02 10:33:47 +00:00
Jim Cheung 69cb73f9d1 Add Phazr.IO libphazr backend support
Currently, there are several implementations of erasure codes that are
available within OpenStack Swift.  Most, if not all, of which are based
on the Reed Solomon coding algorithm.

Phazr.IO’s Erasure Coding technology uses a patented algorithm which are
significantly more efficient and improves the speed of coding, decoding
and reconstruction.  In addition, Phazr.IO Erasure Code use a non-systematic
algorithm which provides data protection at rest and in transport without
the need to use encryption.

Please contact support@phazr.io for more info on our technology.

Change-Id: I9377fa32426a190efd0a7f0675ecf13d7e90367d
2017-03-01 19:19:22 -08:00
Kota Tsuyuzaki 47493a0fc8 Change the version reference
Now, if liberasurecode.so exposes a liberasurecode_get_version function,
we'll use that; otherwise, we'll fall back to reporting the version that
PyECLib was built against.

Note that if your liberasurecode.so doesn't support
the liberasurecode_get_verion function, pyeclib will the version at built
as well as older behavior.

Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Change-Id: I54823183cce6775a83e913baf6bb1eeb94aabc13
2017-03-01 20:43:17 +00:00
Clay Gerrard 37d43c7c73 Use py35 tox environment by default
Change-Id: Ieb54b0b38f04a3502cf08206f1ce036fe2cb671c
2017-02-28 16:47:11 +00:00
Clay Gerrard 28b0abc51b Don't let nose play with our PYTHONPATH.
Closes-Bug: #1668447

Change-Id: I5a9844bad285d992b6a3a01a7fd95634d02960cd
2017-02-28 04:20:40 +00:00
Kota Tsuyuzaki 5ebb2cd307 Fix error message with invalid parity number
Change-Id: I620df09cf8ddd03e4a4749e9a1d31f8cbe45c752
2017-02-07 23:11:53 -08:00
Kota Tsuyuzaki a60186ace4 Add explicit info for immeasurable throughput
And remove an unnecessary assignment

Change-Id: I81e124ebf761a943e75bf9568085668362b7c50e
2016-12-20 22:56:13 -08:00
Ondřej Nový ee6e409d83 Prevent division by zero in tests
If avg_time is 0, tests will fail:
throughput = (size / 1000.0) / avg_time
ZeroDivisionError: float division by zero

This happens for me on Hurd:
https://buildd.debian.org/status/fetch.php?pkg=python-pyeclib&arch=hurd-i386&ver=1.3.1-1&stamp=1475967332

Change-Id: I0a7812977173b37918f40891f6ec0a2bc7c1d023
2016-12-15 16:37:14 +01:00
Jenkins a384e107fe Merge "Use Py_BuildValue instead of manually building dicts" 2016-12-15 04:50:34 +00:00
Jenkins 83e91d9d83 Merge "release 1.4.0" 2016-12-08 20:47:29 +00:00
Thiago da Silva baf8be7f92 release 1.4.0
Change-Id: I1e7f96cf96906450ef1323e1f9c48fcfd30f14ff
Signed-off-by: Thiago da Silva <thiago@redhat.com>
2016-12-08 20:16:25 +00:00
Jenkins 32107b63ed Merge "Add tests for the availability of individual backends" 2016-12-08 04:40:34 +00:00
Jenkins b1156356ba Merge "Fix checksum memory leak" 2016-12-07 21:51:15 +00:00
Tim Burke 624f422819 Add tests for the availability of individual backends
These will either pass if the backend is available, or skip if it isn't.
What we definitely *don't* want is a situation where someone runs tests,
sees all passes with no skips, and assumes they must therefore have all
backends available.

Change-Id: I1d2c691d01f38d5e8f7bc9cf4ec4b9c50ace32b9
2016-12-07 18:50:58 +00:00
Jenkins ca4d2dd7c3 Merge "ISA-L Cauchy support" 2016-12-07 13:52:46 +00:00
Tim Burke 288d1e07de Fix checksum memory leak
Since we allocate the result buffer in hex_encode_string, we're
responsible for freeing it later.

Why didn't we catch it before? Turns out, our tests didn't
loop enough. I wasn't reliably seeing a test failure at 200k
iterations, but 400k seems to be enough?

Closes-Bug: #1634006

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Related-Change: I678e10008c3c5bc04640f7f19498334d94cb0cd6
Change-Id: I0f6e922ba25ad56142f3d095896b9856a436a81c
2016-12-05 22:11:23 -08:00
Kota Tsuyuzaki ebaffcdfc1 Add -v option to let us know which tests are passed in the gate
Change-Id: If8bda742ad106da867b7cb282a6a6a2939269c51
2016-12-01 17:46:31 -08:00
Kota Tsuyuzaki 22ae03758d ISA-L Cauchy support
This is for supporting ISA-L cauchy based matrix. The difference
from isa_l_rs_vand is only the matrix to use the encode/decode
calculation.

As a known issue, isa_l_rs_vand backend has constraint for the
combinations of the available fragment to be able to
decode/reconstuct. (See related change in detail)

To avoid the constraint, this patch adds another isa-l backend to use
cauchy matrix. The reason I try to add this intead of changing at
sa_l_rs_vand, the isa_l_rs_vand backend may be already used and if we
change the matrix, the current users won't be able to decode the data.

To avoid the problem and keep the backward compatibility, this is in
another isa_l_rs_cauchy namespace.

NOTE: this depends on tag may be meaningless because the depending target
is a c lang project so probably no scripts to install it we have and then,
almost of the tests for isa-l will be skipped due to a lack of isa-l
backend installation.

Related-Change: Icee788a0931fe692fe0de31fabc4ba450e338a87

Depends-On: I6eb150d9d0c3febf233570fa7729f9f72df2e9be

Change-Id: I3a5516545d17ab7ac67a9a3627c85243e2110764
2016-12-01 17:18:42 -08:00
Clay Gerrard 685bc06180 Cleanup lint errors in test suite
Add some more linting to test modules and clean 'em up

Change-Id: I8bece8e1e2971ef508c058220dd2646ae880fe35
2016-11-29 18:40:53 -08:00
Tim Burke 9b8d558acc Use Py_BuildValue instead of manually building dicts
Change-Id: I6077b1f82a910e0d939cac7eb0d05bcbcdabdeb7
2016-11-29 20:03:49 +00:00
Tim Burke cc6f4bba26 Fix formatted get_metadata memory leak
Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>

Change-Id: I678e10008c3c5bc04640f7f19498334d94cb0cd6
2016-11-29 11:57:59 -08:00
Jenkins 9a20711310 Merge "Assorted combinatoric-test fixes" 2016-11-29 19:28:40 +00:00
Jenkins 465cd5e739 Merge "Add greedy test for decode/reconstruct result solid" 2016-11-29 19:27:41 +00:00
Kota Tsuyuzaki d163972bb0 Add soft warning log line when using liberasurecode <1.3.1
To apply the fix for a liberasurecode issue [1], we need hard depencency
of liberasurecode requires >=1.3.1. However current binary dependency
maintainance tool "bindep" works only for packagers' repository. (i.e. it
refers the version of apt/yum/etc...) And nothing is cared for the binary
built from source.

This patch provides a way to detect incompatible liberasurecode and
makes a warning log line to syslog which suggest "you're using older
liberasurecode which will be deprecated, please upgrade it".

NOTE:
- This dependency managemnet depends on erasurecode_version.h header
  file in liberasurecode. i.e. it cannot care of overwritten .so library
  after PyECLib built once.

Partial-Bug: #1639691

1: Icee788a0931fe692fe0de31fabc4ba450e338a87

Change-Id: Ice5e96f0a59096cc9067823f0d62d6c7065ed62f
2016-11-28 20:22:57 -08:00
Tim Burke 9cc72f7ce8 Assorted combinatoric-test fixes
* Test flat_xor_hd decoding/reconstruction
* Use random input
* Make py3-friendly

Additionally:

* Accept iterables as fragment payloads, rather than just lists
* Add a __repr__ for ECDrivers

Change-Id: Ic5b5e5ef2420afdc318b403fcbea1ff106e16a33
2016-11-17 09:57:35 -08:00
Kota Tsuyuzaki ea46179001 Add greedy test for decode/reconstruct result solid
Once using erasure code scheme in storage system, we have to trust the
backend's result consistency from decode/reconstruct. Otherwise, the
storage system can be broken easily. To trust the result, this patch
adds greedy combination testing for decode/reconstruct for read-solomn
based backends.

Testing:
- decode result from any k fragments must be consistent with original
  data
- The Nth fragment reconstructed from other k fragments must be
  consistent with the encoded Nth fragment

With this patch, we can confirm the consistency, at least, the testing
spec defined at get_pyeclib_testspec() method, and if you want to test
either other parameters or backends, you can add the spec you want to
test.

Change-Id: Ieb46f4ab5c8f6cb60f35c632728cbcf4a1727c53
2016-11-10 05:34:19 -08:00
Kota Tsuyuzaki ab26abf78c Remove Ryuta Kon from NTT shss reference
He is not working at swift/pyeclib anymore and he doesn't want to keep
his name in the README.md which causes contacts/questions to him.

Change-Id: I0d76fa97dbb8c7f65b1dfa7cf3d0f1771893e1ef
2016-10-23 20:52:51 -07:00
John Dickinson a185b061a1 Updated name in setup.py to work with release tooling.
Change-Id: Ia5b125628f823038187e13af51763bcf717a1521
2016-09-30 09:09:42 -07:00
John Dickinson 498f972c72 1.3.0 release
Change-Id: I044893a975dd644c0ba5958216138828f8aeefb9
2016-09-29 15:21:03 -07:00
Kota Tsuyuzaki cbb3d9364f Ref count for dict item should be Py_DECREF
PyDict_SetItems doesn't steal the reference count so that the reference
count of each item in the dict should be decremented via Py_DECREF
*before* returning the dict to Python VM. Otherwise, those items can be
leaked which can never be collected as garbage.

The evicence for memory leak is avaialble for using debug mode python VM like:
https://gist.github.com/bloodeagle40234/f4c0cd267e085cc6224ffdc1b1822631

Plus, this patch add one unit test to check the memory increasement for
many call of get_segment_info.

Closes-Bug: #1604335

Change-Id: I6780efb9718017d296606f3c7e60684910584a1a
2016-09-07 21:40:47 -07:00
Jenkins 8472bfff39 Merge "Correct fragment size handling" 2016-09-08 04:37:39 +00:00
Kota Tsuyuzaki 1d9cea73cb Correct fragment size handling
Once we have liberasurecode older than depend-on patch, it could make
an invalid mem access if the backend descripter is not available.
(I'm not sure this situation happen in fact, but any other functions in
liberasurecode expecting that failure actually, FWIW)

To recover this failure, this patch fixes to catch the return value from
liberasurecode and if it's an error code, set an error for the return
value to python.

Depends-On: I489f8b5d049610863b5e0b477b6ff70ead245b55
Change-Id: I47d4ec4fa1647c5a4c8d50f0aa6a2df86ca68c80
2016-09-06 22:46:44 -07:00
Jenkins f53a0d5700 Merge "Fix arg k, m to be required" 2016-09-07 05:41:45 +00:00
Kota Tsuyuzaki 25bc26b914 Fix arg k, m to be required
Right now ECDriver doesn't check if k, m exist in the kwargs for init.
That can tigger unfortunately success to init and that will fail at
encode/decode (or result in odd with get_segment_info)

Once, we have jerasure_rs_vand in default, that worked becuase jerasure
did the assertion for the k, m parameters but we can reproduce the
failures which this patch want fix with like:

driver = ECDriver(ec_type='liberasurecode_rs_vand')   # <- this is
default and it succeeded!
driver.encode(' ')  # <- And then, this will result in ECDriverError:
Out of memory, whooa!

This patch fixes this to check the k, m existence in the init process.

Change-Id: I0757c0a4e510ba42f357db0cac22861919d0ca26
2016-09-06 22:36:16 -07:00
Kota Tsuyuzaki d7bb58ae80 Fix some requirements and installation instruction
- Add coverage to test-requirements which was causing import error when
  running `make test`
- Add "make" to bindep.txt for rpm package
- Add "python-dev/python-devel" to bindep.txt
- Add some instration guide example, how to install those dependency
  packages

Change-Id: Ib4a19e734e68ac4d3be7ea13dc72a97b4e209b2b
2016-08-18 18:56:11 -07:00
Jenkins ac702cf546 Merge "Change liberasure URL to new one" 2016-08-18 09:03:22 +00:00
Jenkins 410388392d Merge "Bump liberasurecode dependency to 1.2.0 version" 2016-08-13 10:52:08 +00:00
Kota Tsuyuzaki 10802bac59 Add tox/requirements settings to pass gate job
Plus, we need liberasurecode version handling for a few place because
some tests/engine itself is broken with a lack of backword
compatibility.

Closes-Bug: #1586220

Change-Id: I72adaefa10875a73e3e5304eb40fe5d9f6d2598a
2016-08-12 00:05:03 -07:00
Ondřej Nový 1b6ec8dd0a Change liberasure URL to new one
Change-Id: Ie69dada7082df2eb9ceb73d54fbca4d3cd941e5c
2016-06-01 15:44:17 +02:00