From 87e43ce27a909ffc9d6516cd2f51a479a9b8a7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Hausman?= Date: Thu, 6 Dec 2018 17:48:09 +0100 Subject: [PATCH] Remove chown'ing on adding dirs to osd-devices When adding directories to osd-devices (e.g. juju config ceph-osd osd-devices="/srv/ceph1 /srv/ceph2"), the charm was recursively changing owner and group for all files below /var/lib/ceph, for each added directory. This was taking time and was not useful. The fix is to remove unnecessary recursive chown on /var/lib/ceph, since ceph already manages the ownership of the files itself. Change-Id: I39a00591bc86ec49c4ced53eadce75ddb21e2431 Closes-Bug: #1795383 --- lib/ceph/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ceph/utils.py b/lib/ceph/utils.py index 07f96a67..e7a948ab 100644 --- a/lib/ceph/utils.py +++ b/lib/ceph/utils.py @@ -1894,7 +1894,6 @@ def osdize_dir(path, encrypt=False, bluestore=False): return mkdir(path, owner=ceph_user(), group=ceph_user(), perms=0o755) - chownr('/var/lib/ceph', ceph_user(), ceph_user()) cmd = [ 'sudo', '-u', ceph_user(), 'ceph-disk',