Project

General

Profile

Actions

Bug #6052

closed

ceph cli doesn't respect CEPH_ARGS

Added by Sage Weil over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
ceph cli
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Date: Mon, 19 Aug 2013 13:28:44 +0200
From: ?ystein L?nning Nerhus <nerhus@vx.no>
To: "ceph-users@lists.ceph.com" <ceph-users@lists.ceph.com>
Subject: [ceph-users] dumpling "ceph" cli tool breaks openstack cinder
Parts/Attachments:
   1.1   OK    ~25 lines  Text (charset: ISO-8859-1)
   1.2 Shown   ~24 lines  Text (charset: ISO-8859-1)
   2   Shown     5 lines  Text
----------------------------------------

    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hi,
I just noticed that in dumpling the "ceph" cli tool no longer utilises the
"CEPH_ARGS" environment variable.  This is used by openstack cinder to specifiy
the cephx user.  Ref: http://ceph.com/docs/next/rbd/rbd-openstack/#configure-op>
ph [ceph.com]

I modifiied this line in /usr/share/pyshared/cinder/volume/driver.py

<         stdout, _ = self._execute('ceph', 'fsid')
>         stdout, _ = self._execute('ceph', '--id', 'volumes', 'fsid')

For my particular setup this seems to be sufficient as a quick workaround.  Is
there a proper way to do this with the new tool?

Note: This only hit when i tried to create a volume from an image (i'm using
copy on write cloning).  creating a fresh volume didnt invoke the "ceph fsid" 
command in the openstack script, so i guess some openstack users will not be
affected.

Thanks,


Files

0001-Add-CEPH_ARGS-at-the-end-of-sys.argv.patch (849 Bytes) 0001-Add-CEPH_ARGS-at-the-end-of-sys.argv.patch Add CEPH_ARGS at the end of sys.argv Benoît Knecht, 09/23/2013 07:09 AM
0001-Add-CEPH_ARGS-at-the-end-of-sys.argv.patch (902 Bytes) 0001-Add-CEPH_ARGS-at-the-end-of-sys.argv.patch Add CEPH_ARGS at the end of sys.argv (v2) Benoît Knecht, 09/23/2013 07:28 AM
Actions #1

Updated by Ian Colle over 10 years ago

  • Assignee set to Sage Weil
Actions #2

Updated by Sage Weil over 10 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Sage Weil over 10 years ago

  • Status changed from Fix Under Review to Resolved
Actions #4

Updated by Benoît Knecht over 10 years ago

Well, this commit didn't solve the issue for me. Running CEPH_ARGS="--id cinder" ceph -s doesn't change the client id to cinder, while ceph --id cinder -s does.

The attached patch makes ceph behave as expected.

Actions #5

Updated by Benoît Knecht over 10 years ago

Please ignore the first patch, it didn't work if CEPH_ARGS wasn't set.

Actions #6

Updated by Sage Weil over 10 years ago

Benoît Knecht wrote:

Please ignore the first patch, it didn't work if CEPH_ARGS wasn't set.

Ah, I see why. In this case we should probably revert my original fix too so that the options aren't parsed twice. Thanks!

Actions #7

Updated by Benoît Knecht over 10 years ago

Sage Weil wrote:

Ah, I see why. In this case we should probably revert my original fix too so that the options aren't parsed twice. Thanks!

Do you want me to resubmit the patch with the revert of your fix included? I can also submit a pull request on Github, if that's the preferred procedure.

Actions #8

Updated by Sage Weil over 10 years ago

Benoît Knecht wrote:

Sage Weil wrote:

Ah, I see why. In this case we should probably revert my original fix too so that the options aren't parsed twice. Thanks!

Do you want me to resubmit the patch with the revert of your fix included? I can also submit a pull request on Github, if that's the preferred procedure.

No need, already pushed to wip-ceph-cli-env. Care to test?

Thanks!

Actions #9

Updated by Benoît Knecht over 10 years ago

Sage Weil wrote:

Benoît Knecht wrote:

Do you want me to resubmit the patch with the revert of your fix included? I can also submit a pull request on Github, if that's the preferred procedure.

No need, already pushed to wip-ceph-cli-env.

I see, great!

Care to test?

It'll have to wait until tomorrow, but I will. I'll report back here; don't hesitate to ping me if somehow I forget...

Actions #10

Updated by Benoît Knecht over 10 years ago

Alright, I just tested it (the wip-ceph-cli-env branch), and it works fine.

Thanks for having taken care of this so quickly.

Actions

Also available in: Atom PDF