Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

virtcontainers: share the agent's client between factory's VM and san… #996

Merged
merged 1 commit into from Dec 11, 2018

Conversation

lifupan
Copy link
Member

@lifupan lifupan commented Dec 9, 2018

…dbox

When agent is configured as longLive, the VM's agent created
by factory will not close it's client once it connected, thus
the sandbox's agent cannot re-connect successfully.

Sharing the agent's client between VM's agent and sandbox
can fix this issue.

Fixes: #995

Signed-off-by: Fupan Li lifupan@gmail.com

@lifupan
Copy link
Member Author

lifupan commented Dec 10, 2018

/test

getClient() interface{}

// set to use an existing agent's client
setClient(client interface{}) error
Copy link
Member

Choose a reason for hiding this comment

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

What about reuseAgent(a agent) error API and internally assert agent is of the right type and reuse agent.client internally. Then we don't expose interface{} and agent's internal knowledge around.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's a good idea, I'll update it.

Copy link
Member Author

Choose a reason for hiding this comment

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

@bergwolf Updated!

…dbox

When agent is configured as longLive, the VM's agent created
by factory will not close it's client once it connected, thus
the sandbox's agent cannot re-connect successfully.

Sharing the agent's client between VM's agent and sandbox
can fix this issue.

Fixes: kata-containers#995

Signed-off-by: fupan <lifupan@gmail.com>
@lifupan
Copy link
Member Author

lifupan commented Dec 10, 2018

/test

@bergwolf
Copy link
Member

bergwolf commented Dec 10, 2018

LGTM, thanks!

Approved with PullApprove

@jodh-intel
Copy link
Contributor

jodh-intel commented Dec 10, 2018

lgtm

Approved with PullApprove

@bergwolf bergwolf merged commit 8f22d67 into kata-containers:master Dec 11, 2018
@lifupan lifupan deleted the fixFactory branch December 11, 2018 03:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shimv2 run container failed when factory/template enabled
3 participants