summaryrefslogtreecommitdiffstats
path: root/ansible/docker/run_chroot.sh
AgeCommit message (Collapse)AuthorFilesLines
2019-04-05Fix wrapper shell script in chrootPetr Ospalý1-0/+2
Change-Id: I4f88d47c633096a82ef113dca2d58e584c43d1ae Issue-ID: OOM-1744 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-03-26Rewrite the run_chroot.sh scriptMichal Zegan1-262/+156
This change heavily changes run_chroot.sh script. Major change is that most of the real script logic is now run in a namespace, so that all mounts are done in namespace. Also, all the cleanup code and some checks are removed, also the shell wrapper is removed. This change is for simplifying the run_chroot.sh. It will function the same as before from the user's point of view, except that now the script does not have to explicitly unmount filesystems that it mounted before, so no cleanup code isneeded. Also, all processes run from inside a chroot should be killed immediately when the chroot command finishes. Change-Id: I45a3dc7c6583cb9693746cc04f42b7af325724dd Signed-off-by: Michal Zegan <m.zegan@samsung.com> Issue-ID: OOM-1744
2019-01-07Add support for plain files mounting into chrootPetr Ospalý1-11/+26
In this commit I tried to follow a behaviour of docker. If mounted path does not exist then it will handle it as a directory - it creates it and the mountpoint is expected to be a directory also. If the mounted path is a plain file it will do file bind mounting. The mountpoint must be a plain file. Change-Id: Ie8b29442c8ebb8da389ba6c9a152a49d8cf6e9be Issue-ID: OOM-1575 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-01-03Add /etc/hosts to the chroot environmentPetr Ospalý1-1/+2
This will change in a future commit to be little more flexible. As of now it fixes some usage when host system has defined some custom resolving which are needed. Change-Id: Ifea2ba087982006c0a399d1b225d7ab13f7e94da Issue-ID: OOM-1551 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2018-12-19Add a wrapper script to run ansible in chrootPetr Ospalý1-0/+465
Script uses namespaces and overlayfs to be more robust. Also it supports bind mounting to extend the chroot with external files and directories. Issue-ID: OOM-1551 Change-Id: I8c554e1b86fca86f86e6c0d0e1b106c97a08ef15 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>