Bug 1193213 - LXC container not start after edit config file
Summary: LXC container not start after edit config file
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: lxc
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Thomas Moschny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-16 21:42 UTC by varuzam
Modified: 2015-10-26 06:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description varuzam 2015-02-16 21:42:14 UTC
Description of problem:

LXC containers on host not start after edit file config. 


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

CentOS Linux release 7.0.1406 (Core)
kernel 3.10.0-123.20.1.el7
lxc-1.0.7-1.el7.x86_64
lxc-templates-1.0.7-1.el7.x86_64
lxc-libs-1.0.7-1.el7.x86_64

How reproducible:

Steps to Reproduce:
1. Install lxc from epel repo
2. Create container with any OS, ex. centos 6
3. lxc-start -n testvm -d - OK
4. lxc-stop -n testvm
5. edit /var/lib/lxc/testvm/config and change any parameter, ex. change lxc.utsname = testvm1
5. lxc-start -n testvm -d - OK
6. change in file config: lxc.utsname = testvm
7. lxc-start -n testvm -d - FAIL
8. since then any container on host  not start 

Actual results:
lxc-start: conf.c: lxc_create_tty: 3658 Read-only file system - failed to create pty #0
lxc-start: start.c: lxc_init: 419 failed to create the ttys
lxc-start: start.c: __lxc_start: 1045 failed to initialize the container
lxc-start: lxc_start.c: main: 342 The container failed to start.
lxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.


Expected results:


Additional info:

Comment 1 Thomas Moschny 2015-03-03 20:59:23 UTC
In your recipe, you start the container in steps 5 and 7, without stopping it in between? That's not going to work, I think.

Comment 2 varuzam 2015-03-03 22:10:59 UTC
sorry, 
step 6.5. lxc-stop -n testvm

additional problem after steps 7 is not possible to connect via ssh
Error: PTY allocation request failed on channel 0

Comment 3 Anthony K 2015-10-26 06:56:22 UTC
I stumbled onto this problem as well and spent over 2 hours looking for the problem.  I really did not want to reboot the server to find it out if it resolved the issue as it was not mentioned here and there were many containers already running.

The problem appears to be that wfor whatever reason when the config file is changed, it causes the next container booted to remount /dev/pts in readonly mode.  To workaround this issue, simply run:

mount -o remount,rw /dev/pts

Hopefully this workaround will help while the real issue is being addressed!

Cheers,
ak.

PS: I encountered this issue on a CentOS 7 host:

LSB Version:    :core-4.1-amd64:core-4.1-noarch     
Distributor ID: CentOS                              
Description:    CentOS Linux release 7.1.1503 (Core)
Release:        7.1.1503                            
Codename:       Core                                

Let me know if there's any more info required to help pinpoint the issue!


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