Description of problem: Deployed 1 controller, 1 compute, 1 ceph configuration with GnocchiBackend: file. Changed default backend dir from /var/lib/gnocchi to /var/lib/test, in gnocchi_metricd tried to create new dir /var/lib/test: permission denied. Version-Release number of selected component (if applicable): gnocchi-common-4.3.3-0.20181005084758.54bae4e.el7ost.noarch python-gnocchi-4.3.3-0.20181005084758.54bae4e.el7ost.noarch puppet-gnocchi-13.3.1-0.20181013121920.4b95b4b.el7ost.noarch gnocchi-metricd-4.3.3-0.20181005084758.54bae4e.el7ost.noarch python2-gnocchiclient-7.0.4-0.20180823073245.64814b9.el7ost.noarch How reproducible: 100% Steps to Reproduce: 1. Deploy 1 controller, 1 compute, 1 ceph with an additional parameter GnocchiBackend: file. 2. Test that the measures are shown after deployment: create a new instance, watch cpu measures, observe that the directories are created on /var/lib/gnocchi in gnocchi_api container. 3. In /var/lib/config-data/puppet-generated/gnocchi/etc/gnocchi/gnocchi.conf change file_basepath=/var/lib/test. Restart gnocchi_metricd container. Verify that the config /etc/gnocchi/gnocchi.conf is changed in gnocchi_metricd container. 4. In gnocchi_metricd container try to add a folder test under /var/log. Get error "permission denied". Cannot create the folder. Note: when trying to add "test" folder under /var/lib/ in gnocchi_api container, everything works ok - the folder is created, the permissions can be changed. Actual results: Permission is denied Expected results: New folder is created Additional info: [heat-admin@controller-0 ~]$ tail /var/log/containers/gnocchi/gnocchi-metricd.log self._build_metric_path(metric, aggregation), File "/usr/lib/python2.7/site-packages/gnocchi/storage/file.py", line 136, in _build_metric_path return os.path.join(self._build_metric_dir(metric), File "/usr/lib/python2.7/site-packages/gnocchi/storage/file.py", line 121, in _build_metric_dir if self.SUBDIR_LEN > 0: File "/usr/lib/python2.7/site-packages/gnocchi/storage/file.py", line 76, in SUBDIR_LEN elif self.is_old_directory_structure(): File "/usr/lib/python2.7/site-packages/gnocchi/storage/file.py", line 98, in is_old_directory_structure for p in os.listdir(self.basepath): OSError: [Errno 2] No such file or directory: '/var/lib/test'
I think that in Release notes, in "Telemetry" section, Section of working with file backend, need to add that it's forbidden for client to change default file basepath for Gnocchi backend from /var/lib/gnocchi
To change the file directory you must do it with tripleo with the parameter GnocchiFileBasePath instead of changing /var/lib/config-data/puppet-generated/gnocchi/etc/gnocchi/gnocchi.conf. Tripleo will take care of creating all needed directory.