OpenVZ Forum


Home » General » Support » Debian 6 container not starting after vzctl/kernel upgrade
Debian 6 container not starting after vzctl/kernel upgrade [message #51911] Mon, 09 March 2015 11:34 Go to next message
balrog77 is currently offline  balrog77
Messages: 3
Registered: March 2015
Junior Member
Hello.

I have an old container with Debian 6, migrated from 32-bit OpenVZ NH. All was working ok for more than a year, but this night we rebooted the server (it is now, after reboot, running 2.6.32-042stab102.9 and vzctl 4.8) and this container wont start:

[root@cs12522 /]#vzctl start 202
Starting container...
Container is mounted
Adding IP address(es): 31.131.x.212
/bin/bash: command substitution: line 416: syntax error near unexpected token `)'
/bin/bash: command substitution: line 416: `cidr2mask $_MASK)'
Setting CPU units: 1000
Container start in progress...
[root@cs12522 /]#

These are running processes and tcp/ip configuration in container:
[root@cs12522 log]# vzctl enter 202
entered into CT 202
root@vz202:/# cat /etc/issue
Debian GNU/Linux 6.0 \n \l

root@vz202:/# ps fax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 init [2]
    2 ?        S      0:00 [kthreadd/202]
    3 ?        S      0:00  \_ [khelper/202]
   36 ?        Ss     0:00 /sbin/getty 38400 console
   37 tty2     Ss+    0:00 /sbin/getty 38400 tty2
   38 ?        Ss     0:00 vzctl: ttyp0
   39 ttyp0    Ss     0:00  \_ -bash
   43 ttyp0    R+     0:00      \_ ps fax
root@vz202:/# ifconfig -a
lo        Link encap:Local Loopback
          LOOPBACK  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          BROADCAST POINTOPOINT NOARP  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@vz202:/#

Software versions:
Kernel: 2.6.32-042stab102.9
Vzctl: 4.8

Container config:
# RAM
PHYSPAGES="0:1835008"

# Swap
SWAPPAGES="0:512M"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="10485760:10485760"
DISKINODES="1000000:1000000"
QUOTATIME="0"

# CPU fair scheduler parameter
CPUUNITS="1000"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="debian-6.0-x86"
ORIGIN_SAMPLE="basic"
IP_ADDRESS="31.131.x.212"
NAMESERVER="8.8.8.8 8.8.4.4"
HOSTNAME="vz202.priment.ru"
PRIVVMPAGES="unlimited"
LOCKEDPAGES="unlimited"
ONBOOT="yes"

Please help me revive the container, perhaps some additional info is needed?

Thanks in advance!
Re: Debian 6 container not starting after vzctl/kernel upgrade [message #51912 is a reply to message #51911] Tue, 10 March 2015 14:33 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

First
Quote:

/bin/bash: command substitution: line 416: syntax error near unexpected token `)'
/bin/bash: command substitution: line 416: `cidr2mask $_MASK)'


this seems to be irrelevant, although strange. Can you show me the contents of /etc/vz/dists/scripts/functions around line 416?

Second, the problem you see is container's init is not starting any daemons etc. Most probably is has nothing or little to do with vzctl/kernel upgrade and is caused by in-container upgrade that went wrong (say replacing init with something else).

You can debug the starting process by running vzctl console 202 in other terminal before trying to start container -- it will show how init is trying to start stuff and most probably will reveal the errors.

Other thing to check is "vzubc 202" showing no fails


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Debian 6 container not starting after vzctl/kernel upgrade [message #51913 is a reply to message #51912] Tue, 10 March 2015 14:34 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Also, you might find it helpful to ask at our users mailing list -- maybe there are others who saw that problems. Other ways to help are listed at http://openvz.org/Support

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Debian 6 container not starting after vzctl/kernel upgrade [message #51914 is a reply to message #51911] Tue, 10 March 2015 17:52 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

A colleague of mine reminded me of one case similar to yours:

If container init is upstart, sometimes it stucks on trying to
write to non-existent /dev/console. The workaround is to
turn off console_output in /etc/init.d/*.conf files.

Maybe this will help.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: Debian 6 container not starting after vzctl/kernel upgrade [message #51915 is a reply to message #51912] Tue, 10 March 2015 20:14 Go to previous messageGo to next message
balrog77 is currently offline  balrog77
Messages: 3
Registered: March 2015
Junior Member
You're right, this problems have nothing to do with vzctl/kernel upgrade, I apologize.
I've found a backup of this container from September'2013 and it works fine on recent kernel and vzctl.

According to the logs, these packages were installed inside the container (i had no idea something was installed there, i was told that it was frozen in a working state back in 2013) after september'13 when it was working fine:
apt-get install locales
Upgrade: locales:i386 (2.11.2-10, 2.11.3-4)
apt-get install tzdata
Upgrade: tzdata:i386 (2011d-0squeeze1, 2014e-0squeeze1)
Commandline: apt-get install openssl
Upgrade: openssl:i386 (0.9.8o-4squeeze1, 0.9.8o-4squeeze14)
Commandline: apt-get install byacc
Install: byacc:i386 (20100610-1)


Perhaps you could point to a suspicious package basing on your experience?

I'll compare files in broken and working container, since differences should be isolated to /var/www, /var/lib/mysql and /var/log folders.
Re: Debian 6 container not starting after vzctl/kernel upgrade [message #51916 is a reply to message #51914] Tue, 10 March 2015 20:23 Go to previous message
balrog77 is currently offline  balrog77
Messages: 3
Registered: March 2015
Junior Member
Got it.

We've manually upgraded bash in this container this fall due to shellshock vulnerability.
The original version was
GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)

while the new one is
GNU bash, version 4.1.17(1)-release (i686-pc-linux-gnu)


I'm not sure if it is a problem with new bash or some debian scripts, but if i replace a patched bash binary with an original one container starts normally.

Sorry for inconvenience and thank you for poiniting me to the right direction!
Previous Topic: OpenVZ HN became sluggish
Next Topic: /etc/fstab for usrquota,grpqouta on /home directory
Goto Forum:
  


Current Time: Thu Mar 28 17:18:33 GMT 2024

Total time taken to generate the page: 0.01718 seconds