From 3f000973762a378e8733ac5ce074267fc0251912 Mon Sep 17 00:00:00 2001 From: Olivier Clavel Date: Thu, 13 Feb 2020 18:51:28 +0100 Subject: [PATCH] Turn off recursive ownership check of blobstores dirs by default (#243) * Turn off recursive ownership check of blobstores dirs by default * Update README for new parameter --- README.md | 19 ++++++++++++++++++- tasks/main.yml | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b44a116..d96d0ab0 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_ * [Upgrade nexus to latest version](#upgrade-nexus-to-latest-version) * [Fix upgrade failing on timeout waiting for nexus port](#fix-upgrade-failing-on-timeout-waiting-for-nexus-port) * [Skip provisionning tasks](#skip-provisionning-tasks) + * [Force recursive ownership check of blobstores directories](#force-recursive-ownership-check-of-blobstores-directories) * [Dependencies](#dependencies) * [Example Playbook](#example-playbook) * [Development, Contribution and Testing](#development-contribution-and-testing) @@ -67,7 +68,7 @@ _(Created with [gh-md-toc](https://github.com/ekalinin/github-markdown-toc))_ * [License](#license) * [Author Information](#author-information) - + @@ -870,6 +871,22 @@ We strongly suggest to use this variable only as an extra var to ansible-playboo ansible-playbook -i your/inventory.ini your_playbook.yml -e nexus_run_provisionning=false ``` +#### Force recursive ownership check of blobstores directories +_Introduced in version 2.4.9_ +```yaml + nexus_blobstores_recurse_owner: true +``` +In versions prior to 2.4.9, the task creating the blobstores directories was recursively checking the ownership +of all files. This was not a problem on creation (where dir is empty) or with installations with small +blobstores, but could lead to extremely long delays for large blobstores with lots of files. + +Recursive checking of ownership has been turned off by default to prevent this extra delay. If for some +reason you need to make sure all files in the blobstore directories are owned by the nexus user, you can +force the check: +```bash +ansible-playbook -i your/inventory.ini your_playbook.yml -e nexus_blobstores_recurse_owner=true +``` + ## Dependencies The java and httpd requirements /can/ be fulfilled with the following galaxy roles : diff --git a/tasks/main.yml b/tasks/main.yml index f6415cff..2e7a41c1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -107,7 +107,7 @@ owner: "{{ nexus_os_user }}" group: "{{ nexus_os_group }}" state: directory - recurse: true + recurse: "{{ nexus_blobstores_recurse_owner | default(false) | bool }}" when: item.path is defined loop: "{{ nexus_blobstores }}"