summaryrefslogtreecommitdiffstats
path: root/glustolibs-io
diff options
context:
space:
mode:
authorkshithijiyer <kshithij.ki@gmail.com>2020-07-31 12:33:31 +0530
committerArthy Loganathan <aloganat@redhat.com>2020-07-31 10:49:07 +0000
commit73468c9eebfe9d89cfaf554c1b945e2ecfed9cb8 (patch)
treee2a7f4d297fd95ae9e3bfde48b5a2f4085514383 /glustolibs-io
parent81d36e853d1a208764d904ae927c333b304fa1cb (diff)
[Testfix] Fix I/O logic to use distinct file names
Problem: Testcases test_mount_snap_delete and test_restore_online_vol were failing in the latest runs with the below traceback ``` Traceback (most recent call last): File "/usr/share/glustolibs/io/scripts/file_dir_ops.py", line 1246, in <module> rc = args.func(args) File "/usr/share/glustolibs/io/scripts/file_dir_ops.py", line 374, in create_files base_file_name, file_types) File "/usr/share/glustolibs/io/scripts/file_dir_ops.py", line 341, in _create_files ret = pool.map(lambda file_tuple: _create_file(*file_tuple), files) File "/usr/lib64/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib64/python3.6/multiprocessing/pool.py", line 644, in get raise self._value File "/usr/lib64/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/lib64/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(*args)) File "/usr/share/glustolibs/io/scripts/file_dir_ops.py", line 341, in <lambda> ret = pool.map(lambda file_tuple: _create_file(*file_tuple), files) File "/usr/share/glustolibs/io/scripts/file_dir_ops.py", line 270, in _create_file with open(file_abs_path, "w+") as new_file: FileExistsError: [Errno 17] File exists: '/mnt/testvol_distributed_glusterfs/file1.txt' ``` This was because I/O logic was trying to create 2 files with the same name from 2 clients. Fix: Modify logic to use counters to create files with different names. Change-Id: I2896736d28f6bd17435f941088fd634347e3f4fd Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'glustolibs-io')
0 files changed, 0 insertions, 0 deletions