Skip to content

Cleanup stale overlay sandboxes#901

Merged
mavenugo merged 1 commit intomoby:masterfrom
mrjana:bugs
Jan 26, 2016
Merged

Cleanup stale overlay sandboxes#901
mavenugo merged 1 commit intomoby:masterfrom
mrjana:bugs

Conversation

@mrjana
Copy link
Copy Markdown
Contributor

@mrjana mrjana commented Jan 26, 2016

When the daemon is ungracefully shutdown, sometimes
when we try to create the overlay sandbox after coming
back up might get created in a different epoch count
which will result in the vxlan interface not properly
cleaned up. Fix this by explicitly cleaning up all the
previous epoch sandboxes.

Signed-off-by: Jana Radhakrishnan mrjana@docker.com

Comment thread drivers/overlay/ov_network.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given you are already using one Sprintf, why not using it for inserting the network id into the string ? This way you avoid another string buffer operation.

path := osl.GenerateKey(fmt.Sprintf("%d-%s", i, n.id))

@aboch
Copy link
Copy Markdown
Contributor

aboch commented Jan 26, 2016

LGTM

Comment thread drivers/overlay/ov_network.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better if we check for the full network ID contains the full filename (after the marker).
That will take care of also the insanely high epoch number.

When the daemon is ungracefully shutdown, sometimes
when we try to create the overlay sandbox after coming
back up might get created in a different epoch count
which will result in the vxlan interface not properly
cleaned up. Fix this by explicitly cleaning up all the
previous epoch sandboxes.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@mavenugo
Copy link
Copy Markdown
Contributor

LGTM.
... waiting on CI.

mavenugo added a commit that referenced this pull request Jan 26, 2016
Cleanup stale overlay sandboxes
@mavenugo mavenugo merged commit 82252ef into moby:master Jan 26, 2016
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