volume size is smaller than the cache size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
In Progress
|
Undecided
|
yenai |
Bug Description
Image info:
[stack@localhost devstack]$ glance image-show 270c0ea5-
+------
| Property | Value |
+------
| checksum | 056fcc63eb0e7aa
| container_format | bare |
| created_at | 2019-09-
| disk_format | qcow2 |
| id | 270c0ea5-
| min_disk | 0 |
| min_ram | 0 |
| name | CentOS7-1611 |
| os_hash_algo | sha512 |
| os_hash_value | fa5515da171d315
| | 4850887507e01a9
| os_hidden | False |
| owner | d01ec9caf63a421
| protected | False |
| size | 1317994496 |
| status | active |
| tags | [] |
| updated_at | 2019-09-
| virtual_size | Not available |
| visibility | shared |
+------
[stack@localhost devstack]$ qemu-img info 270c0ea5-
image: 270c0ea5-
file format: qcow2
virtual size: 8.0G (8589934592 bytes)
disk size: 1.2G
cluster_size: 65536
Format specific information:
compat: 0.10
refcount bits: 16
[stack@localhost devstack]$
Create a 9GB volume, auto creating a 8GB image cache volume: This is right.
[stack@localhost devstack]$ cinder list --all | grep available
| 59959108-
| ea5d357c-
[stack@localhost devstack]$
Create a 1GB volume: Failed(size is not fit). This is right.
[stack@localhost devstack]$ cinder create --image-id 270c0ea5-
ERROR: Invalid input received: Size of specified image 2GB is larger than volume size 1GB. (HTTP 400) (Request-ID: req-a1fddaa0-
★★★★★ Create a 2GB volume: success!!! This is a big problem.
[stack@localhost devstack]$ cinder create --image-id 270c0ea5-
+------
| Property | Value |
+------
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2019-09-
| description | None |
| encrypted | False |
| id | 48ad9897-
| metadata | {} |
| migration_status | None |
| multiattach | False |
| name | None |
| os-vol-
| os-vol-
| os-vol-
| os-vol-
| replication_status | None |
| size | 2 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| updated_at | None |
| user_id | 83aa2159496d4a2
| volume_type | yenai-lvm |
+------
[stack@localhost devstack]$ cinder list --all
+------
| ID | Tenant ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 48ad9897-
| ea5d357c-
+------
LVM info:
[stack@localhost devstack]$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root cl -wi-ao---- <35.00g
swap cl -wi-ao---- 4.00g
stack-
_snapshot-
volume-
volume-
yenai_vg-pool yenai_vg twi-aotz-- 190.00g 4.26 12.62
[stack@localhost devstack]$
Just see the log, whitout any size check:
Sep 13 10:28:27 localhost.
datetime.
aldomain@
Sep 13 10:28:27 localhost.
9-09-13 00:33:12+00:00, requested image updated_at = 2019-09-13 00:33:12+00:00. {{(pid=120585) _should_
Sep 13 10:28:27 localhost.
mage = 270c0ea5-
volume.py:647}}
Sep 13 10:28:27 localhost.
85b5" released by "_prepare_
Sep 13 10:28:27 localhost.
cache entry for image = 270c0ea5-
manager/
Sep 13 10:28:27 localhost.
datetime.
aldomain@
Sep 13 10:28:27 localhost.
9-09-13 00:33:12+00:00, requested image updated_at = 2019-09-13 00:33:12+00:00. {{(pid=120585) _should_
Sep 13 10:28:27 localhost.
age-volume ea5d357c-
Sep 13 10:28:27 localhost.
er-rootwrap /etc/cinder/
lib/python2.
Sep 13 10:28:27 localhost.
it=g -o vg_name,name,size --nosuffix yenai_vg/
Sep 13 10:28:28 localhost.
er/rootwrap.conf env LC_ALL=C lvs --noheadings --unit=g -o vg_name,name,size --nosuffix yenai_vg/
r/lib/python2.
Sep 13 10:28:28 localhost.
er-rootwrap /etc/cinder/
execute /usr/lib/
Sep 13 10:28:28 localhost.
e-48ad9897-
Sep 13 10:28:28 localhost.
er/rootwrap.conf env LC_ALL=C lvcreate --name volume-
The size is wrong in cinder DB, actually we must not allow to create a volume smaller then 8GB.
In my ceph env, it will do extend(reduce the size) which causing creating a smaller and unusable boot volume.
It's terrible!!!
Changed in cinder: | |
assignee: | nobody → yenai (yenai2008) |
Fix proposed to branch: master /review. opendev. org/715358
Review: https:/