Extract cache network files from launcher and put in handler
Extract cache network files from launcher and put in handler

On upgrade, unless we copy cache files from launcher into handler, the latter
will assume it's a new pod and will try to configure network for it, which it
will of course fail because bridges etc. are already created.

This patch extracts the files from old location managed by launcher and put
them into shared storage managed by handler.

Because the old location was private and in a different mount namespace from
handler, we have to extract the files from under it.

One alternative would be to switch the mount namespace to read the files from
inside it, but, as explained in [1], switching mount namespaces under
multi-threaded programs is not supported (that is different from how network
namespaces work).

The good news is that Linux kernel allows to get access to a process mount
namespace without switching the effective namespace for the accessing process.
Any process that has access to /proc/<pid>/root/ can access all files seen by
<pid>. This method works for multi-threaded programs and is used here.

[1] https://jvns.ca/blog/2018/01/26/spy-container/

Signed-off-by: Ihar Hrachyshka <b339079bdd0c511d3934e046f7b02c5281dc2db1@redhat.com>

stu-gott/kubevirt,kubevirt/kubevirt,stu-gott/kubevirt,kubevirt/kubevirt,davidvossel/kubevirt,davidvossel/kubevirt,stu-gott/kubevirt,stu-gott/kubevirt,davidvossel/kubevirt,kubevirt/kubevirt,kubevirt/kubevirt,davidvossel/kubevirt