-
Notifications
You must be signed in to change notification settings - Fork 376
Failed to get D-Bus connection: Operation not permitted #1399
Comments
Hi @free2k - thanks for raising. A few questions:
|
Hi @free2k - you seem to be trying to run What are you actually trying to achieve here? It feels like maybe you are trying to do some sort of docker privileged container access to the host. /cc @amshinde for any thoughts around that mount etc. |
Hi @jodh-intel
|
hi @grahamwhaley |
Ah, right @free2k - I see, you want systemd inside the container. A question:
I think the answer might be 'no', but when you are using For Kata, we might have to do something different here - as Kata is running its own kernel inside a VM, what you probably would want is the container to have access to the cgroup volume of the VM kernel, and not the actual host system itself. I don't think we have a way to allow that today with Kata though. For 'does kata support --privileged' - in our Limitations document we say 'no', but, I think that is not the whole story. afaik, kata does not support some host resource sharing. @amshinde , were you in the process of clarifying that in the Limitations document? I'm not sure if we can support running systemd in the container right now, but would like to hear from @amshinde and @devimc at least. I think this is an interesting question :-) /cc @sboeuf @gnawux |
In fact, I can run systemd in kata through some methods. Although this method looks very bad. Because systemd can't start is related to dbus, so I share the host's /run directory directly to the kata virtual machine. This way I can start systemd in the kata virtual machine. |
@free2k I tried reproducing your issue with the Dockerfile contents you provided, but was not able to build it due to some errors in there. So I used the Dockerfile under Following that, I did follow the example posted on the centos docker page regarding systemd-enabled app container as:
Running that with |
@grahamwhaley Done :) I have raised a PR for this. @free2k Take a look at this : kata-containers/documentation#408 @grahamwhaley For '/sys/fs/cgroup', we pass the guest side mount in case of system volumes, as it does not make sense to pass the host side volume. I am going to document this as well :) |
@amshinde Thank you for your answer。
But if you cancel the --runtime kata-runtime parameter, you can successfully run systemd |
@free2k Its interesting I am getting the same error with both kata and runc. |
@free2k can you your setup with footloose containers. That may help docker run --runtime=kata -d --mount type=tmpfs,destination=/run --mount type=tmpfs,destination=/run/lock --mount type=tmpfs,destination=/tmp -v /sys/fs/cgroup:/sys/fs/cgroup:ro quay.io/footloose/fedora29:latest /sbin/init |
@free2k , could you please check |
Description of problem
Expected result
Can successfully run systemd
Actual result
Failed to get D-Bus connection: Operation not permitted
Meta details
Running
kata-collect-data.sh
version1.6.0-rc1 (commit 9f8d4e1)
at2019-03-21.15:00:00.853126502+0800
.Runtime is
/usr/bin/kata-runtime
.kata-env
Output of "
/usr/bin/kata-runtime kata-env
":Runtime config files
Runtime default config files
Runtime config file contents
Config file
/etc/kata-containers/configuration.toml
not foundOutput of "
cat "/usr/share/defaults/kata-containers/configuration.toml"
":KSM throttler
version
Output of "
/usr/libexec/kata-ksm-throttler/kata-ksm-throttler --version
":Output of "
/usr/lib/systemd/system/kata-ksm-throttler.service --version
":systemd service
Image details
Initrd details
No initrd
Logfiles
Runtime logs
Recent runtime problems found in system journal:
Proxy logs
Recent proxy problems found in system journal:
Shim logs
Recent shim problems found in system journal:
Throttler logs
No recent throttler problems found in system journal.
Container manager details
Have
docker
Docker
Output of "
docker version
":Output of "
docker info
":Output of "
systemctl show docker
":No
kubectl
Packages
Have
dpkg
Output of "
dpkg -l|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":Have
rpm
Output of "
rpm -qa|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":The text was updated successfully, but these errors were encountered: