Skip to content

Content store fix and import integration test#2696

Merged
estesp merged 2 commits intocontainerd:masterfrom
dmcgowan:import-docker-tar-test
Oct 3, 2018
Merged

Content store fix and import integration test#2696
estesp merged 2 commits intocontainerd:masterfrom
dmcgowan:import-docker-tar-test

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan commented Oct 1, 2018

Test all supported formats for import and a couple small fixes in the import.

Move tar creation test utilities to separate package.

Move tar creation test utilities to separate package
Test all supported formats for import

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan added this to the 1.2 milestone Oct 2, 2018
@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Oct 2, 2018

The unit test failure found a real bug in the content store where an already exists error on commit would cause the content not get leased since the transaction would fail. Now the same error is returned but the transaction is allowed to complete with setting the lease when already exists is returned. This has a larger effect on import since the writer does not set the digest on open which correctly handles this condition.

@dmcgowan dmcgowan changed the title Add import integration test Content store fix and import integration test Oct 2, 2018
Copy link
Copy Markdown
Member

@stevvooe stevvooe left a comment

Choose a reason for hiding this comment

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

LGTM

The only problem here is that the caller may assume the transaction was completely rolled back in the case of an error. However, I am not sure if we rely on that assumption.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM; do we need this content store fix cherry-picked to 1.1.x?

@estesp estesp merged commit 90b7b88 into containerd:master Oct 3, 2018
@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Oct 3, 2018

The only problem here is that the caller may assume the transaction was completely rolled back in the case of an error. However, I am not sure if we rely on that assumption.

We don't document it but we don't guarantee that an already exists error didn't make a database change, the object certainly remains untouched but the lease is updated.

do we need this content store fix cherry-picked to 1.1.x?

If we backport any of the fixes related to import yes, there was a bug fixed there which either caused this one or just didn't cover this case. Import is the only client operation I know of right now that will attempt to ingest to the content store without using a digest on open or commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants