1 |
On Mon, Oct 14, 2013 at 4:03 PM, David Leverton |
2 |
<levertond@××××××××××.com> wrote: |
3 |
> Rich Freeman wrote: |
4 |
>> |
5 |
>> However, FWIW, linux namespaces cannot be used to have only a single |
6 |
>> file appear differently to different processes. Mount namespaces can |
7 |
>> only operate at the directory level. |
8 |
> |
9 |
> |
10 |
> So to work around that limitation we insist that everyone change how their |
11 |
> systems are set up, and still have to reintroduce mtab under a different |
12 |
> name ("utab", hidden away under /run) because /proc/self/mounts *doesn't* |
13 |
> contain everything that's supposed to be in mtab after all? |
14 |
> |
15 |
> If someone decides they want to use, say, different DNS servers in different |
16 |
> namespaces, should we make the kernel store the server IP addresses, add a |
17 |
> /proc file that dumps them out in the expected format, and demand that |
18 |
> everyone replace their /etc/resolv.conf with a symlink to |
19 |
> /proc/self/resolv.conf? Or maybe, if people want namespaces, they can |
20 |
> implement them properly, in which case it becomes literally a self-solving |
21 |
> problem. |
22 |
> |
23 |
> |
24 |
|
25 |
This is a horrible example. /etc/resolv.conf is a configuration file |
26 |
for code that lives entirely in userspace. Of course it makes no sense |
27 |
to shove that into the kernel. |