All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
To: ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: Ceph-deploy (git from today) fails to create osd on host that does not have a mon
Date: Thu, 05 Sep 2013 18:27:46 +1200	[thread overview]
Message-ID: <52282462.9030305@catalyst.net.nz> (raw)
In-Reply-To: <52281D10.9090507@catalyst.net.nz>

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

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

[-- Attachment #2: osd.py.diff --]
[-- Type: text/x-patch, Size: 803 bytes --]

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,

  reply	other threads:[~2013-09-05  6:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-05  5:56 Ceph-deploy (git from today) fails to create osd on host that does not have a mon Mark Kirkwood
2013-09-05  6:27 ` Mark Kirkwood [this message]
2013-09-05 13:08   ` Alfredo Deza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52282462.9030305@catalyst.net.nz \
    --to=mark.kirkwood@catalyst.net.nz \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.