volume extend is not catch exception when in some status

Bug #1499948 reported by zhangjinnan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Tushar Trambak Gite

Bug Description

[stack@localhost devstack]$ cinder create --name test 1
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2015-09-26T03:01:30.000000 |
| description | None |
| encrypted | False |
| id | d8789ef9-a68f-46d9-be4b-32bb3b94c6a3 |
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | test |
| os-vol-host-attr:host | None |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 1fb3aabb988e43efb1d1a9a5f89cf2da |
| os-volume-replication:driver_data | None |
| os-volume-replication:extended_status | None |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| user_id | 89ba6206a112484c96624fe5678f7409 |
| volume_type | lvmdriver-1 |
+---------------------------------------+--------------------------------------+
[stack@localhost devstack]$ cinder list
+--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+
| ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+
| d8789ef9-a68f-46d9-be4b-32bb3b94c6a3 | available | - | test | 1 | lvmdriver-1 | false | False | |
+--------------------------------------+-----------+------------------+------+------+-------------+----------+-------------+-------------+

[stack@localhost devstack]$ cinder reset-state --state error test
[stack@localhost devstack]$ cinder list
+--------------------------------------+--------+------------------+------+------+-------------+----------+-------------+-------------+
| ID | Status | Migration Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+--------------------------------------+--------+------------------+------+------+-------------+----------+-------------+-------------+
| d8789ef9-a68f-46d9-be4b-32bb3b94c6a3 | error | - | test | 1 | lvmdriver-1 | false | False | |
+--------------------------------------+--------+------------------+------+------+-------------+----------+-------------+-------------+

[stack@localhost devstack]$ cinder extend test 2
ERROR: Invalid volume: Volume d8789ef9-a68f-46d9-be4b-32bb3b94c6a3 status must be available to extend, but current status is: error. (HTTP 400) (Request-ID: req-f6674f0a-50b3-4e8b-888d-b31418255eca)

In this scene, cinder-api log is not any log or exception.

Changed in cinder:
assignee: nobody → zhangjinnan (zhang-jinnan)
Changed in cinder:
status: New → In Progress
Revision history for this message
Huang Zhiteng (zhiteng-huang) wrote :

What's the expected state? From cinder client output, it looks fine to me.

Changed in cinder:
status: In Progress → Incomplete
Revision history for this message
Gorka Eguileor (gorka) wrote :

Cinder client output is fine, but in extend, unlike with other actions, this doesn't get logged in the API. For example migrate, retype and others log this exact same case (status is not valid) using LOG.error.

Changed in cinder:
status: Incomplete → In Progress
Revision history for this message
Alex Meade (alex-meade) wrote :

@Gorka Why would cinder-api log this using LOG.error? it's not a server error it was a user mistake. IMO the other operations are logging incorrectly. As an operator, I don't wanna have to go poking around to figure out why there are errors in my logs if it's because a user was attempting something incorrect. Also, I would note that this should be an HTTP 409 not a 400.

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in cinder:
assignee: zhangjinnan (zhang-jinnan) → nobody
Changed in cinder:
status: In Progress → New
Changed in cinder:
assignee: nobody → Tushar Trambak Gite (tushargite96)
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.