forked from rook/rook
Following the Ceph OSD rework, my test environment regularly failed to start OSDs, as they would start before the postStart lifecyle hook which was chown'ing the log and data directories could finish. Pods failed to start for an arbitrarily long time before starting successfully. This was a manifestation of a race condition identified in Ceph monitors in https://github.com/rook/rook/pull/3594#discussion_r312279176 Create a Ceph operator-level method to create an init container that will chown the necessary directories for all Ceph daemons (any daemon which runs as the ceph:ceph user-and-group). Also add this container to expectations for Ceph pod templates in unit tests. Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>