]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix adopt prometheus command 34600/head
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 16 Apr 2020 20:30:27 +0000 (16:30 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Mon, 20 Apr 2020 12:42:25 +0000 (08:42 -0400)
Create the target directory before copy the prometheus configuration.

Closes: https://tracker.ceph.com/issues/45120
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
src/cephadm/cephadm

index 6031e2535e88b7d2963a4062c11774b8d45104e7..6a766e1fc774dfbbd6a91fa4805e8fcc65a4200b 100755 (executable)
@@ -3241,6 +3241,7 @@ def command_adopt_prometheus(daemon_id, fsid):
     config_src = '/etc/prometheus/prometheus.yml'
     config_src = os.path.abspath(args.legacy_dir + config_src)
     config_dst = os.path.join(data_dir_dst, 'etc/prometheus')
+    makedirs(config_dst, uid, gid, 0o755)
     copy_files([config_src], config_dst, uid=uid, gid=gid)
 
     # data