Bug 1017286 - Unable to start any services or even list services using systemctl inside Fedora container
Unable to start any services or even list services using systemctl inside Fed...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: docker-io (Show other bugs)
19
All Linux
unspecified Severity low
: ---
: ---
Assigned To: Lokesh Mandvekar
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 10:58 EDT by Dave Lawrence
Modified: 2014-07-01 18:59 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-09 12:07:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dave Lawrence 2013-10-09 10:58:19 EDT
Description of problem:

[dkl@localhost ~]$ cat /etc/redhat-release 
Fedora release 19 (Schrödinger’s Cat)

[dkl@localhost ~]$ rpm -q docker-io
docker-io-0.6.3-2.devicemapper.fc19.x86_64

[dkl@localhost ~]$ docker run -t -i mattdm/fedora /bin/bash
bash-4.2# yum -y install mysql-server
[...]
Complete!

bash-4.2# systemctl start mysqld.service
Failed to get D-Bus connection: No connection to service manager.

I cannot even list the services available:

bash-4.2# systemctl list-units               
Failed to get D-Bus connection: No connection to service manager.

Let me know if I can provide more detailed information.

dkl
Comment 1 Matthew Miller 2013-10-09 12:07:25 EDT
This is to be expected when entering the container that way.

You are essentially running bash in "single user mode" in the container. What you want to do instead is prepare a container with mysqld installed and then run _that_ rather than /bin/bash. (I suggest making a Dockerfile which uses mattdm/fedora as the base and adds mysqld.)

Or, if you want to start a container as a whole mini-OS, you could run systemd inside the container. This is not well-tested and may completely fail. (But eventually we want that working.)

I'm going to close this as NOTABUG, which can sound a little harsh -- I don't mean it that way. We can continue the conversation on the fedora-cloud mailing list (or basically any other forum, really). I'm excited to see people trying this out!

Note You need to log in before you can comment on or make changes to this bug.