Nova 17.04 fails to create ephemeral storage with rbd driver: TypeError: name must be a string

Bug #1777123 reported by Dmitriy Rabotyagov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Low
melanie witt

Bug Description

Description
===========

Nova-compute is unable to create ephemeral storage due to type error, as it sends unicode object to rbd.Image() class as a storage name. Meanwhile, rbd.Image() accepts only string value.

Steps to reproduce
==================

Try to create an instance without cinder drive or with flavor which has a swap defined. Also, nova-compute should be configured to interact with ceph.

Steps to fix the problem
==================
in nova/virt/libvirt/storage/rbd_utils.py make the following changes:
- L69: self.volume = tpool.Proxy(rbd.Image(ioctx, name,
+ L69: self.volume = tpool.Proxy(rbd.Image(ioctx, str(name),

Expected result
===============

Instance should be created with swap storage and/or with ephemeral drive in ceph.

Actual result
=============
Instance creation fails with:

Exceeded maximum number of retries. Exhausted all hosts available for retrying build failures for instance bdd019bd-4127-4186-a1ee-f4b1891e1730.
File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/conductor/manager.py", line 580, in build_instances raise exception.MaxRetriesExceeded(reason=msg)

Environment
===========
1. I've installed openstack with OSA (OpenStack-Ansible) version 17.0.5. So it would be openstack queens version
(nova-17.0.5) root@uacloud-nova01:~# pip freeze | grep nova
nova==17.0.4
nova-lxd==17.0.0
nova-powervm==6.0.2.dev3
python-novaclient==9.1.1
(nova-17.0.5) root@uacloud-nova01:~#
2. KVM hypervisor
3. CEPH storage
4. Neutron networking

Logs & Configs
==============
In logs I see the following error:
2018-06-15 14:38:56.904 13411 INFO nova.compute.claims [req-b7277d7c-14b6-4f0c-97fb-bb29a6c379a5 cf35f21e050d462db0e0ecf20da2a9de d605898aeb654bfea6e18c3c0321d8a8 - 309afdf3dd6242338cd5eb4cda07f1d9 309afdf3dd6242338cd5eb4cda07f1d9] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] vcpu limit: 320.00 VCPU, free: 311.00 VCPU
2018-06-15 14:38:56.909 13411 INFO nova.compute.claims [req-b7277d7c-14b6-4f0c-97fb-bb29a6c379a5 cf35f21e050d462db0e0ecf20da2a9de d605898aeb654bfea6e18c3c0321d8a8 - 309afdf3dd6242338cd5eb4cda07f1d9 309afdf3dd6242338cd5eb4cda07f1d9] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Claim successful on node uacloud-nova01.twinservers.net
2018-06-15 14:38:57.837 13411 INFO nova.virt.libvirt.driver [req-b7277d7c-14b6-4f0c-97fb-bb29a6c379a5 cf35f21e050d462db0e0ecf20da2a9de d605898aeb654bfea6e18c3c0321d8a8 - 309afdf3dd6242338cd5eb4cda07f1d9 309afdf3dd6242338cd5eb4cda07f1d9] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Creating image
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [req-b7277d7c-14b6-4f0c-97fb-bb29a6c379a5 cf35f21e050d462db0e0ecf20da2a9de d605898aeb654bfea6e18c3c0321d8a8 - 309afdf3dd6242338cd5eb4cda07f1d9 309afdf3dd6242338cd5eb4cda07f1d9] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Instance failed to spawn: TypeError: name must be a string
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Traceback (most recent call last):
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/compute/manager.py", line 2248, in _build_resources
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] yield resources
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/compute/manager.py", line 2031, in _build_and_run_instance
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] block_device_info=block_device_info)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3072, in spawn
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] block_device_info=block_device_info)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3450, in _create_image
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] fallback_from_host)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 3541, in _create_and_inject_local_root
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] instance, size, fallback_from_host)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 7679, in _try_fetch_image_cache
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] size=size)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 241, in cache
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] if not self.exists() or not os.path.exists(base):
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/imagebackend.py", line 876, in exists
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] return self.driver.exists(self.rbd_name)
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.py", line 292, in exists
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] read_only=True):
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/openstack/venvs/nova-17.0.5/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.py", line 71, in __init__
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] read_only=read_only))
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] File "/usr/local/lib/python2.7/dist-packages/rbd.py", line 360, in __init__
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] raise TypeError('name must be a string')
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] TypeError: name must be a string
2018-06-15 14:38:57.899 13411 ERROR nova.compute.manager [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730]
2018-06-15 14:38:59.710 13411 INFO nova.compute.manager [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Terminating instance
2018-06-15 14:38:59.729 13411 INFO nova.virt.libvirt.driver [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Instance destroyed successfully.
2018-06-15 14:38:59.732 13411 INFO os_vif [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:9a:6f:0e,bridge_name='brq1adccf1f-63',has_traffic_filtering=True,id=5ff5feac-cb04-46db-8580-0929efd4c6eb,network=Network(1adccf1f-639e-4c7a-8865-851893eeee9c),plugin='linux_bridge',port_profile=<?>,preserve_on_delete=False,vif_name='tap5ff5feac-cb')
2018-06-15 14:38:59.815 13411 INFO nova.virt.libvirt.driver [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Deleting instance files /var/lib/nova/instances/bdd019bd-4127-4186-a1ee-f4b1891e1730_del
2018-06-15 14:38:59.817 13411 INFO nova.virt.libvirt.driver [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Deletion of /var/lib/nova/instances/bdd019bd-4127-4186-a1ee-f4b1891e1730_del complete
2018-06-15 14:38:59.922 13411 INFO nova.compute.manager [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Took 0.20 seconds to destroy the instance on the hypervisor.
2018-06-15 14:39:00.773 13411 INFO nova.compute.manager [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] [instance: bdd019bd-4127-4186-a1ee-f4b1891e1730] Took 0.57 seconds to deallocate network for instance.
2018-06-15 14:39:00.978 13411 INFO nova.scheduler.client.report [req-5726dc5e-06c9-40c3-8055-3a57e8ffd3a1 cdca526c2d674b51a209cf940688be7e 410ad59f6c5a4f27ba1bb5bf04bbb647 - default default] Deleted allocation for instance bdd019bd-4127-4186-a1ee-f4b1891e1730

Revision history for this message
Matt Riedemann (mriedem) wrote :

So the disk_name has unicode in it? Looks like it should just be the instance uuid, so no unicode.

tags: added: ceph libvirt
summary: - Nova 17.04 fails to create ephemeral storage with rbd driver
+ Nova 17.04 fails to create ephemeral storage with rbd driver: TypeError:
+ name must be a string
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

As a disk_name I had "4adc2422-b59d-4e84-b6fd-7f2e2f66d40a_disk", but when I tried to log type(disk_name) I've received <type 'unicode'>

It seems, that provided fix is for rbd library for python 3, while python 2.7 is used. So I don't have cstr() function in my rbd.py at all. Most likely, that the point is on version of rbd package and I should somehow upgrade it (and report the problem to OSA project, as it was installed by it):
~# pip show rbd
Name: rbd
Version: 2.0.0
Summary: Python bindings for the RBD library
Home-page: https://github.com/ceph/ceph/tree/master/src/pybind/rbd
Author: UNKNOWN
Author-email: UNKNOWN
License: LGPLv2+
Location: /usr/lib/python2.7/dist-packages
Requires:
~#

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

For example cinder in its cinder/volume/drivers/rbd.py resolves the problem like this:

 144 self.volume = driver.rbd.Image(rados_ioctx,
 145 utils.convert_str(name),
 146 snapshot=snapshot,
 147 read_only=read_only)

Revision history for this message
melanie witt (melwitt) wrote :

We had a similar bug around this awhile back [1].

Digging around in the code, I think I figured out why we're getting unicode type strings instead of native bytes strings in python2, it's because we're using this self.parse_url method to obtain the pool names:

https://github.com/openstack/nova/blob/5164517/nova/virt/libvirt/storage/rbd_utils.py#L180-L193

which calls six.moves.urllib.parse.unquote, which "Contains functions from Python 3’s urllib.parse...", which would be urllib.parse.unquote, which uses utf-8 encoding by default [3].

If you look throughout the rbd_utils.py file, there are many whack-a-mole calls of str() added to the various rbd library calls -- looks like we probably could have fixed this in one place in parse_url to have it return the a six.text_type, or something like that.

[1] https://bugs.launchpad.net/nova/+bug/1672792
[2] https://pythonhosted.org/six/#module-six.moves.urllib.parse
[3] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.unquote

Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
melanie witt (melwitt) wrote :

Correction to the above: six.text_type always represents unicode, so we would want to return the native text type depending on python version, not six.text_type.

That said, after playing around with a unit test, I'm not seeing that six.moves.urllib.parse.unquote returns type unicode -- it's returning type str. So again it's not yet clear where the unicode type is coming from.

Revision history for this message
melanie witt (melwitt) wrote :

Okay, I've done more sleuthing and found where the unicode type is coming from. It's coming from the instance.uuid -- instance.uuid is of type unicode in python2. So when the imagebackend.py code for rbd does this: "self.rbd_name = '%s_%s' % (instance.uuid, disk_name)" [1], because the instance.uuid is of type unicode, self.rbd_name is also unicode when it's assigned.

I tried some testing with a functional test and found that when an instance is queried from the database, its string fields are returned as type unicode. Here is a print statement I added in nova/objects/instance.py:

 358 def _from_db_object(context, instance, db_inst, expected_attrs=None):
 359 """Method to help with migration to objects.
 360
 361 Converts a database entity to a formal object.
 362 """
 363 instance._context = context
 364 if expected_attrs is None:
 365 expected_attrs = []
 366 # Most of the field names match right now, so be quick
 367 for field in instance.fields:
 368 if field in INSTANCE_OPTIONAL_ATTRS:
 369 continue
 370 elif field == 'deleted':
 371 instance.deleted = db_inst['deleted'] == db_inst['id']
 372 elif field == 'cleaned':
 373 instance.cleaned = db_inst['cleaned'] == 1
 374 else:
 375 instance[field] = db_inst[field]
 376 if field in ('uuid', 'project_id'):
 377 print('%s was of type: %s' % (field, type(db_inst[field])))

And the lines I added in a functional test:

 47 insts = objects.InstanceList.get_all(self.context.elevated())
 48 for i in insts:
 49 print(type(i.uuid))

and the output:

    project_id was of type: <type 'unicode'>
    uuid was of type: <type 'unicode'>
    project_id was of type: <type 'unicode'>
    uuid was of type: <type 'unicode'>
    project_id was of type: <type 'unicode'>
    uuid was of type: <type 'unicode'>
    project_id was of type: <type 'unicode'>
    uuid was of type: <type 'unicode'>
    <type 'unicode'>
    <type 'unicode'>
    <type 'unicode'>
    <type 'unicode'>

[1] https://github.com/openstack/nova/blob/372f624/nova/virt/libvirt/imagebackend.py#L807

melanie witt (melwitt)
Changed in nova:
assignee: nobody → melanie witt (melwitt)
Revision history for this message
melanie witt (melwitt) wrote :

I wondered why this isn't a problem in the legacy-tempest-dsvm-full-devstack-plugin-ceph job in the gate and I also couldn't reproduce the issue with devstack installed with the devstack-plugin-ceph today (which installs Ceph Luminous 12.2.4).

I realized the problem is that the bug reporter has Ceph Infernalis (or older) installed and the python bindings from back then [1] do not handle the unicode string type, whereas the more recent bindings for Ceph >= Jewel [2] work fine.

I just checked our gate job for Ocata [3], which installs Ceph Hammer, and python-rbd 10.2.9 gets installed along with it, and that also works fine without the "TypeError: name must be a string".

I agree with Dmitriy that this sounds like more of an issue with the python-rbd/python-rados versions that openstack-ansible is installing for Ceph. I think it would be a good idea to open a bug with them and try to get that part resolved.

Ceph Hammer is pretty old at this point but it is running in the Ocata gate and working fine with python-rbd/python-rados 10.2.9. Are you able to install that version of the bindings? What version of Ceph are you running?

In Nova, we could add more str() calls to be more resilient about old python binding versions in case someone is running something really old.

I'm going to update the importance of this bug to Low.

[1] https://github.com/ceph/ceph/blob/infernalis/src/pybind/rbd.py#L379-L416
[2] https://github.com/ceph/ceph/blob/luminous/src/pybind/rbd/rbd.pyx#L1343-L1380
[3] http://logs.openstack.org/77/588077/1/check/legacy-tempest-dsvm-full-devstack-plugin-ceph/a2a2d25/logs/devstacklog.txt.gz#_2018-08-01_20_55_45_676

Changed in nova:
importance: Medium → Low
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

We are using ceph luminous as a back-end. Moreover, I've catched similar problem on one computing node during unshelving procedure - nova fails to unshelve an instance with "TypeError: name must be a string" on the image restoration step. I'm currently on some kind of vacation, so I'll be able to provide log output only within several days.
I will try to dig into openstack-ansible-os_nova to get why so old rbd is get installed, as luminous ceph version had been specified in user_variables.yml (and ceph client is installed from luminous outside of virtualenv).

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

It seems, that the problem lies not in the openstack-ansible, but rather in ceph repos.

OSA installs python-ceph package from ceph repo here:
https://github.com/openstack/openstack-ansible-ceph_client/blob/e67c08ca99e2f951d517af8e0735a90177f2e3ab/vars/ubuntu.yml#L43

python-ceph has python-rbd in its dependencies, and python-rbd provides rbd library, which is symlinked into virtualenv. However, deb package python-rbd of version 12.2.7 has python rbd library of version 2.0:

root@nova01:~# dpkg -l | grep python-rbd
ii python-rbd 12.2.7-1xenial amd64 Python 2 libraries for the Ceph librbd library
root@nova01:~# dpkg-query -L python-rbd
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/python-rbd
/usr/share/doc/python-rbd/copyright
/usr/share/doc/python-rbd/changelog.Debian.gz
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/rbd.x86_64-linux-gnu.so
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/dependency_links.txt
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/top_level.txt
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/PKG-INFO
root@nova01:~# apt show python-rbd
Package: python-rbd
Version: 12.2.7-1xenial
Priority: optional
Section: python
Source: ceph
Maintainer: Ceph Maintainers <email address hidden>
Installed-Size: 461 kB
Depends: librbd1 (>= 12.2.7-1xenial), python (<< 2.8), python (>= 2.7~), libc6 (>= 2.4), libpython2.7 (>= 2.7)
Breaks: python-ceph (<< 0.92-1223)
Replaces: python-ceph (<< 0.92-1223)
Homepage: http://ceph.com/
Download-Size: 127 kB
APT-Manual-Installed: no
APT-Sources: http://download.ceph.com/debian-luminous xenial/main amd64 Packages
Description: Python 2 libraries for the Ceph librbd library
 Ceph is a massively scalable, open-source, distributed
 storage system that runs on commodity hardware and delivers object,
 block and file system storage.
 .
 This package contains Python 2 libraries for interacting with Ceph's
 RBD block device library.

N: There are 3 additional records. Please use the '-a' switch to see them.
root@uacloud-nova01:~#

So it seems, that this bug has almost nothing to do with OSA. And it seems, that everyone, who will install rbd library not from pip (or sources) will face with this bug...

Revision history for this message
melanie witt (melwitt) wrote :

Well, the tempest ceph job in the gate installs packages with apt-get (if ubuntu) [1][2], so I don't think there's an issue of pip or sources, etc. The packages are coming from the Ubuntu Cloud Archive repo.

And the version you show of your python-rbd package is 12.2.7, which according to the 12.2.7 source [3], uses the cstr() function and should be handling unicode.

I don't know what the "version 2.0" of the library means but it seems unrelated to the actual version of python-rbd library being used. I have similar in my environment:

$ dpkg -l | grep python-rbd
ii python-rbd 12.2.4-0ubuntu1~cloud1 amd64 Python libraries for the Ceph librbd library

$ dpkg-query -L python-rbd
/.
/usr
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/PKG-INFO
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/dependency_links.txt
/usr/lib/python2.7/dist-packages/rbd-2.0.0.egg-info/top_level.txt
/usr/lib/python2.7/dist-packages/rbd.x86_64-linux-gnu.so
/usr/share
/usr/share/doc
/usr/share/doc/python-rbd
/usr/share/doc/python-rbd/copyright
/usr/share/doc/python-rbd/changelog.Debian.gz

$ apt show python-rbd
Package: python-rbd
Version: 12.2.4-0ubuntu1~cloud1
Priority: optional
Section: python
Source: ceph
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Ceph Maintainers <email address hidden>
Installed-Size: 501 kB
Depends: librbd1 (= 12.2.4-0ubuntu1~cloud1), python (<< 2.8), python (>= 2.7~), libc6 (>= 2.4), libpython2.7 (>= 2.7)
Breaks: python-ceph (<< 0.94.1-1~)
Replaces: python-ceph (<< 0.94.1-1~)
Download-Size: 132 kB
APT-Manual-Installed: no
APT-Sources: http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/queens/main amd64 Packages
Description: Python libraries for the Ceph librbd library
 Ceph is a massively scalable, open-source, distributed
 storage system that runs on commodity hardware and delivers object,
 block and file system storage.
 .
 This package contains Python libraries for interacting with Ceph's
 RBD block device library.

N: There are 3 additional records. Please use the '-a' switch to see them.

And instances do *not* fail to create for unicode problems.

It seems like there is something wrong with the build of the packages that are available in the Ceph repo. The packages available in the Ubuntu Cloud Archive seem to be working well.

Maybe as a test, could you try installing python-rbd 12.2.7 from the Ubuntu Cloud Archive and see if it works without the TypeError? That would pinpoint if it's a problem with the packages from the Ceph repo and we could contact the maintainers to try to get it fixed. Because so far, it sounds like the package from the Ceph repo is including a much older version of rbd.py not matching 12.2.7.

[1] https://github.com/openstack/devstack-plugin-ceph/blob/21de8038dd5ea9af11c0c7b59daebebc2e723c2c/devstack/lib/ceph#L909
[2] https://github.com/openstack-dev/devstack/blob/ce0759d2d0030f5e578a6ebd648eed827135e584/functions-common#L1266-L1285
[3] https://github.com/ceph/ceph/blob/v12.2.7/src/pybind/rbd/rbd.pyx#L1343-L1381

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Yep, you're right. I also can not reproduce the problem neither on the fresh installation, nor after upgrading packages on the existing ones. So probably this problem is already in the past, and new users shouldn't face with it (unless, they're using very old ceph, which is unlikely).

Revision history for this message
melanie witt (melwitt) wrote :

Thanks for confirming that. Maybe there was a bad package push to the repo and you got unlucky during that window when you installed it, or something else happened in your environment.

Yeah, I'm not opposed to the idea of being more resilient on the nova side but it seems highly unlikely that anyone is running python-rbd 10.0.1 or older with Rocky (unicode handling was added in version 10.0.2). As seen in the gate, even older Ceph Hammer works fine with python-rbd/python-rados 10.2.9. But these days many are running Luminous. And we don't want to carry workarounds for very old ceph bindings forever.

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.