OpenVZ Forum


Home » International » Russian » CentOS5: активация udev после обновления на CentOS 5.4
CentOS5: активация udev после обновления на CentOS 5.4 [message #38011] Mon, 09 November 2009 08:04 Go to previous message
lithium is currently offline  lithium
Messages: 78
Registered: April 2007
Member
Привет всем.

Сегодня выяснилось, что во всех контейнерах (судя по всему, после перезагрузки ноды с контейнерами) перестал работать rpm, почта и невозможно зайти в контейнер через vzctl enter (Unable to open pty: No such file or directory). В итоге выяснилось, что причина -- изменения в /dev (файлы терминалов, urandom и наверное, что-то еще). Судя по всему, изначальная причина в обновлении пакета initscripts, т.к. /vz/template/centos/5/i386/config/install-post удаляет запуск udev из /etc/rc.d/rc.sysinit. А сейчас в /etc/rc.d есть файл rc.sysinit.rpmsave со следами вмешательства и rc.sysinit с запуском udev. В логах yum есть запись:

Oct 23 19:13:03 Updated: initscripts-8.45.30-2.el5.centos.i386

Разница межу старым и новым rc.sysinit (обратите внимание на первое изменение):

--- rc.sysinit.rpmsave  2009-08-24 14:41:32.000000000 +0400
+++ rc.sysinit  2009-09-29 03:34:29.000000000 +0400
@@ -343,7 +343,7 @@
 nashpid=$(pidof nash 2>/dev/null)
 [ -n "$nashpid" ] && kill $nashpid >/dev/null 2>&1
 unset nashpid
-
+/sbin/start_udev

 # Load other user-defined modules
 for file in /etc/sysconfig/modules/*.modules ; do
@@ -761,9 +761,9 @@
 # mounted). Contrary to standard usage,
 # filesystems are NOT unmounted in single user mode.
 if [ "$READONLY" != "yes" ] ; then
-       action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs -O no_netdev
+       action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 else
-       action $"Mounting local filesystems: " mount -a -n -t nfs4,smbfs,ncpfs,cifs,gfs -O no_netdev
+       action $"Mounting local filesystems: " mount -a -n -t nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
 fi

 if [ -x /sbin/quotaon ]; then
@@ -851,7 +851,7 @@

 # Clean out /.
 rm -f /fastboot /fsckoptions /forcefsck /.autofsck /forcequotacheck /halt \
-       /poweroff &> /dev/null
+       /poweroff /.suspended &> /dev/null

 # Do we need (w|u)tmpx files? We don't set them up, but the sysadmin might...
 _NEED_XFILES=
@@ -869,6 +869,7 @@
                */cvs)          rm -rf $afile/* ;;
                */dovecot)      rm -f $afile/*/* ;;
                */cups)         rm -f $afile/*/* ;;
+               */libvirt)      rm -rf $afile/*/* ;;
                *)              rm -f $afile/* ;;
           esac
        else


Судя по всему, при обновлении initscripts был заменен файл rc.sysinit с нужными изменениями.
В связи с этим хотелось узнать, как можно избежать такой ситуации в дальнейшем и хватит ли сейчас для исправления проблемы просто удалить запуск udev и перезагрузить контейнер?
(Сам шаблон можно взять в http://forum.openvz.org/index.php?t=msg&th=7825&star t=0& , там же описаны изменения (минимальные)).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: gentoo --ipadd и маршруты в /etc/conf.d/net
Next Topic: puppet менеджмент и OpenVZ
Goto Forum:
  


Current Time: Mon Jul 22 13:17:28 GMT 2024

Total time taken to generate the page: 0.02399 seconds