Re: Ceph-deploy (git from today) fails to create osd on host that does not have a mon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/09/13 17:56, Mark Kirkwood wrote:


[ceph_deploy.osd][DEBUG ] Preparing cluster ceph disks ceph2:/dev/vdb:/dev/vdc
[ceph_deploy.osd][INFO  ] Distro info: Ubuntu 12.04 precise
[ceph_deploy.osd][DEBUG ] Deploying osd to ceph2
[ceph2][INFO  ] write cluster configuration to /etc/ceph/{cluster}.conf
[ceph2][INFO ] keyring file does not exist, creating one at: /var/lib/ceph/bootstrap-osd/ceph.keyring
[ceph2][INFO  ] create mon keyring file
[ceph2][ERROR ] Traceback (most recent call last):
[ceph2][ERROR ] File "/home/markir/develop/python/ceph-deploy/ceph_deploy/util/decorators.py", line 10, in inner [ceph2][ERROR ] File "/home/markir/develop/python/ceph-deploy/ceph_deploy/osd.py", line 14, in write_keyring
[ceph2][ERROR ] NameError: global name 'key' is not defined


The attached patch seems to fix it.

Cheers

Mark
diff --git a/ceph_deploy/osd.py b/ceph_deploy/osd.py
index 4cf0b0a..178f737 100644
--- a/ceph_deploy/osd.py
+++ b/ceph_deploy/osd.py
@@ -48,7 +48,7 @@ def create_osd(conn, logger, cluster, key):
             pid=conn.modules.os.getpid(),
             )
 
-        def write_keyring(tmp, path):
+        def write_keyring(tmp, path, key):
             """ create mon keyring file """
             # file() doesn't let us control access mode from the
             # beginning, and thus would have a race where attacker can
@@ -67,7 +67,7 @@ def create_osd(conn, logger, cluster, key):
             os.rename(tmp, path)
 
         with remote(conn, logger, write_keyring) as remote_func:
-            remote_func(tmp, path)
+            remote_func(tmp, path, key)
 
     return check_call(
         conn,

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux