From 1a45ae62b1ee998caed4fd59c0bb617bd7ec46e5 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 27 Oct 2014 14:52:38 -0400 Subject: [PATCH] create the temporary file in /etc/ceph so that SELinux is happy Signed-off-by: Alfredo Deza --- ceph_deploy/hosts/remotes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph_deploy/hosts/remotes.py b/ceph_deploy/hosts/remotes.py index c000c2f..b0dc345 100644 --- a/ceph_deploy/hosts/remotes.py +++ b/ceph_deploy/hosts/remotes.py @@ -101,7 +101,7 @@ def set_repo_priority(sections, path='/etc/yum.repos.d/ceph.repo', priority='1') def write_conf(cluster, conf, overwrite): """ write cluster configuration to /etc/ceph/{cluster}.conf """ path = '/etc/ceph/{cluster}.conf'.format(cluster=cluster) - tmp_file = tempfile.NamedTemporaryFile(delete=False) + tmp_file = tempfile.NamedTemporaryFile(dir='/etc/ceph', delete=False) err_msg = 'config file %s exists with different content; use --overwrite-conf to overwrite' % path if os.path.exists(path): -- 2.47.3