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
mgr/rbd_support: support scheduling long-running background operations #29054
Conversation
7c1868c
to
b1bba53
Compare
|
@rjfd No rush, but when you get a chance, can you review my changes to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
progress module changes look good, thanks!
|
@rjfd ... and if the dashboard wants to translate the |
e9ece2a
to
a7399bd
Compare
That's great! This way the problem I had with knowing the "event type" is solved with the pair |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dillaman There are some issues when testing on python2.7.
|
And yet another thing noticed. When the test failed for some reason while there were tasks in the mgr in-memory queue, and then the pool was deleted, the task remained int the mgr in-memory queue until it was restarted. |
This callback can be used to track progress and also to attempt to cancel the operation while it's in-progress by returning a negative error code from the callback. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This allows the error to be directly caught instead of attempting to parse the OSError.errno Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Fixes: http://tracker.ceph.com/issues/40621 Signed-off-by: Jason Dillaman <dillaman@redhat.com>
The failed events can also include a failure message to indicate the reason for the failure. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This dict will include an origin key fixed to 'rbd_support' as well as pool and image references. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
The new [1] http://pulpito.ceph.com/jdillaman-2019-07-25_10:51:34-rbd-wip-jd-testing-distro-basic-smithi/ |
The 'ceph' CLI will duplicate commands within teuthology to test the MONs idempotency. This shouldn't be required for the MGR module, but we can keep a fixed set of completed tests to handle this possible command replay. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
And just as note, I suppose this this a bug in progress module, but when displaying a task progress (either with And this |
Yes, it's the duration. And I agree "since ..." is misleading. |
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
|
I added a tracker ticket [1] for the unrelated progress issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Just cosmetic. When remove is canceled, we have in the mgr log: It does not look very bad, as I suppose for a user from the error message it is clear that it is not actually an error but just cancel, but I can imagine it could be improved if you think it is worth doing. |
It could be improved in a later PR I think (throughout since it will affect more than just removal I'd suspect). |
Certain RBD operations might take a long (blocking) amount of time so it would be preferable if we offered a way to schedule these tasks to run in the background. We would expose the ability to manage these background tasks via the MGR's "rbd_support" module via "ceph" CLI commands similar to the following:
The
ceph-csiwill be one of the first to utilize these new background tasks to offload its workload and support proper re-starting of in-progress events.