debian-add_ip.sh: added comment about interfaces.tail
Add the note about impossibility to guarantee that contents
of /etc/network/interfaces.tail will always be at the end of
/etc/network/interfaces. Read on for the explanation...
In order for interfaces.tail to work as designed (i.e. always be inserted at
the end of file) we need to recreate /etc/network/interfaces from scratch every
time we add a new IP. The thing that we need to recreate it from scratch means
we should know all the IP addresses a VE should have.
This is incompatible with the current vzctl design/architecture:
(1) When a container is running with some IP addresses and we use vzctl set
$CTID --ipadd $ADDR, only $ADDR is passed to the add_ip script, not all
addresses of this CT. This means we have to add the new IP incrementally, not
rewrite the file completely.
(2) When we add a new IP to /etc/network/interfaces, we add it to the end of
file.
We could probably solve issue 2 by adding some marks to
/etc/network/interfaces and then inserting new lines in place.
We could probably solve (1) by modifying vzctl to supply all possible
IP addresses (taking it from CT config file). But in case we have IPs
added by vzctl set --ipadd without using --save flag, this becomes yet
more complicated.
http://bugzilla.openvz.org/1389
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed