-
Notifications
You must be signed in to change notification settings - Fork 373
newContainer: Not attach device if it is a CDROM #828
Conversation
/test |
Hi @teawater - thanks for raising. I'm a little confused though - we don't support |
Codecov Report
@@ Coverage Diff @@
## master #828 +/- ##
=========================================
Coverage ? 66.07%
=========================================
Files ? 87
Lines ? 10507
Branches ? 0
=========================================
Hits ? 6943
Misses ? 2864
Partials ? 700 |
Hi @jodh-intel, can we give a container right to access the devices in the guest using --privileged ? Since |
@teawater ping, any updates? |
I didn't see any good reason that kata doesn't support "--privileged". |
@teawater Kata does support some notion of privileged. The container has access to all devices inside the guest, we pass as many devices as we can from the host and the container should run with all the capabilities that are associated with privileged mode, basically all capabilities. |
@amshinde This is a qemu issue. qemu need open block device to get its status. |
Ignoring the "AttachError" may cover some real issue, so I think it's not safe. @jodh-intel We do actually support
This is a good question, we have a feature request discussing this, see In a word, I think you should first consider We'd better find a more robust way to handle |
I made a patch that not attach device if it is a CDROM. |
f895466
to
458a763
Compare
@WeiZhang555 made a new version according to your comments. |
Is CDROM the only device type we cannot handle right now? What about floppy disks? There are also other types of devices like |
vote for @bergwolf |
I agree with a device list. |
@bergwolf Today we ignore all devices except block and vfio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I see. Thanks @amshinde! |
/retest |
Got "docker: Error response from daemon: OCI runtime create failed: QMP command failed: unknown." when "docker run --privileged" with kata. In qemu part, it got: "Could not open '/dev/sr0': Read-only file system" or "No medium found" The cause is qemu need open block device to get its status. But /dev/sr0 is a CDROM that cannot be opened. This patch let newContainer doesn't attach device if it is a CDROM to handle the issue. Fixes kata-containers#829 Signed-off-by: Hui Zhu <[email protected]>
/test |
@grahamwhaley is the failure on metrics-16-04 expected? |
Yep - metrics CI is coming back up today - just found one more 'cleanup' issue to fix now we are on baremetal build slaves. so, ignore metrics here right now, and i'll merge... |
…e-pr-porting-labels action: Require PR porting labels
Got "docker: Error response from daemon: OCI runtime create failed:
QMP command failed: unknown." when "docker run --privileged" with kata.
In qemu part, it got:
"Could not open '/dev/sr0': Read-only file system"
or
"No medium found"
The cause is qemu need open block device to get its status.
But /dev/sr0 is a CDROM that cannot be opened.
This patch let newContainer doesn't attach device if it is a CDROM
to handle the issue.
Fixes #829
Signed-off-by: Hui Zhu [email protected]