1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 00:49:30 +01:00
Files
glusterfs/extras
Shwetha Acharya ae85973e0f geo-rep: Changelog History Crawl failure (#2768)
* geo-rep: Changelog History Crawl failure

Issue:

glusterfs-georep-upgrade.py is designed to be run
before the upgrade.

However, many users missed to run it before the
upgrade. When they ran it after the upgrade, following issue
was encountered:

Traceback (most recent call last):
  File "./glusterfs-georep-upgrade.py", line 77, in <module>
    modify_htime_file(args.brick_path)
  File "./glusterfs-georep-upgrade.py", line 61, in modify_htime_file
    shutil.copyfile(pth, os.path.join(path, changelog))
  File "/usr/lib/python3.7/shutil.py", line 104, in copyfile
    raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: '/storage/glusterfs/guacamole/.glusterfs/changelogs/
2020/12/30/CHANGELOG.1609357688' and '/storage/glusterfs/guacamole/.glusterfs/
changelogs/2020/12/30/CHANGELOG.1609357688' are the same file

This happened because, new changelogs formed after the
upgrade were already in required directories, thus making
the source and destination same for shutil.copyfile

Solution:

Added exception handling for shutil.copyfile inorder to pass the
situation where source and destination are same.

Fixes: #2133
Change-Id: I3752ac304bd393f6b786bd67a63360f68bf8b8db
Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>

* Update glusterfs-georep-upgrade.py
2021-09-16 07:03:45 +05:30
..
2018-08-29 11:09:27 -04:00
2018-09-12 17:52:45 +05:30
2018-08-29 11:09:27 -04:00
2019-01-30 14:24:14 +05:30