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

tests: don't call wait_for_container after synchronous operations #1433

Merged
merged 2 commits into from
May 5, 2017

Conversation

avagin
Copy link
Contributor

@avagin avagin commented May 2, 2017

It is useless and potentially we can skip bugs.

Signed-off-by: Andrei Vagin [email protected]

@avagin avagin force-pushed the wait_for_container branch from 00be075 to a9e15e7 Compare May 2, 2017 21:55
@cyphar
Copy link
Member

cyphar commented May 3, 2017

The reason for wait_for_container is to avoid races in tests between detached container runs and operations on the detached container. I don't have a problem with removing them from the checkpoint/restore tests if you're sure they're not necessary but I'm fairly sure that we do need them for most of the other tests.

@avagin
Copy link
Contributor Author

avagin commented May 3, 2017

@cyphar I think I don't understand the problem. Could you give more details?

Do you want to say that "runc run -d test" exits before the container achieves the running state? It sounds weird.

@avagin
Copy link
Contributor Author

avagin commented May 3, 2017

Cc: @mikebrow

@avagin
Copy link
Contributor Author

avagin commented May 3, 2017

@cyphar I tried to put sleep in different places and everything works fine.

@cyphar
Copy link
Member

cyphar commented May 3, 2017

Hmmm, okay. I'm wondering if this is something that we fixed after the --console-socket changes (where init will block until the socket is sent) and thus we no longer have races like that. In which case, I'm fine with dropping it.

I do recall that there were issues in the past when we didn't have wait_for_container but those issues have been resolved, I guess.

@avagin
Copy link
Contributor Author

avagin commented May 3, 2017

@cyphar thank you for the feedback. I think that we want to detect this sort of issues in future, so it probably better to remove this hack.

@mikebrow
Copy link
Member

mikebrow commented May 3, 2017

yeah the wait stuff was to get around the timing feature where runc run (might have just been detached cases?) would return before the container can be managed with a subsequent runc call. If the call is fully synchronous now the feature is broken and we can delete the waits :-)

@cyphar
Copy link
Member

cyphar commented May 5, 2017

@mikebrow Yeah, that "feature" sounds like a bug to me. We should drop it then IMO. In addition I've recently found a bunch of race conditions in our state transition code that we'll need to sort out as well.

@cyphar
Copy link
Member

cyphar commented May 5, 2017

LGTM.

Approved with PullApprove

@dqminh
Copy link
Contributor

dqminh commented May 5, 2017

LGTM

Approved with PullApprove

@dqminh dqminh merged commit d37c558 into opencontainers:master May 5, 2017
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.

4 participants