Ubuntu 14.04 LXC needs to be started manually with init 3 on Proxmox 7

dsh

Well-Known Member
Jul 6, 2016
45
3
48
35
I have some legacy code running on Ubuntu 14.04 LXC.
Since upgrading to Proxmox 7, my 14.04 container starts but doesn't even start up network interfaces and other apps.

If I manually enter to the container with 'pct enter' command and enter 'init 3', everything works.

It worked fine with Proxmox 6. Confirmed with two different host and different 14.04 containers.
 
> If I manually enter to the container with 'pct enter' command and enter 'init 3', everything works.

Its stable?

Someone know if this is dangerous to host (PVE 7.x) ?
 
> If I manually enter to the container with 'pct enter' command and enter 'init 3', everything works.

Its stable?

Someone know if this is dangerous to host (PVE 7.x) ?
It's been stable for at least 2 months right now.
 
I have some legacy code running on Ubuntu 14.04 LXC.
Since upgrading to Proxmox 7, my 14.04 container starts but doesn't even start up network interfaces and other apps.

If I manually enter to the container with 'pct enter' command and enter 'init 3', everything works.

It worked fine with Proxmox 6. Confirmed with two different host and different 14.04 containers.

Unfortunately I've faced with legacy project too on Ubuntu 14. And as for the services initialization I've developed following solution:

/etc/init/workaround-init-for_old_cgroup.conf

Code:
# Containers with the old cgroup such as ubuntu 14 doesn't initialize services at startup
# So we have to run them "manually"

description    "Workaround for initialization a container with the old cgroup"

emits socket

start on net-device-up IFACE=lo

exec /root/bin/workaround-init-for_old_cgroup.sh

/root/bin/workaround-init-for_old_cgroup.sh

Bash:
#!/usr/bin/env bash

# Containers with the old cgroup such as ubuntu 14 doesn't initialize services at startup
# So we have to run them "manually"

# Run services if they are stopped
if [ $(/sbin/initctl list | grep networking | grep -c stop) -ge 1 ]; then
  echo "Run services with $0"
  # First of all run syslog
  /etc/init.d/rsyslog start
  # init all
  /sbin/init 3
  # Other services which haven't been executed by init command
  /etc/init.d/udev start
else
  echo "Services are already running with $0"
fi


I hope this will probably be helpful.
 
  • Like
Reactions: Bass and idariel
Unfortunately I've faced with legacy project too on Ubuntu 14. And as for the services initialization I've developed following solution:

/etc/init/workaround-init-for_old_cgroup.conf

Code:
# Containers with the old cgroup such as ubuntu 14 doesn't initialize services at startup
# So we have to run them "manually"

description    "Workaround for initialization a container with the old cgroup"

emits socket

start on net-device-up IFACE=lo

exec /root/bin/workaround-init-for_old_cgroup.sh

/root/bin/workaround-init-for_old_cgroup.sh

Bash:
#!/usr/bin/env bash

# Containers with the old cgroup such as ubuntu 14 doesn't initialize services at startup
# So we have to run them "manually"

# Run services if they are stopped
if [ $(/sbin/initctl list | grep networking | grep -c stop) -ge 1 ]; then
  echo "Run services with $0"
  # First of all run syslog
  /etc/init.d/rsyslog start
  # init all
  /sbin/init 3
  # Other services which haven't been executed by init command
  /etc/init.d/udev start
else
  echo "Services are already running with $0"
fi


I hope this will probably be helpful.
Excellent post, very useful. Thank you very much.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!