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

Move call of the prestart hooks over to the lib part #60

Merged
merged 1 commit into from
Feb 2, 2023

Conversation

rumpl
Copy link
Member

@rumpl rumpl commented Jan 31, 2023

Moving this makes pre-start hooks work for all the instances.

@@ -970,6 +970,19 @@ where
}

let i = self.get_instance(req.get_id())?;

if let Some(bundle) = i.cfg.get_bundle() {
Copy link
Member Author

Choose a reason for hiding this comment

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

In the case of a cri pause container a new base instance is created without a bundle. I'm not sure I really understand this

Copy link
Member

Choose a reason for hiding this comment

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

I haven't gone back and looked at the implementation (and it's been long enough I don't have it available in main memory 😄), but we pretend to start a pause container for cri since there's not really anything we can do with it.

@rumpl
Copy link
Member Author

rumpl commented Jan 31, 2023

I just remembered, the prestart hook is a weird one, see this, I'll update the code tomorrow...

@rumpl rumpl force-pushed the prestart_hooks branch 2 times, most recently from 582afba to 94f46aa Compare January 31, 2023 20:49
Moving this makes pre-start hooks work for all the instances.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl
Copy link
Member Author

rumpl commented Feb 2, 2023

Okay with the prestart hook called in the create operation we have networking with docker (tested with wasmedge and spin runtimes)

@cpuguy83 cpuguy83 merged commit ec19a08 into containerd:main Feb 2, 2023
@rumpl rumpl deleted the prestart_hooks branch February 2, 2023 16:14
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.

2 participants