Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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

Summary: Unable to run rhel 7.2 based container image with systemd
Product: Red Hat Enterprise Linux 7 Reporter: Humble Chirammal <hchiramm>
Component: rhel-server-containerAssignee: Frantisek Kluknavsky <fkluknav>
Status: CLOSED DUPLICATE QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: annair, asrivast, jpazdziora, rcyriac, ssaha
Target Milestone: pre-dev-freeze   
Target Release: 7.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-01 12:35:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Dockerfile none

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 ***