Closed nixpanic closed 5 years ago
Working on resolving unrelated CI/build issues in #158
This is now rebased on top of #158, please merge that one before this change.
Still looks good to me and feel free to merge, but I don't have rights in this repo to do it myself. :-)
When Gluster runs in a container, it is recommended to run the LVM commands on the host, and not inside the container. With the new 'exec-on-host' shell script, the commands are executed through 'nsenter' which expects the /-filesystem of the host to be bind-mounted (as a volume) on /rootfs. It is also required that the container runs in the PID-namespace of the host, so that PID 1 refers to the init process on the host.
If the /-filesystem is not available under /rootfs in the container, or running 'true' through the 'exec-on-host' script fails, a fallback is done to execute the command inside the container anyway.
See-also: https://github.com/heketi/heketi/pull/1650