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

"docker run --privileged" got "docker: Error response from daemon: OCI runtime create failed: QMP command failed: unknown." #829

Closed
teawater opened this issue Oct 17, 2018 · 0 comments
Assignees

Comments

@teawater
Copy link
Member

10月 17 15:28:30 teawater-virtual-machine kata-runtime[91986]: time="2018-10-17T15:28:30.891596459+08:00" level=info msg="Attaching block device" arch=amd64 command=create container=5edec94fbf4076667aa8ee546f10cde98d6ef62f3097c2a3889ee316ea0fd0e9 device=/dev/sr0 name=kata-runtime pid=91986 source=virtcontainers subsystem=device
10月 17 15:28:30 teawater-virtual-machine kata-runtime[91986]: time="2018-10-17T15:28:30.891779981+08:00" level=info msg="{"arguments":{"driver":"raw","file":{"driver":"file","filename":"/dev/sr0"},"node-name":"drive-e6670677eccb9cab"},"execute":"blockdev-add"}" arch=amd64 command=create container=5edec94fbf4076667aa8ee546f10cde98d6ef62f3097c2a3889ee316ea0fd0e9 name=kata-runtime pid=91986 source=virtcontainers subsystem=qmp
10月 17 15:28:30 teawater-virtual-machine kata-runtime[91986]: time="2018-10-17T15:28:30.977805252+08:00" level=info msg="{"error": {"class": "GenericError", "desc": "Could not open '/dev/sr0': No medium found"}}" arch=amd64 command=create container=5edec94fbf4076667aa8ee546f10cde98d6ef62f3097c2a3889ee316ea0fd0e9 name=kata-runtime pid=91986 source=virtcontainers subsystem=qmp
10月 17 15:28:30 teawater-virtual-machine kata-runtime[91986]: time="2018-10-17T15:28:30.978272497+08:00" level=info msg="Unplugging block device" arch=amd64 command=create container=5edec94fbf4076667aa8ee546f10cde98d6ef62f3097c2a3889ee316ea0fd0e9 device=/dev/dm-0 name=kata-runtime pid=91986 source=virtcontainers subsystem=device

@teawater teawater self-assigned this Oct 17, 2018
teawater added a commit to teawater/runtime that referenced this issue Oct 17, 2018
Got "docker: Error response from daemon: OCI runtime create failed:
QMP command failed: unknown." when "docker run --privileged" with kata.
The cause is a device got a error when attach to sandbox.

This error doesn't affect the execution of kata.  So just output the
error and record it in AttachError let kataAgent ignore it.

Fixes kata-containers#829

Signed-off-by: Hui Zhu <[email protected]>
teawater added a commit to teawater/runtime that referenced this issue Oct 23, 2018
Got "docker: Error response from daemon: OCI runtime create failed:
QMP command failed: unknown." when "docker run --privileged" with kata.
The cause is a device got a error when attach to sandbox.

This error doesn't affect the execution of kata.  So just output the
error and record it in AttachError let kataAgent ignore it.

Fixes kata-containers#829

Signed-off-by: Hui Zhu <[email protected]>
teawater added a commit to teawater/runtime that referenced this issue Oct 30, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Oct 30, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Oct 30, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Oct 30, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Oct 30, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Oct 31, 2018
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]>
teawater added a commit to teawater/runtime that referenced this issue Nov 7, 2018
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]>
zklei pushed a commit to zklei/runtime that referenced this issue Nov 22, 2018
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]>
zklei pushed a commit to zklei/runtime that referenced this issue Nov 22, 2018
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]>
egernst pushed a commit to egernst/runtime that referenced this issue Feb 9, 2021
agent does not check if /etc/resolv.conf exists, if it does not exist,
setDns will fail and causes the container to fail to run. sometimes,we
don't need dns in guest vm, so it's better to skip and return nil if
/etc/resolv.conf does not exists.

Fixes: kata-containers#829

Signed-off-by: Shukui Yang <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant