[Bug 1948439] Re: Not able to create image with cinder as storage backend

Hemanth Nakkina 1948439 at bugs.launchpad.net
Fri Oct 22 11:22:12 UTC 2021


** Patch added: "lp1948439_focal.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/python-glance-store/+bug/1948439/+attachment/5535216/+files/lp1948439_focal.debdiff

-- 
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/1948439

Title:
  Not able to create image with cinder as storage backend

Status in Ubuntu Cloud Archive:
  New
Status in Ubuntu Cloud Archive ussuri series:
  New
Status in python-glance-store package in Ubuntu:
  New
Status in python-glance-store source package in Focal:
  New

Bug description:
  On Ussuri, creation of image with cinder as glance storage backend
  fails.

  Reproduction Steps:

  1. Deploy cloud environment - focal ussuri
  2. Change the following configuration in /etc/glance/glance-api.conf to setup Cinder as Storage backend to Glance.

  [DEFAULT]
  enabled_backends = local:file, cinder:cinder
  [glance_store]
  default_backend = cinder

  Restart glance-api service
  systemctl restart glance-api.service

  3. Upload a cirros image to glance
  openstack image create --container-format bare --disk-format qcow2 --file /home/ubuntu/images/cirros-0.4.0-x86_64-disk.img test

  The above command throws an exception.

  Exception in /var/log/glance/glance-api.log
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder [req-282b09b7-3db4-44f7-937c-b7c2fb71453b da9d04a5652c41b98126e1a2b1ce9601 1c133b846e4e4948873aa3af847c23df - 4d430c7d67e0416a95e38b10aad4fc5f 4d430c7d67e0416a95e38b10aad4fc5f] Exception while accessing to cinder volume 7553d4cd-d315-4f97-8abe-f375864fa84a.: TypeError: temporary_chown() got an unexpected keyword argument 'backend'
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder Traceback (most recent call last):
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder   File "/usr/lib/python3/dist-packages/glance_store/_drivers/cinder.py", line 575, in _open_cinder_volume
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder     with self.temporary_chown(
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder   File "/usr/lib/python3.8/contextlib.py", line 240, in helper
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder     return _GeneratorContextManager(func, args, kwds)
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder   File "/usr/lib/python3.8/contextlib.py", line 83, in __init__
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder     self.gen = func(*args, **kwds)
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder TypeError: temporary_chown() got an unexpected keyword argument 'backend'
  2021-10-20 06:34:34.894 279293 ERROR glance_store._drivers.cinder

  Package used:
  python3-glance-store/focal-updates,now 2.0.0-0ubuntu2 all [installed,automatic]

  Analysis:

  The method signature and the calling method args seems different for function temporary_chown
  https://opendev.org/openstack/glance_store/src/tag/2.0.0/glance_store/_drivers/cinder.py#L458
  https://opendev.org/openstack/glance_store/src/tag/2.0.0/glance_store/_drivers/cinder.py#L573

  This is fixed in upstream as part of https://bugs.launchpad.net/glance-store/+bug/1870289
  The bug fix for LP#1870289 need to be SRU'ed to Ubuntu python3-glance-store packages.

  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  [Impact]
  Not able to upload an image to glance

  [Test Case]
  1. Deploy cloud with focal ussuri
  2. Configure cinder as glance storage backend

  Ensure the following configurations in glance-api.conf
  [DEFAULT]
  enabled_backends = local:file, cinder:cinder
  [glance_store]
  default_backend = cinder

  Restart glance-api service
  systemctl restart glance-api.service

  3. Upload an image to glance
  openstack image create --container-format bare --disk-format qcow2 --file /home/ubuntu/images/cirros-0.4.0-x86_64-disk.img test

  [Regression Potential]
  The fix is available in upstream and CI unit and functional tempest test cases are successful.

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




More information about the Ubuntu-openstack-bugs mailing list