From bcce8c810f56a32710277341b0d6fe23226e7532 Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Thu, 21 Feb 2019 09:52:23 -0600 Subject: [PATCH] Setting the worker_rlimit_nofile minimum to 2048 for nginx In the docker image for mariadb-ingress if there are many cores the calculated value for worker_rlimit_nofile ends up being 1024 which is too small. This change sets the min to 2048. Closes-Bug: 1816479 Change-Id: I4f198b703eda61d9a9531640ec01a2770f9ec172 Signed-off-by: Al Bailey --- .../centos/build_srpm.data | 2 +- .../centos/openstack-helm-infra.spec | 2 ++ .../files/0006-Set-Min-NGINX-handles.patch | 27 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 openstack/openstack-helm-infra/files/0006-Set-Min-NGINX-handles.patch diff --git a/openstack/openstack-helm-infra/centos/build_srpm.data b/openstack/openstack-helm-infra/centos/build_srpm.data index 22d2fa85..671e561a 100644 --- a/openstack/openstack-helm-infra/centos/build_srpm.data +++ b/openstack/openstack-helm-infra/centos/build_srpm.data @@ -5,4 +5,4 @@ TAR="$TAR_NAME-$SHA.tar.gz" COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/*" -TIS_PATCH_VER=7 +TIS_PATCH_VER=8 diff --git a/openstack/openstack-helm-infra/centos/openstack-helm-infra.spec b/openstack/openstack-helm-infra/centos/openstack-helm-infra.spec index 3a21ed8b..97ef6ed8 100644 --- a/openstack/openstack-helm-infra/centos/openstack-helm-infra.spec +++ b/openstack/openstack-helm-infra/centos/openstack-helm-infra.spec @@ -20,6 +20,7 @@ Patch02: Mariadb-Support-adoption-of-running-single-node-mari.patch Patch03: 0004-Allow-multiple-containers-per-daemonset-pod.patch Patch04: fix-type-error-to-streamline-single-replica-mariadb-.patch Patch05: Add-imagePullSecrets-in-service-account.patch +Patch06: 0006-Set-Min-NGINX-handles.patch BuildRequires: helm @@ -33,6 +34,7 @@ Openstack Helm Infra charts %patch03 -p1 %patch04 -p1 %patch05 -p1 +%patch06 -p1 %build # initialize helm and build the toolkit diff --git a/openstack/openstack-helm-infra/files/0006-Set-Min-NGINX-handles.patch b/openstack/openstack-helm-infra/files/0006-Set-Min-NGINX-handles.patch new file mode 100644 index 00000000..f2f585a0 --- /dev/null +++ b/openstack/openstack-helm-infra/files/0006-Set-Min-NGINX-handles.patch @@ -0,0 +1,27 @@ +From dda42ea9d18cacb7059652e95fb1b689f175f6ac Mon Sep 17 00:00:00 2001 +From: Al Bailey +Date: Wed, 20 Feb 2019 13:56:27 -0600 +Subject: [PATCH 6/6] Set Min NGINX handles + +--- + mariadb/files/nginx.tmpl | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/mariadb/files/nginx.tmpl b/mariadb/files/nginx.tmpl +index b74b2b6..9775d89 100644 +--- a/mariadb/files/nginx.tmpl ++++ b/mariadb/files/nginx.tmpl +@@ -23,7 +23,9 @@ daemon off; + + worker_processes {{ $cfg.WorkerProcesses }}; + pid /run/nginx.pid; +-{{ if ne .MaxOpenFiles 0 }} ++{{ if lt .MaxOpenFiles 2048 }} ++worker_rlimit_nofile 2048; ++{{else}} + worker_rlimit_nofile {{ .MaxOpenFiles }}; + {{ end}} + +-- +1.8.3.1 +