rados parsing error with hostnames in mon_host

Bug #1099900 reported by David Britton
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Low
Unassigned
ceph (Juju Charms Collection)
Invalid
High
Unassigned
ceph (Ubuntu)
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Low
Unassigned
cinder (Juju Charms Collection)
Fix Released
High
Unassigned
glance (Juju Charms Collection)
Fix Released
High
Unassigned
nova-compute (Juju Charms Collection)
Fix Released
High
Unassigned

Bug Description

In /etc/ceph/ceph.conf, if I set hostnames in the mon_host variable and separate them with spaces, the parsing algorithm breaks down. The expectation is that all three of these cases should work. Once hostnames are introduced in the mon_host line, spaces are no longer allowed anywhere or parse errors happen.

Precise is being used, here is the ceph-common package information:

ubuntu@ip-10-151-64-32:~$ apt-cache policy ceph-common
ceph-common:
  Installed: 0.48.2-0ubuntu2~cloud0
  Candidate: 0.48.2-0ubuntu2~cloud0
  Version table:
 *** 0.48.2-0ubuntu2~cloud0 0
        500 http://ppa.launchpad.net/ubuntu-cloud-archive/grizzly-staging/ubuntu
/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     0.41-1ubuntu2.1 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main
 amd64 Packages
     0.41-1ubuntu2 0
        500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 P
ackages

Using IP addresses, spaces as separators:

$ grep mon /etc/ceph/ceph.conf
 mon host = 10.151.12.34:6789 10.245.205.215:6789 10.243.34.22:6789
$ rados --id glance lspools
data
metadata
rbd
images
cinder

Using hostnames, spaces as separators (BUG)

$ grep mon /etc/ceph/ceph.conf
 mon host = ip-10-151-12-34.ec2.internal:6789 ip-10-245-205-215.ec2.internal:6789 ip-10-243-34-22.ec2.internal:6789
$ rados --id glance lspools
server name not found: ip-10-151-12-34.ec2.internal:6789 ip-10-245-205-215.ec2.internal:6789 ip-10-243-34-22.ec2.internal:6789 (Name or service not known)
unable to parse addrs in 'ip-10-151-12-34.ec2.internal:6789 ip-10-245-205-215.ec2.internal:6789 ip-10-243-34-22.ec2.internal:6789'
couldn't connect to cluster! error -22

Using hostnames, commas as separators

$ grep mon /etc/ceph/ceph.conf
 mon host = ip-10-151-12-34.ec2.internal:6789,ip-10-245-205-215.ec2.internal:6789,ip-10-243-34-22.ec2.internal:6789
$ rados --id glance lspools
data
metadata
rbd
images
cinder

Revision history for this message
Sage Weil (sage-newdream) wrote :

This is fixed in the mainline and bobtail, but not in argonaut. In newer case, any of [,; ] work.

Revision history for this message
Sage Weil (sage-newdream) wrote :

s/case/code/

Revision history for this message
Sage Weil (sage-newdream) wrote :

I take that back: this is already fixed in v0.48.3argonaut, which you should be upgrading to anyway due to some critical bug fixes.

Revision history for this message
David Britton (dpb) wrote :

Was there a bug fix for it? I think a colleague has reproduced the issue with ceph git trunk.

Revision history for this message
Sage Weil (sage-newdream) wrote :

commit 1c382869ba6aff0c159103a8267045c6eb600114 in mainline, commit ea42eb1f7866fed0e843257ce05e34503fd0129c in teh argonaut stable branch. I just did a quick test and it appears to be okay on master. Can you confirm that there were problems on anything other than v0.48.2?

James Page (james-page)
Changed in ceph (Ubuntu):
status: New → Fix Released
Changed in ceph (Ubuntu Quantal):
importance: Undecided → Low
status: New → Triaged
Changed in cloud-archive:
importance: Undecided → Low
status: New → Triaged
Changed in ceph (Juju Charms Collection):
status: New → Triaged
Changed in cinder (Juju Charms Collection):
status: New → Triaged
Changed in nova-compute (Juju Charms Collection):
status: New → Triaged
Changed in cinder (Juju Charms Collection):
importance: Undecided → High
Changed in nova-compute (Juju Charms Collection):
importance: Undecided → High
Changed in ceph (Juju Charms Collection):
importance: Undecided → High
Changed in glance (Juju Charms Collection):
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Page (james-page) wrote :

This effects the cinder, glance and nova-compute charms as the ceph-* charms always translate hostnames -> IP addresses when generating configuration (so they work fine with the space).

Changed in ceph (Juju Charms Collection):
status: Triaged → Invalid
Revision history for this message
David Britton (dpb) wrote :

This does appear to be fixed in trunk -- confirmed.

Changed in glance (Juju Charms Collection):
status: Triaged → Fix Released
Changed in cinder (Juju Charms Collection):
status: Triaged → Fix Released
Changed in nova-compute (Juju Charms Collection):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello David, or anyone else affected,

Accepted ceph into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/ceph/0.48.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ceph (Ubuntu Quantal):
status: Triaged → Fix Committed
tags: added: verification-needed
Revision history for this message
James Page (james-page) wrote :

root@juju-quantal-instance-85:/etc/ceph# cat ceph-byname.conf
[global]

 auth supported = cephx

 keyring = /etc/ceph/$cluster.$name.keyring
 mon host = ceph-18:6789 ceph-19:6789 ceph-20:6789
 fsid = 6547bd3e-1397-11e2-82e5-53567c8d32dc

[mon]
 keyring = /var/lib/ceph/mon/$cluster-$id/keyring

[mds]
 keyring = /var/lib/ceph/mds/$cluster-$id/keyring

[osd]
 keyring = /var/lib/ceph/osd/$cluster-$id/keyring
 osd journal size = 1000
 filestore xattr use omap = true
root@juju-quantal-instance-85:/etc/ceph# rados -c ceph-byname.conf lspools
data
metadata
rbd
.rgw
.rgw.control
bench
root@juju-quantal-instance-85:/etc/ceph#

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ceph - 0.48.3-0ubuntu1

---------------
ceph (0.48.3-0ubuntu1) quantal-proposed; urgency=low

  * New upstream Ceph Argonaut LTS point release (LP: #1154547):
    - Fixes error when parsing mon_hosts configuration as hostnames
      with space delimiter (LP: #1099900).
    - d/p/extra-byte-for-null.patch: Dropped as included in upstream
      release.
  * d/watch: Use official release tarballs rather than pulling from github
    to ensure that ceph -v is correctly populated (LP: #1079941).
 -- James Page <email address hidden> Tue, 16 Apr 2013 13:20:18 -0700

Changed in ceph (Ubuntu Quantal):
status: Fix Committed → Fix Released
James Page (james-page)
Changed in cloud-archive:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.