]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephfs-shell: put cmd must accept both paths and validate local_path
authordparmar18 <dparmar@redhat.com>
Fri, 8 Apr 2022 14:25:24 +0000 (19:55 +0530)
committerdparmar18 <dparmar@redhat.com>
Tue, 17 May 2022 08:15:48 +0000 (13:45 +0530)
commit3d9fb7e7de2c0bddc55db1eb35b0f307e37a8d49
tree96bce0665c050a0f14bc98444ec692765e31733c
parentccc27304cd75e360dcd18bd8aa3b1b9dae474abc
cephfs-shell: put cmd must accept both paths and validate local_path

Description:

- `put` command didn't display any error when file at local_path was not
   found. This PR intends to add that check.
   - Rationale: Till now, there used to be a default path of `remote_path` as
                `default='.'` but wasn't mentioned anywhere. It could lead to confusion.
                On top of it, considering put command to be a ssh inspired utlity,
                or any other CLI tool that copies file between filesystems, source
                and destination path are always mandatory. Therefore in order to
                simulate this behavior in cephfs-shell`s command(s), my opinion is
                to make put command accept both the paths.

Fixes: https://tracker.ceph.com/issues/55242
Signed-off-by: dparmar18 <dparmar@redhat.com>
(cherry picked from commit cfeab92ec8d5a258d7eb48318e3e083d90383bfb)
src/tools/cephfs/cephfs-shell