ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: "Michael A. Kangin" <mak@complife.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] резолвер
Date: Wed, 10 Apr 2019 16:50:55 +0200
Message-ID: <92593e51-3faf-bbc1-fa1d-3a0a77f07c4e@complife.ru> (raw)
In-Reply-To: <201904091647.23059.a_s_y@sama.ru>

On 04/09/2019 02:47 PM, Sergey wrote:

> Я так понимаю, что вопрос из-за того, что какой-то resolv.conf
> лежит в /var/resolv/etc/, а изменения в /etc/resolv.conf не
> во всех случаях становятся актуальными без запуска update_chrooted
> (или изменения /var/resolv/etc/resolv.conf другим способом каким-
> нибудь). Хотя вопрос, каков сейчас список приложений, которые
> используют /var/resolv/ тем или иным образом.



"каков сейчас список приложений" - а это разве не на общесистемном 
уровне применяется?

По крайней мере, ping работает с файлами именно из /var/resolv/etc/



У меня такая проблема - на хосте работает свой резолвер, он прописан в 
/etc/net/ifaces/{iface}/resolv.conf как 127.0.0.1.
При старте системы всё это прописывается в /etc/resolv.conf, 
/var/resolv/etc/resolv.conf, всё хорошо и благостно.

Теперь создаём netns, у которого свой собственный lo со своим 
собственным 127.0.0.1, и обнаруживаем, что резолвинг в этом неймспейсе 
не работает.

Ок, в man ip-netns сказано:
===================
For applications that are aware of network namespaces, the convention is 
to look for global network configuration files first in /etc/netns/NAME/ 
then in /etc/.  For example, if you want a different version of
/etc/resolv.conf for a network namespace used to isolate your vpn you 
would name it /etc/netns/myvpn/resolv.conf.

ip netns exec automates handling of this configuration, file convention 
for network namespace unaware applications, by creating a mount 
namespace and bind mounting all of the per network namespace configure 
files into their traditional location in /etc.
==================

Делаем директорию /etc/netns/myns, кладём туда исправленный экземпляр 
resolv.conf
Заходим снова в неймспейс, смотрим, что изнутри него /etc/resolv.conf 
виден как исправленно-правильный, однако резолвинг по-прежнему не 
работает, потому что /var/resolv/etc/resolv.conf остался старый, 
немодифицированный.
Если теперь изнутри неймспейса сказать update_chrooted, то резолвинг 
чинится для неймспейса, но тут же (ожидаемо) ломается для остальной 
хост-системы.


В общем, для меня тот факт, что resolv.conf и hosts используются из 
чрута /var/resolv/, создаёт дикое количество затруднений и проблем, и я 
был бы очень рад, если бы нашёлся путь использовать версии файлов 
непосредственно из /etc (как это в RHEL например работает).



  parent reply	other threads:[~2019-04-10 14:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09  0:09 Michael A. Kangin
2019-04-09  0:15 ` Dmitry V. Levin
2019-04-09 12:47   ` Sergey
2019-04-09 13:42     ` Dmitry V. Levin
2019-04-10 14:50     ` Michael A. Kangin [this message]
2019-04-10 15:06       ` Dmitry V. Levin
2019-04-10 16:58         ` [sisyphus] резолвер в чруте Michael A. Kangin
2019-04-10 17:05           ` Dmitry V. Levin
2019-04-10 17:24             ` Michael A. Kangin
2019-04-10 17:29               ` Dmitry V. Levin
2019-04-10 17:36                 ` Michael A. Kangin
2019-04-10 17:50                   ` Dmitry V. Levin
2019-04-10 18:10                     ` Michael A. Kangin
2019-04-10 18:18                     ` Mikhail Efremov
2019-04-10 17:36             ` Sergey
2019-04-12  5:35           ` Eugene Prokopiev

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=92593e51-3faf-bbc1-fa1d-3a0a77f07c4e@complife.ru \
    --to=mak@complife.ru \
    --cc=sisyphus@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 Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/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 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

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


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