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

crimson/osd: add --mkkey support #28534

Merged
merged 5 commits into from Jun 14, 2019
Merged

Conversation

tchaikov
Copy link
Contributor

No description provided.

@@ -1838,6 +1844,33 @@ ssize_t buffer::list::read_fd(int fd, size_t len)
return ret;
}

#ifdef WITH_SEASTAR
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i can move this helper into src/crimson/common so we don't need to taint buffer.h and buffer.cc in this way.

Copy link
Contributor

Choose a reason for hiding this comment

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

We might also consider src/common/buffer_seastar.cc.

derr << "Unable to get a Ceph keyring." << dendl;
forker.exit(1);
}
KeyRing keyring;
Copy link
Contributor

Choose a reason for hiding this comment

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

ACK.

@@ -1838,6 +1844,33 @@ ssize_t buffer::list::read_fd(int fd, size_t len)
return ret;
}

#ifdef WITH_SEASTAR
Copy link
Contributor

Choose a reason for hiding this comment

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

We might also consider src/common/buffer_seastar.cc.

src/crimson/osd/main.cc Show resolved Hide resolved
@tchaikov
Copy link
Contributor Author

tchaikov commented Jun 13, 2019

i will move the read/write file helpers for crimson to src/common/buffer_seastar.cc as write(const bufferlist&, sstring path, permissions) and bufferlist read(sstring path) are just consumers of buffer::list. there is no need to add them as member functions.

it never fails unless out of memory. and it would be simpler to just
allocate it on stack.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
instead of using the blocking calls

so we can write to file without blocking the reactor

Signed-off-by: Kefu Chai <kchai@redhat.com>
see qa/tasks/ceph.py for how it is used, and why we need it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
OSD::stop() is a top-level method in the sense that it will be called
directly when engine stops. so it should not throw any exceptions.
instead, we will print out the error and ignore the exception if any.

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

@rzarzynski fixed and repushed.

Copy link
Contributor

@rzarzynski rzarzynski left a comment

Choose a reason for hiding this comment

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

LGTM.

@tchaikov tchaikov merged commit 5e1c53e into ceph:master Jun 14, 2019
@tchaikov tchaikov deleted the wip-crimson-mkkey branch June 14, 2019 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2 participants