vcluster: Don't virtualize /etc/hosts path
authorMichael Hanselmann <hansmi@google.com>
Wed, 10 Oct 2012 09:09:33 +0000 (11:09 +0200)
committerMichael Hanselmann <hansmi@google.com>
Thu, 11 Oct 2012 09:56:51 +0000 (11:56 +0200)
commitfe4f6dcad3e3b302621358882694a3ddcb62878c
tree64492f2fcac8b4442c688ce3061171c21904d89e
parent36683bada012413a8451b39f96fdae5f9ff28767
vcluster: Don't virtualize /etc/hosts path

/etc/hosts is a bit special as it's a system-wide file and the virtual
cluster/node root doesn't apply. The modification of /etc/hosts should
be disabled in virtual clusters. If it isn't, however, the vcluster
functions would raise an exception complaining about a path outside of
the virtual node root. This patch adds a whitelist to exclude
/etc/hosts.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/pathutils.py
lib/vcluster.py
test/ganeti.vcluster_unittest.py