[Bug 1833079] Re: backport librbd librados py3 string encoding fixes

James Page james.page at ubuntu.com
Tue Jun 18 10:12:12 UTC 2019


** Description changed:

  [Impact]
  Requesting back port of py3 encoding fixes to Mimic so that consumers of that code don't get strings returned with invalid encodings when run under py3.
  
  [Test Case]
  
  sudo apt install -y python3-rados
  cat << EOF | python3
  import rados
  name = 'ceph'
  conf = '/etc/ceph/ceph.conf'
  user = 'a-user'
  client = rados.Rados(rados_id=user,
                       clustername=name,
                       conffile=conf)
  client.connect()
  fsid = client.get_fsid()
  if type(fsid) == str:
      print("value={} has correct type={}".format(fsid, type(fsid)))
  else:
      print("value={} has incorrect type={} (expect str)".format(fsid, type(fsid)))
  EOF
  
  [Regression Potential]
- none expected
+ This change ensures that cstr types are automatically decoded/encoded within the generated python bindings for the underlying system libraries.
+ 
+ If python code is blindly decoding the return values from the rados/rbd
+ bindings, its possible this change will break such code paths; however
+ the scoped changes in OpenStack detect the binary type and decode if
+ needed.
  
  -----------------------------------------------------------------------------
  
  These fixes relate to issues we have found in Openstack [1][2] when
  running under Python 3. They are fixed upstream by commit [3] which is
  available in nautilus and beyond so we would like to backport to mimic
  and luminous.
  
  [1] https://bugs.launchpad.net/nova/+bug/1816468
  [2] https://bugs.launchpad.net/glance-store/+bug/1816721
  [3] https://github.com/ceph/ceph/commit/c36d0f1a7de4668eb81075e4a94846cf81fc30cd

** Description changed:

  [Impact]
  Requesting back port of py3 encoding fixes to Mimic so that consumers of that code don't get strings returned with invalid encodings when run under py3.
  
  [Test Case]
  
  sudo apt install -y python3-rados
  cat << EOF | python3
  import rados
  name = 'ceph'
  conf = '/etc/ceph/ceph.conf'
  user = 'a-user'
  client = rados.Rados(rados_id=user,
                       clustername=name,
                       conffile=conf)
  client.connect()
  fsid = client.get_fsid()
  if type(fsid) == str:
      print("value={} has correct type={}".format(fsid, type(fsid)))
  else:
      print("value={} has incorrect type={} (expect str)".format(fsid, type(fsid)))
  EOF
  
  [Regression Potential]
  This change ensures that cstr types are automatically decoded/encoded within the generated python bindings for the underlying system libraries.
  
  If python code is blindly decoding the return values from the rados/rbd
  bindings, its possible this change will break such code paths; however
  the scoped changes in OpenStack detect the binary type and decode if
  needed.
  
+ This only really impacts any apps running under py3; py2 does lots of
+ implicit conversation so is insulated from this bug.
+ 
  -----------------------------------------------------------------------------
  
  These fixes relate to issues we have found in Openstack [1][2] when
  running under Python 3. They are fixed upstream by commit [3] which is
  available in nautilus and beyond so we would like to backport to mimic
  and luminous.
  
  [1] https://bugs.launchpad.net/nova/+bug/1816468
  [2] https://bugs.launchpad.net/glance-store/+bug/1816721
  [3] https://github.com/ceph/ceph/commit/c36d0f1a7de4668eb81075e4a94846cf81fc30cd

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1833079

Title:
  backport librbd librados py3 string encoding fixes

Status in Ubuntu Cloud Archive:
  In Progress
Status in Ubuntu Cloud Archive rocky series:
  In Progress
Status in Ubuntu Cloud Archive stein series:
  In Progress
Status in Ubuntu Cloud Archive train series:
  In Progress
Status in ceph package in Ubuntu:
  In Progress
Status in ceph source package in Cosmic:
  In Progress
Status in ceph source package in Disco:
  In Progress
Status in ceph source package in Eoan:
  In Progress

Bug description:
  [Impact]
  Requesting back port of py3 encoding fixes to Mimic so that consumers of that code don't get strings returned with invalid encodings when run under py3.

  [Test Case]

  sudo apt install -y python3-rados
  cat << EOF | python3
  import rados
  name = 'ceph'
  conf = '/etc/ceph/ceph.conf'
  user = 'a-user'
  client = rados.Rados(rados_id=user,
                       clustername=name,
                       conffile=conf)
  client.connect()
  fsid = client.get_fsid()
  if type(fsid) == str:
      print("value={} has correct type={}".format(fsid, type(fsid)))
  else:
      print("value={} has incorrect type={} (expect str)".format(fsid, type(fsid)))
  EOF

  [Regression Potential]
  This change ensures that cstr types are automatically decoded/encoded within the generated python bindings for the underlying system libraries.

  If python code is blindly decoding the return values from the
  rados/rbd bindings, its possible this change will break such code
  paths; however the scoped changes in OpenStack detect the binary type
  and decode if needed.

  This only really impacts any apps running under py3; py2 does lots of
  implicit conversation so is insulated from this bug.

  -----------------------------------------------------------------------------

  These fixes relate to issues we have found in Openstack [1][2] when
  running under Python 3. They are fixed upstream by commit [3] which is
  available in nautilus and beyond so we would like to backport to mimic
  and luminous.

  [1] https://bugs.launchpad.net/nova/+bug/1816468
  [2] https://bugs.launchpad.net/glance-store/+bug/1816721
  [3] https://github.com/ceph/ceph/commit/c36d0f1a7de4668eb81075e4a94846cf81fc30cd

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1833079/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list