Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

'vmdk-opsd stop' needs to drain operations in flight #1073

Closed
msterin opened this issue Mar 23, 2017 · 1 comment
Closed

'vmdk-opsd stop' needs to drain operations in flight #1073

msterin opened this issue Mar 23, 2017 · 1 comment
Assignees

Comments

@msterin
Copy link
Contributor

msterin commented Mar 23, 2017

Currently vmdk-opsd stop just stops (exits) the vmdk_ops.py service. If there were operations in fligth it could kill them in the middle of execution. That can potentially create inconsistencies in VM attachement, KV files or auth-db.

To prevent this, we need to drain the ops in flight before stopping.
Something along this line
[ ] On 'stop' requests, add a barrier so executeRequest does fails all new incoming requests with "The server is stopping, operation declined".
[ ] Add count of ops in flight, and when barrier is installed makes sure the count drops to zero before proceeding
[ ] Add a way to force-kill the service in case something is stuck (e.g. a 10TB format is running). This will behave as today's "stop" but issue additional message about potential danger. I suggest vmdk-opsd kill.
[ ] Add a message for "status" that the "service is being stopped, waiting for completion of X operations in flight "

//CC @pdhamdhere

@msterin msterin added this to the v1 GA milestone Mar 23, 2017
@tusharnt tusharnt modified the milestones: Sprint - Pumbaa, v1 GA, Future Jul 25, 2017
@shaominchen
Copy link
Contributor

[ ] Add a message for "status" that the "service is being stopped, waiting for completion of X operations in flight "

As per offline discussion with @msterin, we think it makes more sense to print the message for "stop" itself instead of doing that for "status".

shaominchen pushed a commit to shaominchen/docker-volume-vpshere that referenced this issue Aug 16, 2017
shaominchen pushed a commit that referenced this issue Aug 17, 2017
shuklanirdesh82 pushed a commit that referenced this issue Aug 18, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants