ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux sysadmin discuss <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] OpenVZ @ server-4.0.1 - большие проблемы
Date: Mon, 07 Apr 2008 02:46:05 +0400
Message-ID: <47F952AD.80205@solin.spb.ru> (raw)
In-Reply-To: <f7a739430802121004k5157582bo859d049f70e71f66@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1287 bytes --]

Eugene Prokopiev пишет:
> 12.02.08, Peter Evdokimov<blackp@vpmes.ru> написал(а):
> 
>>On Tue, 12 Feb 2008 17:45:00 +0300
>>Eugene Prokopiev wrote:
>>
>>
>>>>искать обсуждение или здесь или в sisyphus@ про bridge, ovz и
>>>>помещение какой-то сборки vzctl в daedalus. где-то за конец октября
>>>>- начало ноября. это если я правильно понял вопрос.
>>>
>>>https://bugzilla.altlinux.org/show_bug.cgi?id=13147 и
>>>https://bugzilla.altlinux.org/show_bug.cgi?id=13148 ?
>>
>>угу, похоже на то. в бранче не исправлено. в сизифе не пробовал.
>>свои костыли не лепил - ждал, что тестирование и внесение в сизиф/бранч
>>будет завершено, но всё затихло, как я понял. да и сервера у меня в 20
>>метрах.
>>
>>и спасибо за ссылки на патчи - завтра вылечу у себя =)
> 
> 
> проблемы с veth мне не совсем понятны - видимо vznetcfg покрывает все
> мои потребности ;)

  Сегодня ещё раз решал задачу бридживания veth. На этот раз -- с
помощью EXTERNAL_SCRIPT (определяемого в /etc/vz/vznet.conf)
специального вида (передела из vznetcfg, см. вложение).

  Эффект от работы скрипта следующее: все vethX.Y с внутренними (в VE)
именами <имя> помещаются в бриджи с именами вида b<имя>.

PS: В прилагаемом варианте защита от дурака отсутствует.

-- 

С уважением. Алексей.

[-- Attachment #1.2: vznetcfg_brctl --]
[-- Type: text/plain, Size: 1767 bytes --]

#!/bin/sh
#  Copyright (C) 2000-2007 SWsoft. All rights reserved.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#VZNETCFG='/etc/vz/vznet.conf'
#
#[ -f "$VZNETCFG" ] && source "$VZNETCFG"

usage()
{
	echo >&2 "vznetcfg init veth <dev>"
}

init_veth()
{
	local dev="$1"

	ip link set "$dev" up
	if [ -n "$VEID" ]; then
		sed -ne '1,/^NETIF=/{/^NETIF=/s/^NETIF=\"\([^\"]\+\)\"/\1/p}' "/etc/vz/conf/$VEID.conf" | \
			sed -ne 's/\([^,;=]\+\)=\([^,;]*\)[,;]/\1 \2\n/pg' | \
			{
				local bname=
				local n p
				while read -r n p; do
					if [ "x$n" = "xifname" ]; then
						bname="b$p"
					elif [ "x$n$p" = "xhost_ifname$dev" ]; then
						echo brctl addif "$bname" "$dev"
						brctl addif "$bname" "$dev" ||:
					fi
				done
			}
	fi
}

## Call the external script if defined
#if [ -n "$EXTERNAL_SCRIPT" -a -x "$EXTERNAL_SCRIPT" ]; then
#	export VEID
#	exec "$EXTERNAL_SCRIPT" $@
#fi

if test $# -le 2; then
    usage
    exit 0
fi

CMD="$1"
case "$CMD$2" in
	initveth)
		if test $# -ne 3; then
			usage
			exit 1
		fi
		init_veth "$3"
		;;
	*)
		echo "invalid action"
		exit 1
		;;
esac
exit 0

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 548 bytes --]

      parent reply	other threads:[~2008-04-06 22:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 15:25 ` seriv
2008-02-11 17:24   ` Sergey
2008-02-12  8:42     ` Eugene Prokopiev
2008-02-12  8:53       ` Sergey
2008-02-12  9:16         ` Eugene Prokopiev
2008-02-12  9:24           ` Sergey
2008-02-12  9:29             ` Eugene Prokopiev
2008-02-12  9:44               ` Sergey
2008-02-12  9:52                 ` Eugene Prokopiev
2008-02-12  9:41   ` Eugene Prokopiev
2008-02-12 11:19   ` Peter Evdokimov
2008-02-12 14:45     ` Eugene Prokopiev
2008-02-12 16:23       ` Peter Evdokimov
2008-02-12 18:04         ` Eugene Prokopiev
2008-02-12 20:10           ` Michael Shigorin
2008-02-12 21:40             ` Aleksey Avdeev
2008-04-06 22:46           ` Aleksey Avdeev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47F952AD.80205@solin.spb.ru \
    --to=solo@solin.spb.ru \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git