Skip to content

Commit

Permalink
Merge pull request openshift#18336 from stevekuznetsov/skuznets/mount…
Browse files Browse the repository at this point in the history
…-debug

Automatic merge from submit-queue.

Add mount debugging and container inspection logs

In order to help debug issues around the use of `hack/env` and
especially those surrounding mounts in the container, we need to expose
more information in debug logging.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
  • Loading branch information
openshift-merge-robot authored Jan 30, 2018
2 parents 9e97287 + 9a3d101 commit 5b01ea9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hack/lib/build/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ function os::build::environment::cleanup() {
local container=$1
local volume=$2
local tmp_volume=$3
os::log::debug "Recording container information to ${LOG_DIR}/${container}.json"
docker inspect "${container}" > "${LOG_DIR}/${container}.json"
os::log::debug "Stopping container ${container}"
docker stop --time=0 "${container}" > /dev/null || true
if [[ -z "${OS_BUILD_ENV_LEAVE_CONTAINER:-}" ]]; then
Expand Down
3 changes: 3 additions & 0 deletions hack/lib/util/misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ function os::util::ensure_tmpfs() {
os::log::debug "Filesystem information:
$( df -h -T )"

os::log::debug "Mount information:
$( findmnt --all )"

local fstype
fstype="$( df --output=fstype "${target}" | tail -n 1 )"
if [[ "${fstype}" != "tmpfs" ]]; then
Expand Down

0 comments on commit 5b01ea9

Please sign in to comment.