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: destination pool should be source pool if it is not specified #13189

Merged
merged 1 commit into from Feb 1, 2017

Conversation

Projects
None yet
2 participants
@gaurav36
Contributor

gaurav36 commented Jan 30, 2017

Currently if user perform image rename operation and user give pool
name as a optional parameter (--pool=<pool_name>) then currently
its taking this optional pool name for source pool and making
destination pool name default pool name.
With this fix if user provide pool name as a optional pool name
parameter then it will consider both soruce and destination pool
name as optional parameter pool name.

Fixes: http://tracker.ceph.com/issues/18326

Reported-by: МАРК КОРЕНБЕРГ socketpair@gmail.com
Signed-off-by: Gaurav Kumar Garg garg.gaurav52@gmail.com

@@ -42,6 +42,7 @@ int execute(const po::variables_map &vm) {
return r;
}
std::string dst_pool;
std::string dst_pool_name;

This comment has been minimized.

@dillaman

dillaman Jan 30, 2017

Contributor

Wouldn't you be able to just default dst_pool_name to the current value of pool_name? If the pool name was provided in the positional or via the "--dest-pool" optional, it would be overwritten -- otherwise, since it isn't empty, it won't be defaulted to "rbd"

This comment has been minimized.

@gaurav36

gaurav36 Jan 31, 2017

Contributor

@dillaman thanks, this would be better, fixed in next updated PR.

@dillaman

This comment has been minimized.

Contributor

dillaman commented Jan 31, 2017

@gaurav36 Looks like the "copy.sh" workunit needs to be updated to handle the new behavior [1]

[1] http://qa-proxy.ceph.com/teuthology/jdillaman-2017-01-31_13:10:29-rbd-wip-jd-testing-distro-basic-smithi/769794/teuthology.log

@gaurav36

This comment has been minimized.

Contributor

gaurav36 commented Feb 1, 2017

@dillaman right, wondering why this test have passed before wip-jason-testing. will update copy.sh test case file.

rbd: destination pool should be source pool if it is not specified
Currently if user perform image rename operation and user give pool
name as a optional parameter (--pool=<pool_name>) then currently
its taking this optional pool name for source pool and making
destination pool name default pool name.
With this fix if user provide pool name as a optional pool name
parameter then it  will consider both soruce and destination pool
name as optional parameter pool name.

Fixes: http://tracker.ceph.com/issues/18326

Reported-by: МАРК КОРЕНБЕРГ <socketpair@gmail.com>
Signed-off-by: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
@dillaman

This comment has been minimized.

Contributor

dillaman commented Feb 1, 2017

@gaurav36 My guess is that it never passed before (since it couldn't). GitHub doesn't run every possible test whenever someone pushes a new build.

@gaurav36

This comment has been minimized.

Contributor

gaurav36 commented Feb 1, 2017

@dillaman GitHub should run all possible test case.
what is wip-jason-testing label ? may be we can include this label in this updated PR.

@dillaman

This comment has been minimized.

Contributor

dillaman commented Feb 1, 2017

@dillaman dillaman merged commit a1b088a into ceph:master Feb 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment