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

runitme-rs/bugfix: kata pod with multi-containers sharing one direct volume #8332

Merged

Conversation

Apokleos
Copy link
Contributor

When multiple containers in a kata pod share one direct volume, it's important to make sure that the corresponding block device is only mounted once in the guest. This means that there should be only one mount entry for the device in the mount information.

Fixes: #8328

@katacontainersbot katacontainersbot added the size/small Small and simple task label Oct 28, 2023
@Apokleos Apokleos self-assigned this Oct 30, 2023
@Apokleos Apokleos force-pushed the bugfix-directvol-multicontainers branch from 267f500 to 15d8da1 Compare October 30, 2023 06:51
@Apokleos Apokleos changed the title runitme-rs/bugfix: kata pod with multi-containers sharing one direct … runitme-rs/bugfix: kata pod with multi-containers sharing one direct volume Oct 30, 2023
@Apokleos Apokleos force-pushed the bugfix-directvol-multicontainers branch from 15d8da1 to d7dbb15 Compare October 30, 2023 06:59
@Apokleos Apokleos added bug Incorrect behaviour ok-to-test labels Oct 30, 2023
Copy link
Contributor

@quanweiZhou quanweiZhou left a comment

Choose a reason for hiding this comment

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

Thanks, @Apokleos, LGTM.

@Apokleos
Copy link
Contributor Author

/test

When a direct volume is used by multiple containers in Kata,
Generating many shared paths with cids will cause IO error
as the result of one direct volume mounts more than once.
To correct it, use the device_id instead of cid which
ensures that the guest only mounts the FS once.

Fixes: kata-containers#8328

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
When multiple containers in a kata pod share one direct volume,
it's important to make sure that the corresponding block device
is only mounted once in the guest. This means that there should
be only one mount entry for the device in the mount information.

Fixes: kata-containers#8328

Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
@Apokleos Apokleos force-pushed the bugfix-directvol-multicontainers branch from d7dbb15 to ba632ba Compare November 15, 2023 02:37
@Apokleos
Copy link
Contributor Author

/test

@studychao studychao merged commit b3318e5 into kata-containers:main Nov 20, 2023
140 of 144 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behaviour ok-to-test size/small Small and simple task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runitme-rs: kata pod with multi-containers sharing one direct volume resulting in wrong behaviour
6 participants