summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-09 14:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-05-09 14:41:41 +0000
commitf9daabadad5827d3107fdbd7f1a97d1067ed6bbf (patch)
treedb74aee6644aec7fa5290d14445e5d736672cabb
parentAdding upstream version 20170405. (diff)
downloadopen-infrastructure-compute-tools-f9daabadad5827d3107fdbd7f1a97d1067ed6bbf.tar.xz
open-infrastructure-compute-tools-f9daabadad5827d3107fdbd7f1a97d1067ed6bbf.zip
Adding upstream version 20170510.upstream/20170510
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt11
-rw-r--r--Makefile8
-rw-r--r--VERSION.txt2
-rwxr-xr-xlib/container/create1
-rwxr-xr-xlib/container/list2
-rw-r--r--share/procps/zz-container-tools.conf12
-rwxr-xr-xshare/scripts/debconf12
7 files changed, 45 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f8b9435..cc595a3 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,14 @@
+2017-05-10 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20170510.
+
+ [ Daniel Baumann ]
+ * Purging packages when autoremoving them.
+ * Purging packages that got removed/replaced during container creation.
+ * Adding missing bind-ro handling in container create command, thanks to Simon Spöhel <simon.spoehel@open-infrastructure.net>.
+ * Adding sysctl config for procps to increase inotify limits in order to run more than a few containers on a system.
+ * Updating list of excluded directory names in container list command.
+
2017-04-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20170405.
diff --git a/Makefile b/Makefile
index 41b6d99..d243433 100644
--- a/Makefile
+++ b/Makefile
@@ -74,6 +74,9 @@ install: build
mkdir -p $(DESTDIR)/etc/logrotate.d
cp -r share/logrotate/* $(DESTDIR)/etc/logrotate.d
+ mkdir -p $(DESTDIR)/etc/sysctl.d
+ cp -r share/procps/* $(DESTDIR)/etc/sysctl.d
+
mkdir -p $(DESTDIR)/etc/sudoers.d
cp -r share/sudo/* $(DESTDIR)/etc/sudoers.d
chmod 0440 $(DESTDIR)/etc/sudoers.d/*
@@ -141,6 +144,11 @@ uninstall:
rm -f $(DESTDIR)/etc/sudoers.d/$$(basename $${FILE}); \
done
+ for FILE in share/procps/*; \
+ do \
+ rm -f $(DESTDIR)/etc/sysctl.d/$$(basename $${FILE}); \
+ done
+
for FILE in share/logrotate/*; \
do \
rm -f $(DESTDIR)/etc/logrotate.d/$$(basename $${FILE}); \
diff --git a/VERSION.txt b/VERSION.txt
index 68b5226..05d952c 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20170405
+20170510
diff --git a/lib/container/create b/lib/container/create
index b4fc5e9..1a6f4d5 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -209,6 +209,7 @@ sed -e "s|@CNT_AUTO@|${CNT_AUTO}|g" \
-e "s|@CNT_OVERLAY@|${CNT_OVERLAY}|g" \
-e "s|@NAME@|${NAME}|g" \
-e "s|@BIND@|${BIND}|g" \
+ -e "s|@BIND_RO@|${BIND_RO}|g" \
-e "s|@BOOT@|yes|g" \
-e "s|@CAPABILITY@|${CAPABILITY}|g" \
-e "s|@DIRECTORY@|${MACHINES}/${NAME}|g" \
diff --git a/lib/container/list b/lib/container/list
index 9608fd7..9bf61c4 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -320,7 +320,7 @@ esac
if ls "${MACHINES}"/* > /dev/null 2>&1
then
- CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -and -not -name '.container-tools' -and -not -name 'container-tools' -and -not -name 'lost+found' -and -not -name '.snap' -and -not -name '.snapshot' -printf '%P\n' | sort)"
+ CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -and -not -name 'lost+found' -printf '%P\n' | sort)"
fi
for CONTAINER in ${CONTAINERS}
diff --git a/share/procps/zz-container-tools.conf b/share/procps/zz-container-tools.conf
new file mode 100644
index 0000000..2396dfc
--- /dev/null
+++ b/share/procps/zz-container-tools.conf
@@ -0,0 +1,12 @@
+# The default limits are set to small and eventually lead to errors like
+# the following on container start:
+# Failed to allocate directory watch: Too many open files
+
+# /proc/sys/fs/inotify/max_queued_events defaults to 16384
+fs.inotify.max_queued_events=1048576
+
+# /proc/sys/fs/inotify/max_user_instances defaults to 128
+fs.inotify.max_user_instances=1048576
+
+# /proc/sys/fs/inotify/max_user_watches defaults to 8192
+fs.inotify.max_user_watches=1048576
diff --git a/share/scripts/debconf b/share/scripts/debconf
index e4c342e..dee4dcd 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -184,9 +184,19 @@ Cleanup_system ()
{
DIRECTORY="${1}"
- Chroot "${DIRECTORY}" "apt-get --yes autoremove"
+ Chroot "${DIRECTORY}" "apt-get --yes --purge autoremove"
Chroot "${DIRECTORY}" "apt-get clean"
+ CRUFT="$(Chroot "${DIRECTORY}" "dpkg --get-selections | awk '/deinstall$/ { print $1 }'")"
+
+ if [ -n "${CRUFT}" ]
+ then
+ for PACKAGE in ${CRUFT}
+ do
+ Chroot "${DIRECTORY}" "apt-get purge ${PACKAGE}"
+ done
+ fi
+
# Cleanup
rm -f "${DIRECTORY}/etc/dpkg/dpkg.cfg.d/container-tools"
rm -f "${DIRECTORY}/usr/sbin/policy-rc.d"