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

Restore container cleanup #214

Merged
merged 1 commit into from
Aug 28, 2015
Merged

Conversation

rajasec
Copy link
Contributor

@rajasec rajasec commented Aug 20, 2015

When the container is destroyed or not running, I tried to do the runc restore, restore failed which is expected because neither it was checkpointed.
But after restore failure, it failed to clean up the directory /run/oci/runc which has been created from restore.go file
This prevents to run the runc next time, because runc reported saying Container ID already exists.

So I've added the code to handle this situation to clean up the /run/oci/ directory when user tried to run runc restore on destroyed container.
I've ensure that this will not affect the checkpointed container by adding condition to work ( clean up) only on destroyed containers.

Signed-off-by: rajasec rajasec79@gmail.com

Signed-off-by: rajasec <rajasec79@gmail.com>
@crosbymichael
Copy link
Member

LGTM

1 similar comment
@LK4D4
Copy link
Contributor

LK4D4 commented Aug 28, 2015

LGTM

LK4D4 added a commit that referenced this pull request Aug 28, 2015
@LK4D4 LK4D4 merged commit 98e6e70 into opencontainers:master Aug 28, 2015
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
config: Require a new UTS namespace for config.json's hostname
stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
This restriction originally landed via 02b456e (Clarify behavior
around namespaces paths, 2015-09-08, opencontainers#158).  The hostname case landed
via 66a0543 (config: Require a new UTS namespace for config.json's
hostname, 2015-10-05, opencontainers#214) citing the namespace restriction.  The
restriciton extended to runtime namespaces in 01c2d55 (config-linux:
Extend no-tweak requirement to runtime namespaces, 2016-08-24, opencontainers#538).
There was a proposal in-flight to get config-wide consistency around
the no-tweaking concept [1].

In today's meeting, the maintainer consensus was to strike the
no-tweaking restriction [2], which is what I've done here.  I've
removed the ROADMAP entry because this gives folks a way to adjust
existing containers (launch a new container which joins and tweaks the
original).

The hostname entry still mentions the UTS namespace to provide a guard
against accidental foot-gunning.  There was no no-tweaking language
for properties related to other namespaces (e.g. 'mounts').
Maybe the other namespaces have more obvious names.

[1]: opencontainers/runtime-spec#540
[2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2017/opencontainers.2017-01-11-22.04.log.html#l-117

Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants