From: "Dmitry V. Levin" <ldv@altlinux.org> To: ALT Sisyphus mailing list <sisyphus@lists.altlinux.org> Subject: Re: [sisyphus] резолвер Date: Wed, 10 Apr 2019 18:06:33 +0300 Message-ID: <20190410150633.GC13460@altlinux.org> (raw) In-Reply-To: <92593e51-3faf-bbc1-fa1d-3a0a77f07c4e@complife.ru> [-- Attachment #1: Type: text/plain, Size: 2970 bytes --] On Wed, Apr 10, 2019 at 04:50:55PM +0200, Michael A. Kangin wrote: > 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, то резолвинг > чинится для неймспейса, но тут же (ожидаемо) ломается для остальной > хост-системы. Научите ip netns exec, который "automates handling of this configuration ... by creating a mount namespace and bind mounting all of the per network namespace configure files into their traditional location in /etc", не забывать про /var/resolv/. > В общем, для меня тот факт, что resolv.conf и hosts используются из > чрута /var/resolv/, создаёт дикое количество затруднений и проблем, и я > был бы очень рад, если бы нашёлся путь использовать версии файлов > непосредственно из /etc (как это в RHEL например работает). Что за дикое количество затруднений и проблем? Вы всю систему в netns запихиваете, что ли? -- ldv [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2019-04-10 15:06 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 2019-04-10 15:06 ` Dmitry V. Levin [this message] 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=20190410150633.GC13460@altlinux.org \ --to=ldv@altlinux.org \ --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