On Fri, 2010-03-26 at 10:05 +0000, Stefan Leitner wrote:
> this is a serious problem and very easy to reproduce:
> on an openvz host try to install one of the ubuntu templates from here: 
> http://wiki.openvz.org/Download/template/precreated
> i tried with ubuntu-9.10-x86.tar.gz and ubuntu-9.04-i386-minimal.tar.gz
> 
> when you change the /etc/apt/sources.list to the next distribution and
> perform an apt-get update && apt-get dist-upgrade the container will
> hang on next reboot with this error:
> 
> # vzctl enter 1234
> enter into VE 1234 failed
> Unable to open pty: No such file or directory
> 
> the dist-upgrade to ubuntu 9.10 was working again after inserting the
> script from Stéphane Graber, but not anymore with the dist-upgrade to
> ubuntu 10.04.
> 

Simply edit /etc/init/openvz.conf and remove the two mount lines
for /proc and /sys.

That should give you that:
---
# OpenVZ - Fix init sequence to have OpenVZ working with upstart

description "Fix OpenVZ"

start on startup

task
pre-start script
    mount -t devpts devpts /dev/pts
    mount -t tmpfs varrun /var/run
    mount -t tmpfs varlock /var/lock
    mkdir -p /var/run/network
    cat /proc/mounts > /etc/mtab
    touch /var/run/utmp
    chmod 664 /var/run/utmp
    chown root.utmp /var/run/utmp
    if [ "$(find /etc/network/ -name upstart -type f)" ]; then
        chmod -x /etc/network/*/upstart || true
    fi
end script

script
    start networking
    initctl emit filesystem --no-wait
    initctl emit local-filesystems --no-wait
    initctl emit virtual-filesystems --no-wait
    init 2
end script
---

And it works fine on Lucid. Basically mountall is now always
mounting /proc and /sys making my upstart job fail as they are already
mounted.

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-- 
OpenVZ kernel out of date, karmic requires 2.6.27
https://bugs.launchpad.net/bugs/436130
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to