← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1347376] Re: create a volume from an image raise AttributeError

 

I like the idea of making the default container format 'bare' in the
server as well. I think that would save a lot of the headache that is
experienced by client users.

We could do one of two ways:
  #1 in glanceclient, during image-create, if data is given (--copy-from or --file or --stdin), but --container-format is not specified, set container-format: 'bare' during the api request.
  #2 just make the server default for container format bare

#1 is way less invasive but it doesn't cover all of the use cases
#2 is better coverage but also slightly backwards incompatible

Either way I don't really think of this as a bug (since honestly the
current behavior in glance is intentional), but as a feature request.
I'm willing to file a spec for it, and I've added it to the next team
meeting agenda.

** Changed in: glance
       Status: New => Invalid

** Changed in: glance
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1347376

Title:
  create a volume from an image raise AttributeError

Status in OpenStack Image Registry and Delivery Service (Glance):
  Invalid

Bug description:
  I'm working under RHEL7 + ICEHOUSE 2014.1
  For glance, image is stored in local file system.

  I want to create a volume from an image.

  First,I use glance cli to upload an image
  "glance image-create --name imgtest --disk-format qcow2 --is-public false --copy-from 'http://10.43.179.2:8081/files/linux/cirros-0.3.0-x86_64-disk.img'"

  Then,I run command
  "cinder create --image-id ${image_id} --display-name ${name} ${size}"

  But I get error "glanceclient AttributeError: container_format" ,in
  ciner-api debug info:

  ------------------------------ ciner-api debug log ------------------------------------
  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault     base_image_meta = self._translate_from_glance(image)

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault
  output[attr] = getattr(image, attr)

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault   File
  "/usr/lib/python2.7/site-packages/glanceclient/common/base.py", line
  95, in __getattr__

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault
  return self.__getattr__(k)

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault   File
  "/usr/lib/python2.7/site-packages/glanceclient/common/base.py", line
  97, in __getattr__

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault
  raise AttributeError(k)

  2014-07-22 17:25:32.310 15514 TRACE cinder.api.middleware.fault AttributeError: container_format
  --------------------------------------------------------------------------------------

  Then I find out, using glance cli to upload an image, the value of
  this image's container_format is 'None' in mysql.

  But use dashboard to upload an image, the value of container_format is
  default to 'Bare'.

  When we create a volume from an image, glanceclient checks the
  Attribute container_format. So we get this error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1347376/+subscriptions


References