]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix adopt prometheus command
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 16 Apr 2020 20:30:27 +0000 (16:30 -0400)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 24 Apr 2020 16:13:37 +0000 (18:13 +0200)
Create the target directory before copy the prometheus configuration.

Closes: https://tracker.ceph.com/issues/45120
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 252d4b3044b999e22e46845d3f7c7641e858ed31)

src/cephadm/cephadm

index d5f429a461c2d3209bdd5d741b67d48df8febb3f..f2fa9fee342c92dd99983da97c67d32a69e3bf7c 100755 (executable)
@@ -3319,6 +3319,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