RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1286787 - docker should create /etc/machine-id
Summary: docker should create /etc/machine-id
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1286812
TreeView+ depends on / blocked
 
Reported: 2015-11-30 18:01 UTC by Frantisek Kluknavsky
Modified: 2019-03-06 02:09 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1285805
Environment:
Last Closed: 2016-06-23 16:17:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1274 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2016-06-23 20:12:28 UTC

Comment 1 Daniel Walsh 2015-12-01 22:30:28 UTC
We are looking at handling this using a different mechanism.

https://github.com/docker/docker/pull/17021

Which would allow us to ship hooks which could register the container with systemd.


https://github.com/sallyom/Register

This will registermachine all containers.


https://github.com/mrunalp/hooks
This will configue systemd based containers to be able to run in a non privileged container.

Comment 2 Daniel Walsh 2015-12-01 22:31:04 UTC
This functionality should be in docker-1.10 from us and hopefully hooks patch will get accepted upstream.

Comment 3 Daniel Walsh 2015-12-18 20:11:12 UTC
Hooks patch was closed upstream, but we will continue to carry it.

Comment 4 Daniel Walsh 2016-02-22 21:22:02 UTC
https://github.com/projectatomic/oci-systemd-hook 

Handles this for now, need to complete packaging of this for Fedora and then ship it in RHEL.

Comment 5 Daniel Walsh 2016-02-22 21:22:02 UTC
https://github.com/projectatomic/oci-systemd-hook 

Handles this for now, need to complete packaging of this for Fedora and then ship it in RHEL.

Comment 6 Daniel Walsh 2016-06-03 13:29:06 UTC
Fixed in docker-1.10

Comment 7 Jan Pazdziora 2016-06-07 16:39:28 UTC
Whoa, it's magic of all magics with unicorns.

I confirm that without oci-systemd-hook installed, I get

# docker run --rm -ti rhel7.2 /usr/sbin/init
Failed to mount tmpfs at /run: Operation not permitted
[!!!!!!] Failed to mount API filesystems, freezing.

When I install oci-systemd-hook-1.10.3-31.el7.x86_64, running the same command yields

systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
Detected virtualization docker.
Detected architecture x86-64.

Welcome to Red Hat Enterprise Linux Server 7.2 (Maipo)!

Set hostname to <461aeee99967>.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Swap.
[  OK  ] Reached target Paths.
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket.
         Starting Rebuild Dynamic Linker Cache...
         Starting Load/Save Random Seed...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Rebuild Journal Catalog...
         Starting Rebuild Hardware Database...
         Starting Journal Service...
[  OK  ] Reached target Slices.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Journal Service.
[  OK  ] Started Rebuild Journal Catalog.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Rebuild Dynamic Linker Cache.
[  OK  ] Started Rebuild Hardware Database.
         Starting Update is Completed...
[  OK  ] Started Update is Completed.
[  OK  ] Reached target System Initialization.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started D-Bus System Message Bus.
         Starting D-Bus System Message Bus...
         Starting Permit User Sessions...
         Starting Login Service...
         Starting Cleanup of Temporary Directories...
[  OK  ] Started Cleanup of Temporary Directories.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Console Getty.
         Starting Console Getty...
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[  OK  ] Reached target Multi-User System.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Red Hat Enterprise Linux Server 7.2 (Maipo)
Kernel 3.10.0-327.el7.x86_64 on an x86_64

461aeee99967 login: 


and
# docker exec -ti 461aeee99967 systemctl get-default
multi-user.target

Comment 8 Jan Pazdziora 2016-06-07 16:41:12 UTC
On the other hand, on Fedora 23 with docker-1.10.3-24.gitf476348.fc23.x86_64 installed from updates-testing, I don't see oci-systemd-hook available:

# dnf install oci-systemd-hook
Last metadata expiration check: 2:27:38 ago on Tue Jun  7 10:13:21 2016.
No package oci-systemd-hook available.

Comment 9 Daniel Walsh 2016-06-07 18:24:04 UTC
We have not released oci* tools to anything newer the fedora 24.

Comment 11 Luwen Su 2016-06-11 17:06:34 UTC
In 
docker-1.10.3-40.el7.x86_64
oci-register-machine-1.10.3-40.el7.x86_64
oci-systemd-hook-1.10.3-40.el7.x86_64

# docker run --name systemd1 -t -v /sys/fs/cgroup:/sys/fs/cgroup:ro fedora /usr/sbin/init

# docker exec -ti systemd1 systemctl get-default
multi-user.target

Comment 12 Daniel Walsh 2016-06-12 11:01:10 UTC
BTW
The following should not longer be necessary.
-v /sys/fs/cgroup:/sys/fs/cgroup:ro

Comment 14 errata-xmlrpc 2016-06-23 16:17:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1274


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