]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
create the temporary file in /etc/ceph so that SELinux is happy 249/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 27 Oct 2014 18:52:38 +0000 (14:52 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 27 Oct 2014 18:52:38 +0000 (14:52 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/hosts/remotes.py

index c000c2f236db98e15b3d6e517a092f7117675c0f..b0dc345691b6ad08e077d9991dd2555139f9a287 100644 (file)
@@ -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):