import flow doesn't raise error on forbidden location

Bug #1495519 reported by Flavio Percoco
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
wangxiyuan
Liberty
New
Medium
Unassigned

Bug Description

The following command correctly raises an exception server side but it doesn't report the error back to the user. This ends up in the user "thinking" the task was created correctly:

$ glance --os-image-api-version 2 --os-image-url http://localhost:9292/v2 --os-tenant-id a1875f8a27f74708b6fb9281e7430a98 task-create --type import --input '{"import_from_format": "qcow2", "import_from": "swift://127.0.0.1:8000/test.qcow2", "image_properties": {"disk_format": "qcow2", "container_format": "bare"}}'

Changed in glance:
importance: Undecided → High
Revision history for this message
wangxiyuan (wangxiyuan) wrote :

Hi, Flavio, I submit a bug before ,it's related to this bug.

https://bugs.launchpad.net/glance/+bug/1488311

https://review.openstack.org/#/c/216555/

The reason is that glance only checked the parameters before taskflow start, but didn't do any dispose about task status.
As in taskflow, it has checked the parameters already, we could remove the checking before the taskflow.

Changed in glance:
assignee: nobody → wangxiyuan (wangxiyuan)
Changed in glance:
status: New → In Progress
Changed in glance:
importance: High → Medium
Revision history for this message
Attila Fazekas (afazekas) wrote :

Currently the task is accepted with any wrong or missing argument including:
- glance task-create --type "import" --input '{}'

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

Reviewed: https://review.openstack.org/216555
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8c3121d671798b1fbb2c58a5d8c5a3a27ac9a556
Submitter: Jenkins
Branch: master

commit 8c3121d671798b1fbb2c58a5d8c5a3a27ac9a556
Author: wangxiyuan <email address hidden>
Date: Tue Aug 25 12:18:30 2015 +0800

    Fix incorrect task status with wrong parameter

    Now, when use wrong parameter to create a import task, the task's
    status will be processing forever. Actually the task has been stopped
    and returned error.
    So in this situation, the task's status should be changed into failure.

    Closes-bug: #1495519
    Change-Id: Ie4b3b92aaddcdbb839aadf61c75fc0c915e2040e

Changed in glance:
status: In Progress → Fix Committed
wangxiyuan (wangxiyuan)
Changed in glance:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.