Project

General

Profile

Bug #49711

cephfs-mirror: symbolic links do not get synchronized at times

Added by Venky Shankar about 1 month ago. Updated 19 days ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Due to this problematic code in src/tools/cephfs_mirror/PeerReplayer.cc:

char *target = (char *)alloca(stx.stx_size+1);
r = ceph_readlink(m_local_mount, local_path.c_str(), target, stx.stx_size);
if (r < 0) {
  derr << ": failed to readlink local path=" << local_path << ": " << cpp_strerror(r)
       << dendl;
  return r;
}

r = ceph_symlink(m_remote_mount, target, remote_path.c_str());
if (r < 0 && r != EEXIST) {
  derr << ": failed to symlink remote path=" << remote_path << " to target=" << target
       << ": " << cpp_strerror(r) << dendl;
  return r;
}

`target` is not null-terminated resulting in possible garbage-suffixed target getting created on the remote filesystem.


Related issues

Copied to CephFS - Backport #49765: pacific: cephfs-mirror: symbolic links do not get synchronized at times Resolved

History

#1 Updated by Venky Shankar about 1 month ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 40004

#2 Updated by Venky Shankar about 1 month ago

  • Status changed from Fix Under Review to Pending Backport

#3 Updated by Backport Bot about 1 month ago

  • Copied to Backport #49765: pacific: cephfs-mirror: symbolic links do not get synchronized at times added

#4 Updated by Loïc Dachary 19 days ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF