Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rbd: replace positional_path parameter with arg_index in get_path() #19722

Merged
merged 1 commit into from Jan 7, 2018

Conversation

Projects
None yet
2 participants
@Songweibin
Copy link
Contributor

commented Dec 30, 2017

fix:

[root@ ~]# rbd import --path export_img1 pool1/img2
rbd: error opening pool1/img2
rbd: import failed: (2) No such file or directory

Signed-off-by: songweibin song.weibin@zte.com.cn

@@ -806,10 +806,10 @@ int get_image_size(const boost::program_options::variables_map &vm,

int get_path(const boost::program_options::variables_map &vm,
const std::string &positional_path, std::string *path) {

This comment has been minimized.

Copy link
@dillaman

dillaman Jan 2, 2018

Contributor

You should replace const std::string& positional_path with a size_t* arg_index parameter so that it directly grabs the positional argument and then increments the arg_index.

rbd: replace positional_path parameter with arg_index in get_path()
Signed-off-by: songweibin <song.weibin@zte.com.cn>

@Songweibin Songweibin force-pushed the Songweibin:wip-rbd-import branch from 98dd5e5 to e96b55f Jan 4, 2018

@Songweibin Songweibin changed the title rbd: priority to utilize 'at::PATH' rather than 'positional_path' rbd: replace positional_path parameter with arg_index in get_path() Jan 4, 2018

@Songweibin

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2018

@dillaman Done, thank you.
Also fix these:

[root@ ~]# rbd export --pool pool1 --image img1 export_img1.1       
rbd: path was not specified
[root@ ~]# 
[root@ ~]# rbd export-diff --pool pool1 --image img1 export_diff_img1.1
rbd: path was not specified
[root@ ~]# 
[root@ ~]# rbd import-diff --path export_diff_img1.1 pool1/img1.1
rbd: image name was not specified
[root@ ~]# 
[root@ ~]# rbd journal export --journal 86121c74b0dc51 journal_export_86121c74b0dc51
rbd: path was not specified
[root@ ~]# 
[root@ ~]# rbd journal import --path journal_export_86121c74b0dc51 86121c74b0dc51               
rbd: destination journal was not specified
@dillaman
Copy link
Contributor

left a comment

lgtm

@dillaman dillaman merged commit ff889ea into ceph:master Jan 7, 2018

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@Songweibin Songweibin deleted the Songweibin:wip-rbd-import branch Jan 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.