Message ID | 52282462.9030305@catalyst.net.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Sep 5, 2013 at 2:27 AM, Mark Kirkwood <mark.kirkwood@catalyst.net.nz> wrote: > 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. Woah, good catch Mark. The osd module recently had some changes to improve the logging in the remote host and it seems that that variable was left out. I opened http://tracker.ceph.com/issues/6237 and this should be fixed (with your patch) today. > > Cheers > > Mark -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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,