I wonder how "chksum_type" is determined?
root@swift-test-02:~# cat audit_frag.py #!/usr/bin/env python import sys from swift.common.storage_policy import POLICIES
policy = POLICIES[2]
with open(sys.argv[1]) as f: for frag_data in iter(lambda: f.read(policy.fragment_size), ''): print '%r' % policy.pyeclib_driver.get_metadata(frag_data, formatted=True) root@swift-test-02:~# LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libz.so python audit_frag.py /srv/node/d11/objects-2/398/465/6381800fa3e800cd36d6ea5bf4fd6465/1458349982.69822#3.data {'index': 3, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 6110L, 'chksum_type': 'none', 'backend_version': 140376711236864, 'chksum': '', 'size': 2037} root@swift-test-02:~# LD_PRELOAD=/usr/lib/liberasurecode.so.1.4.0 python audit_frag.py /srv/node/d11/objects-2/398/465/6381800fa3e800cd36d6ea5bf4fd6465/1458349982.69822#3.data {'index': 3, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 6110L, 'chksum_type': 'none', 'backend_version': 139775415815424, 'chksum': '', 'size': 2037}
ubuntu@saio:/vagrant/.scratch$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libz.so python audit_frag.py /srv/node3/sdb3/objects-1/589/c2b/93464008f434853ad9b74c8c5381ac2b/1498598728.24878#2#d.data {'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 1048576L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 524288} {'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 1048576L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 524288} {'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 5473L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 2737} ubuntu@saio:/vagrant/.scratch$ LD_PRELOAD=/usr/local/lib/liberasurecode.so.1.4.0 python audit_frag.py /srv/node3/sdb3/objects-1/589/c2b/93464008f434853ad9b74c8c5381ac2b/1498598728.24878#2#d.data Traceback (most recent call last): File "audit_frag.py", line 9, in <module> print policy.pyeclib_driver.get_metadata(frag_data, formatted=True) File "/vagrant/pyeclib/pyeclib/ec_iface.py", line 335, in get_metadata return self.ec_lib_reference.get_metadata(fragment, formatted) File "/vagrant/pyeclib/pyeclib/core.py", line 127, in get_metadata formatted) pyeclib.ec_iface.ECInvalidFragmentMetadata: pyeclib_c_get_metadata ERROR: Fragment integrity check failed. Please inspect syslog for liberasurecode error report.
I wonder how "chksum_type" is determined?
root@swift- test-02: ~# cat audit_frag.py storage_ policy import POLICIES
#!/usr/bin/env python
import sys
from swift.common.
policy = POLICIES[2]
with open(sys.argv[1]) as f: policy. fragment_ size), ''): pyeclib_ driver. get_metadata( frag_data, formatted=True) test-02: ~# LD_PRELOAD= /usr/lib/ x86_64- linux-gnu/ libz.so python audit_frag.py /srv/node/ d11/objects- 2/398/465/ 6381800fa3e800c d36d6ea5bf4fd64 65/1458349982. 69822#3. data test-02: ~# LD_PRELOAD= /usr/lib/ liberasurecode. so.1.4. 0 python audit_frag.py /srv/node/ d11/objects- 2/398/465/ 6381800fa3e800c d36d6ea5bf4fd64 65/1458349982. 69822#3. data
for frag_data in iter(lambda: f.read(
print '%r' % policy.
root@swift-
{'index': 3, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 6110L, 'chksum_type': 'none', 'backend_version': 140376711236864, 'chksum': '', 'size': 2037}
root@swift-
{'index': 3, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 6110L, 'chksum_type': 'none', 'backend_version': 139775415815424, 'chksum': '', 'size': 2037}
ubuntu@ saio:/vagrant/ .scratch$ LD_PRELOAD= /usr/lib/ x86_64- linux-gnu/ libz.so python audit_frag.py /srv/node3/ sdb3/objects- 1/589/c2b/ 93464008f434853 ad9b74c8c5381ac 2b/1498598728. 24878#2# d.data saio:/vagrant/ .scratch$ LD_PRELOAD= /usr/local/ lib/liberasurec ode.so. 1.4.0 python audit_frag.py /srv/node3/ sdb3/objects- 1/589/c2b/ 93464008f434853 ad9b74c8c5381ac 2b/1498598728. 24878#2# d.data pyeclib_ driver. get_metadata( frag_data, formatted=True) pyeclib/ pyeclib/ ec_iface. py", line 335, in get_metadata lib_reference. get_metadata( fragment, formatted) pyeclib/ pyeclib/ core.py" , line 127, in get_metadata ec_iface. ECInvalidFragme ntMetadata: pyeclib_ c_get_metadata ERROR: Fragment integrity check failed. Please inspect syslog for liberasurecode error report.
{'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 1048576L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 524288}
{'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 1048576L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 524288}
{'index': 2, 'chksum_mismatch': 0, 'backend_id': 'isa_l_rs_vand', 'orig_data_size': 5473L, 'chksum_type': 'none', 'backend_version': 134400, 'chksum': '', 'size': 2737}
ubuntu@
Traceback (most recent call last):
File "audit_frag.py", line 9, in <module>
print policy.
File "/vagrant/
return self.ec_
File "/vagrant/
formatted)
pyeclib.