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 1286665 - Unable to run rhel 7.2 based container image with systemd
Summary: Unable to run rhel 7.2 based container image with systemd
Keywords:
Status: CLOSED DUPLICATE of bug 1285805
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rhel-server-container
Version: 7.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: pre-dev-freeze
: 7.3
Assignee: Frantisek Kluknavsky
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-30 13:08 UTC by Humble Chirammal
Modified: 2015-12-01 13:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-01 12:35:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Dockerfile (2.45 KB, text/plain)
2015-11-30 13:08 UTC, Humble Chirammal
no flags Details

Description Humble Chirammal 2015-11-30 13:08:38 UTC
Created attachment 1100497 [details]
Dockerfile

Description of problem:

When running a systemd based ( systemd-219-19.el7.x86_64 ) container image which layered on top of  rhel 7.2 ( registry.access.redhat.com/rhel7.2 ) base, it fails to enable the service ( for ex: glusterd). The subjected service is enabled in the image. 


Version-Release number of selected component (if applicable):

Base image: registry.access.redhat.com/rhel7.2
Systemd version: systemd-libs-219-19.el7.x86_64
systemd-219-19.el7.x86_64
systemd-sysv-219-19.el7.x86_64


How reproducible:

Always.

Steps to Reproduce:

1) Create an image (rhgs-3.1.2_rhel7.2) based on attached ( attachment-1) Dockerfile
2) Run the image with below command

#docker run --rm -ti --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro rhgs-3.1.2_rhel7.2 

3) Check the systemctl status of the service.( See attachment-2 ) 


Actual results:

Systemd fails to enable the service.


Expected results:

systemd should enable the service without any issue.

Additional info:

When trying the same with 'registry.access.redhat.com/rhel7.1'  image as base 
(systemd-container-208.20-6.el7.x86_64 ) everything works perfectly.

Comment 3 Frantisek Kluknavsky 2015-11-30 13:52:04 UTC
Hi,

thanks for the report. Could you please try to add "touch /etc/machine-id" to the Dockerfile and see whether the problem disappears? It seems to be the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1285805

Comment 4 Humble Chirammal 2015-11-30 17:46:54 UTC
(In reply to Frantisek Kluknavsky from comment #3)
> Hi,
> 
> thanks for the report. Could you please try to add "touch /etc/machine-id"
> to the Dockerfile and see whether the problem disappears? It seems to be the
> same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1285805

By suspecting the default target is wrongly picked, I had tried 'systemctl set-default multi-user.target' in dockerfile as shown below without result.

EXPOSE 22 111 245 443 24007 2049 8080 6010 6011 6012 38465 38466 38468 38469 49152 49153 49154 49156 49157 49158 49159 49160 49161 49162

#RUN systemctl set-default multi-user.target

Any way, let me try machine-id touch in docker file, I will get back soon with the result.

Comment 8 Humble Chirammal 2015-12-01 07:42:53 UTC
(In reply to Frantisek Kluknavsky from comment #3)
> Hi,
> 
> thanks for the report. Could you please try to add "touch /etc/machine-id"
> to the Dockerfile and see whether the problem disappears? It seems to be the
> same issue as https://bugzilla.redhat.com/show_bug.cgi?id=1285805

Thanks Frantisek!!,  'touch /etc/machine-id' work around this issue. Also, a random uuid is filled in this file when container started.

[root@0bec27727ad7 /]# cat /etc/machine-id 
407bf45502dd43bd9699b7f2f315e3dc
[root@0bec27727ad7 /]#

Comment 11 Frantisek Kluknavsky 2015-12-01 12:35:47 UTC
New 7.2 rhel-server-docker base image is scheduled for today/tomorrow and will include this workaround.

*** This bug has been marked as a duplicate of bug 1285805 ***


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