argument of glance-cache-manage command is confusing

Bug #1236709 reported by Noboru Arai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Noboru Arai

Bug Description

step to reproduce:
 *execute "glance-cache-manage" command as fallows
  -"glance-cache-manage queue-image 1fde5cfe-10be-4f38-86e7-9e54710d34f2 45f1c095-5b8c-4537-8dd3-a58f91d7b4e1"

result:
 *messeage is displayed as follows
  -Queue image 45f1c095-5b8c-4537-8dd3-a58f91d7b4e1 for caching? [y/N]

expected result:
   If the number of argument isn't one, commad fails.

Noboru Arai (arai-h)
Changed in glance:
assignee: nobody → Noboru Arai (arai-h)
Noboru Arai (arai-h)
Changed in glance:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/51110

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/51110
Committed: http://github.com/openstack/glance/commit/635ceac07969a700756e571ff5777993b59b9829
Submitter: Jenkins
Branch: master

commit 635ceac07969a700756e571ff5777993b59b9829
Author: Noboru Arai <email address hidden>
Date: Fri Oct 11 13:04:52 2013 +0900

    checking length of argument list in "glance-cache-image" command

    Currently, "image id" is got by "pop" method without checking length
    of argument list in "queue_image" method(glance/cmd/cache_manage.py)

    Consequently, only last element of argument list is used,
    other elements are ignored.
     ex)
      glance-cache-image queue-image <image-id1> <image-id2> <image-id3>
      -> <image-id3> is selected and queued.
         <image-id1>/<image-id2> is ignored.

    Because "glance-cache-image" command is user command(*),
    I think that elements which are ignored should not be existed
    and checking of length is essential.

    In order to check length, I replaced "try/except" statement with
    "if/else" statement.

    Also, I modified 2 methods at the same point.
     -delete_queued_image
     -delete_cached_image

     * http://docs.openstack.org/developer/glance/cache.html

    Change-Id: I5cff1f9b5fe8f718ca74f1c9f58dba469396dc8f
    Closes-Bug: #1236709

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-1 → 2014.1
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.