From: Alfredo Deza Date: Mon, 27 Oct 2014 18:52:38 +0000 (-0400) Subject: create the temporary file in /etc/ceph so that SELinux is happy X-Git-Tag: v1.5.19~3^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a45ae62b1ee998caed4fd59c0bb617bd7ec46e5;p=ceph-deploy.git create the temporary file in /etc/ceph so that SELinux is happy Signed-off-by: Alfredo Deza --- 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):