diff options
author | Clay Gerrard <clay.gerrard@gmail.com> | 2017-02-09 23:17:17 -0800 |
---|---|---|
committer | Janie Richling <jrichli@us.ibm.com> | 2017-02-10 11:28:43 -0600 |
commit | 5bb3ea162c7cd264d0c434bc8ac8240f964d2904 (patch) | |
tree | 258a6eb08ed0999d3715edc94c126c0bbc315e91 | |
parent | 6249945a4f3b634b1e298b5a730853d1c1ee8dea (diff) | |
download | swift-5bb3ea162c7cd264d0c434bc8ac8240f964d2904.tar.gz |
Ignore cache files when comparing synced parts
Prior to the Related-Change no suffixes were written to hashes.invalid
until after initial suffix hashing created hashes.pkl - and in our probe
test the only updates to the partition occurred before replication.
Before the related change with sync_method = rsync it was possible when
starting from a clean slate to write data, and replicate from a handoff
partition without generating a hashes.invalid file in any primary.
After the Related-Change it was no longer possible to write data without
generating a hashes.invalid file; however with sync_method = rsync the
replicator could still replicate data into a partition that never
received an update directly and therefore no hashes.invalid.
When using sync_method = ssync replication updates the hashes.invalid
like any normal update to the partition and therefore all partitions
always have a hashes.invalid.
This change opts to ignores these implementation details in the probe
tests when comparing the files between synced partitions by
black-listing these known cache files and only validates that the disk
file's on disk files are in sync.
Related-Change-Id: I2b48238d9d684e831d9777a7b18f91a3cef57cd1
Change-Id: Ia9c50d7bc1a74a17c608a3c3cfb8f93196fb709d
Closes-Bug: #1663021
-rw-r--r-- | test/probe/test_replication_servers_working.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/probe/test_replication_servers_working.py b/test/probe/test_replication_servers_working.py index d8b3915fa..c486f93c6 100644 --- a/test/probe/test_replication_servers_working.py +++ b/test/probe/test_replication_servers_working.py @@ -26,6 +26,8 @@ from swift.obj.diskfile import get_data_dir from test.probe.common import ReplProbeTest from swift.common.utils import readconf +EXCLUDE_FILES = ['hashes.pkl', 'hashes.invalid', '.lock'] + def collect_info(path_list): """ @@ -41,6 +43,7 @@ def collect_info(path_list): temp_files_list = [] temp_dir_list = [] for root, dirs, files in os.walk(path): + files = [f for f in files if f not in EXCLUDE_FILES] temp_files_list += files temp_dir_list += dirs files_list.append(temp_files_list) |