Create VM from volume having no "volume_image_metadata" should not be allowed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Description
===========
VM creation from a volume with no image data should not be allowed.
Right now, we can create a bootable volume with no image, and then we can create a VM from the volume. The VM will get created, but it won't boot as there is no image to boot from.
Nova should verify this request and send an error message with the appropriate message.
Steps to reproduce
==================
$ openstack volume create --bootable --size 1 vol3
$ openstack server create --network public --flavor 1 vm_3 --volume vol3 --wait
$ openstack console log show vm_3 # it won't return any log
$ openstack console url show vm_3 # check via vnc
Expected result
===============
Nova should tell user, it's not correct.
Actual result
=============
VM gets created with without any issue, but user can't use it.
Volume with we can create VM:
$ openstack volume show vol4 -f json 9c56-40cb- aa80-e8083967dd fc", attachment_ id": "a7c68363- 3792-40a6- 95eb-9c6281a9d7 19", 9c56-40cb- aa80-e8083967dd fc", 721a-4abd- af47-6887704792 63", attached_ at": "2023-03- 06T11:38: 42.000000" _zone": "nova", roup_id" : null, 06T11:03: 00.000000" , 9c56-40cb- aa80-e8083967dd fc", status" : null, host-attr: host": "devstack- amit@lvmdriver- 1#lvmdriver- 1", mig-status- attr:migstat" : null, mig-status- attr:name_ id": null, tenant- attr:tenant_ id": "0bb9ac25449143 f495820368c9179 fd7", status" : null, 06T11:38: 42.000000" , ceaf58f3b87d0d5 a39", image_metadata" : { specified. openstack. md5": "", specified. openstack. object" : "images/ cirros- 0.5.2-x86_ 64-disk" , specified. openstack. sha256" : "", 0fa0-47ac- a9b4-03821ab383 c1", 0.5.2-x86_ 64-disk" , 7b8490f5f1e8976 1a4", format" : "bare",
{
"attachments": [
{
"id": "17f4e508-
"
"volume_id": "17f4e508-
"server_id": "47753229-
"host_name": "devstack-amit",
"device": "/dev/vda",
"
}
],
"availability
"bootable": "true",
"consistencyg
"created_at": "2023-03-
"description": null,
"encrypted": false,
"id": "17f4e508-
"migration_
"multiattach": false,
"name": "vol4",
"os-vol-
"os-vol-
"os-vol-
"os-vol-
"properties": {},
"replication_
"size": 1,
"snapshot_id": null,
"source_volid": null,
"status": "in-use",
"type": "lvmdriver-1",
"updated_at": "2023-03-
"user_id": "0bc639c5dcaf41
"volume_
"hw_rng_model": "virtio",
"owner_
"owner_
"owner_
"image_id": "b8b357e3-
"image_name": "cirros-
"checksum": "b874c39491a237
"container_
"disk_format": "qcow2",
"min_disk": "0",
"min_ram": "0",
"size": "16300544"
}
}