hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

Improve supervisor eventlog locking and API compliance. #378

Closed wrouesnel closed 7 years ago

wrouesnel commented 7 years ago

Add finer-grained locking to the supervisor eventlog based on the upstream docker containerd code.

Adds full compliance for the Event() API by supporting queries for specific container IDs and stored events only, as required by newer Docker daemons in order to recover from hard shutdowns without deadlocking the docker daemon.

This fixes the problem of deadlocking docker when running with runv and doing a hard shutdown, as runv was not responding with the events docker actually wanted.

The code is mostly adapted from https://github.com/docker/containerd/blob/master/supervisor/supervisor.go.

wrouesnel commented 7 years ago

Hm, this actually looks like the issue in #379 is being made visible to tests now...

wrouesnel commented 7 years ago

This patch is built on the prior PR at this point, and not quite ready since it doesn't pass existing tests yet. I'm still playing around with the event log code to figure out how it should best work.

laijs commented 7 years ago

@wrouesnel runv cli is being improved continuously and had just been refactored at #537 . As a result, it seams that the changes in this pr is outdated. Thank you for your contribution.