From 27dddf0a25a3b6b223bfc3ce30ba943daca31d45 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Tue, 2 Jul 2019 12:02:54 -0700 Subject: [PATCH] rootfs: Make sure etc exists. We are seeing sporadic failures in the rootfs creation as listed here: https://github.com/kata-containers/tests/issues/1744 While this cannot be reproduced locally, there is no reason for the failure to write to $ROOTFS_DIR/etc/chrony.conf unless the upper directories are missing as this file should be created if it did not exist earier. So just create the etc directory to test out if we see these sporadic failures in the CI. Fixes #328 Signed-off-by: Archana Shinde --- rootfs-builder/rootfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index 2006fb2429..061e23ac60 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -459,6 +459,9 @@ if [ ${distro} == ubuntu ] || [ ${distro} == debian ] ; then chrony_conf_file="${ROOTFS_DIR}/etc/chrony/chrony.conf" fi +info "Create ${ROOTFS_DIR}/etc" +mkdir -p "${ROOTFS_DIR}/etc" + info "Configure chrony file ${chrony_conf_file}" cat >> "${chrony_conf_file}" <