From bc06e08b5fc696bbb5551f13c28712e7ebb3ecfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 13 Mar 2022 11:39:41 +0100 Subject: [PATCH 1/2] use cp instead of rsync to preserve odoo-venv Rsync is not present in the oca/oca-ci image and installing it sometimes failed due to outdated deb package information. --- src/runboat/kubefiles/runboat-clone-and-install.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/runboat/kubefiles/runboat-clone-and-install.sh b/src/runboat/kubefiles/runboat-clone-and-install.sh index 3b1b05a..a60da2b 100755 --- a/src/runboat/kubefiles/runboat-clone-and-install.sh +++ b/src/runboat/kubefiles/runboat-clone-and-install.sh @@ -2,8 +2,8 @@ set -exo pipefail -# Remove initialization sentinel, in case we are reinitializing. -rm -fr /mnt/data/initialized +# Remove initialization sentinel and data, in case we are reinitializing. +rm -fr /mnt/data/* # Remove addons dir, in case we are reinitializing after a previously # failed installation. @@ -25,7 +25,6 @@ else fi # Keep a copy of the venv that we can re-use for shorter startup time. -DEBIAN_FRONTEND=noninteractive apt-get -yqq install rsync -rsync -a --delete /opt/odoo-venv/ /mnt/data/odoo-venv +cp -ar /opt/odoo-venv/ /mnt/data/odoo-venv touch /mnt/data/initialized From 26a7d59681acc3044a44c7469930718519b1df58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 13 Mar 2022 11:41:24 +0100 Subject: [PATCH 2/2] Add comment --- src/runboat/kubefiles/runboat-clone-and-install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runboat/kubefiles/runboat-clone-and-install.sh b/src/runboat/kubefiles/runboat-clone-and-install.sh index a60da2b..d29f4d0 100755 --- a/src/runboat/kubefiles/runboat-clone-and-install.sh +++ b/src/runboat/kubefiles/runboat-clone-and-install.sh @@ -9,6 +9,8 @@ rm -fr /mnt/data/* # failed installation. rm -fr $ADDONS_DIR # Download the repository at git reference into $ADDONS_DIR. +# We use curl instead of git clone because the git clone method used more than 1GB RAM, +# which exceeded the default pod memory limit. mkdir -p $ADDONS_DIR cd $ADDONS_DIR curl -sSL https://github.com/${RUNBOAT_GIT_REPO}/tarball/${RUNBOAT_GIT_REF} | tar zxf - --strip-components=1