← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1201386] Re: multiple records on creating an image with location parameter.

 

I agree with Erno. This appears to be abandoned and feedback on the
original review makes this seem like a dubious enhancement. Marking as
"Won't Fix"

** Changed in: glance
     Assignee: Ankit Agrawal (ankitagrawal) => (unassigned)

** Changed in: glance
       Status: New => Won't Fix

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

Title:
  multiple records on creating an image with location parameter.

Status in OpenStack Image Registry and Delivery Service (Glance):
  Won't Fix

Bug description:
  If an image is created with a '--location' parameter, multiple records
  are created on image_locations table.

  Steps to reproduce:

  1. Fire the following command using python-glanceclient for creating a
  new image.

          glance image-create --name "ubuntu_13.04_desktop" --disk-
  format "iso" --container-format "bare" --location
  "http://releases.ubuntu.com/raring/ubuntu-13.04-desktop-amd64.iso";

  2. python-glanceclient successfully gets the image created and shows
  the details for the same. eg., with image id: 1305c94a-d289-4e05-830b-
  fec6d2b0d682

  3. Goto mysql database and fire the following queries:

  mysql> select * from images where id='1305c94a-d289-4e05-830b-fec6d2b0d682'\G
  *************************** 1. row ***************************
                id: 1305c94a-d289-4e05-830b-fec6d2b0d682
              name: ubuntu_13.04_desktop
              size: 823132160
            status: active
         is_public: 0
        created_at: 2013-07-15 06:27:31
        updated_at: 2013-07-15 06:27:31
        deleted_at: NULL
           deleted: 0
       disk_format: iso
  container_format: bare
          checksum: NULL
             owner: 39e386d5c8db47cc9a9d80798793a162
          min_disk: 0
           min_ram: 0
         protected: 0
  1 row in set (0.00 sec)

  mysql> select * from image_locations where image_id='1305c94a-d289-4e05-830b-fec6d2b0d682'\G
  *************************** 1. row ***************************
          id: 1684
    image_id: 1305c94a-d289-4e05-830b-fec6d2b0d682
       value: http://releases.ubuntu.com/raring/ubuntu-13.04-desktop-amd64.iso
  created_at: 2013-07-15 06:27:31
  updated_at: 2013-07-15 06:27:31
  deleted_at: 2013-07-15 06:27:31
     deleted: 1
   meta_data:
  *************************** 2. row ***************************
          id: 1685
    image_id: 1305c94a-d289-4e05-830b-fec6d2b0d682
       value: http://releases.ubuntu.com/raring/ubuntu-13.04-desktop-amd64.iso
  created_at: 2013-07-15 06:27:31
  updated_at: 2013-07-15 06:27:31
  deleted_at: NULL
     deleted: 0
   meta_data:.
  2 rows in set (0.00 sec)

  Notice that under the image_locations table, there are actually
  mutiple records created for the same location. One soft-deleted and
  second one with deleted set to 0.

  P.S: This scenario could be reproduced only when '--location' parameter/value is passed as an argument to the 'glance image-create' command.
  Had an image been uploaded as part of the 'glance image-create' command instead of location, then mutliple records does not get created on image_locations table.

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