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-mirror: image deletions should be handled by assigned instance #14832

Merged
merged 6 commits into from Apr 28, 2017

Conversation

dillaman
Copy link

No description provided.

@@ -175,9 +175,6 @@ class BootstrapRequest : public BaseRequest {

bufferlist m_out_bl;

void get_local_image_id();
void handle_get_local_image_id(int r);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update the state diagram

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Jason Dillaman added 6 commits April 27, 2017 15:54
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This state machine will be invoked before the bootstrap state machine
and will be responsible for detecting if the local image is already
primary or if it needs to be deleted.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@@ -335,7 +336,8 @@ void ImageReplayer<I>::add_remote_image(const std::string &mirror_uuid,

template <typename I>
void ImageReplayer<I>::remove_remote_image(const std::string &mirror_uuid,
const std::string &image_id) {
const std::string &image_id,
bool schedule_delete) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you might want to use spaces vs tabs here

@@ -109,7 +109,8 @@ class ImageReplayer {
const std::string &remote_image_id,
librados::IoCtx &remote_io_ctx);
void remove_remote_image(const std::string &remote_mirror_uuid,
const std::string &remote_image_id);
const std::string &remote_image_id,
bool schedule_delete);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs vs spaces

image_replayer->remove_remote_image(peer_mirror_uuid, peer_image_id);
if (!peer_mirror_uuid.empty()) {
image_replayer->remove_remote_image(peer_mirror_uuid, peer_image_id,
schedule_delete);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs

Copy link
Contributor

@trociny trociny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@trociny trociny merged commit 6258e4c into ceph:master Apr 28, 2017
@dillaman dillaman deleted the wip-rbd-mirror-deletion branch April 28, 2017 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants