Bug 1196911

Summary: EPEL7 LXC create and start commands need updating to use systemd rather than init.d
Product: [Fedora] Fedora EPEL Reporter: Jim McEvoy <jemcevoy>
Component: lxcAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: jemcevoy, karlthered, sagarun, thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-09 15:35:28 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:

Description Jim McEvoy 2015-02-27 00:32:01 UTC
Description of problem:
Instantiating a CentOS 7 LXC Container on a CentOS 7 server fails to work because the LXC container setup for CentOS expects to use the CentOS 6 init.d commands.  CentOS 7 requires the systemd commands be used to setup the new container.  

The LXC container setup for CentOS 7 needs to be updated to use systemd container configuration setup commands.

Version-Release number of selected component (if applicable):
CentOS 7 and EPEL7 with yum update run on 26 Feb 2015.


How reproducible:
Always

Steps to Reproduce:
1. Install CentOS7 Core on the server
2. Add some packages:
  # yum -y install tar ruby setroubleshoot-server rsync epel-release
  # yum -y install lxc-templates lxc-doc lua-lxc lxc  lxc-libs libvirt-daemon-driver-network.x86_64 libvirt-daemon-config-network.x86_64 libvirt-daemon-config-nwfilter.x86_64

3.Create a container:
# lxc-create -n c1 -t centos
 --snip
Copying rootfs to /var/lib/lxc/c1/rootfs ...
sed: can't read /etc/init/tty.conf: No such file or directory
Storing root password in '/var/lib/lxc/c1/tmp_root_pass'
Expiring password for user root.
passwd: Success
sed: can't read /var/lib/lxc/c1/rootfs/etc/rc.sysinit: No such file or directory
sed: can't read /var/lib/lxc/c1/rootfs/etc/rc.d/rc.sysinit: No such file or directory

Container rootfs and config have been created.

--snip
3.

Actual results:
Errors during creation for /etc/init/tty.conf and /var/lib/lxc/c1/rootfs/etc/rc.sysinit

Container that will not run.

Expected results:
A working container

Additional info:

I also downloaded and built LXC from source using the tarball at 
https://linuxcontainers.org/downloads/lxc/lxc-1.1.0.tar.gz
and had similar results to the version on EPEL7.

Comment 1 Thomas Moschny 2015-03-03 21:17:25 UTC
Yes, it seems the centos template needs some updating for systemd.

The oracle template already has all the needed bits, I think...

Comment 2 Troy Dawson 2024-07-09 15:35:28 UTC
EPEL 7 entered end-of-life (EOL) status on 2024-06-30.  EPEL 7 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug.