Docker run command has an option that automatically
removes the container when it exits. This commit introduces
the equivalent in Zun. In particular, this commit does
the followings:
* Introduce an 'auto_remove' field in container. If this
field is set, the container will be automatically
removed when it exits.
* Introduce a new container state 'Delete'. This states
indicated that the container has been automatically
removed, but the record is still existed in DB.
* Bump the docker REST API version to 1.25 or higher
since 'auto_remove' feature was introduced in 1.25.
There are several future work of this commit. The first task is
to add a tempest test to verify the container is indeed
auto-removed in docker daemon. The second task is to introduce
a periodic task that purge container in 'Deleted' state.
Co-Authored-By: Hongbin Lu <email address hidden>
Co-Authored-By: Kien Nguyen <email address hidden>
Related-Bug: #1644901
Reviewed: https:/ /review. openstack. org/418942 /git.openstack. org/cgit/ openstack/ zun/commit/ ?id=2a0a7992b95 9f70696a6b08655 2d6fad33548584
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2a0a7992b959f70 696a6b086552d6f ad33548584
Author: prameswar <email address hidden>
Date: Wed Jan 11 03:22:50 2017 +0000
Added support for Auto remove the container
Docker run command has an option that automatically
removes the container when it exits. This commit introduces
the equivalent in Zun. In particular, this commit does
the followings:
* Introduce an 'auto_remove' field in container. If this
field is set, the container will be automatically
removed when it exits.
* Introduce a new container state 'Delete'. This states
indicated that the container has been automatically
removed, but the record is still existed in DB.
* Bump the docker REST API version to 1.25 or higher
since 'auto_remove' feature was introduced in 1.25.
There are several future work of this commit. The first task is
to add a tempest test to verify the container is indeed
auto-removed in docker daemon. The second task is to introduce
a periodic task that purge container in 'Deleted' state.
Co-Authored-By: Hongbin Lu <email address hidden>
Co-Authored-By: Kien Nguyen <email address hidden>
Related-Bug: #1644901
Change-Id: Ic6d35274a49648 bde5e0e7486453a 6d1a13f6f2e