There is no disk.local for VMs having ephemeral in flavor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Rajesh Tailor |
Bug Description
Description
===========
This is not really a functionality issue because the VM did get created, the ephemeral disk is visible in the VM and there is a disk.eph0.
But there is a code in driver checking for disk.local if ephemeral disk is added for disk_mapping,
https:/
there is no local.disk in disk_mapping or real disk inside data/instances/
Reason:
build_and_
# block_device_
build an object having image, device/disk and network info called resources
with resources ASK driver to spawn VM
# resources = block_device_info: {disk, ephemeral, image }, network_info = {}
#https:/
# pass disk_maping to _create_image
# but its not present so disk.local hence did not get created in compute under compute node.
Steps to reproduce
==================
- openstack flavor create --ram 512 --disk 20 --ephemeral 15 --vcpus 1 102
- openstack server create --flavor 102 --network private --image cirros-
Expected result
===============
- there should be a disk.local in directory
data/
or during resize
Actual result
=============
- disk.local is NOT present in instance/
- disk.eph0 is present instance/
- there is a data file ephemeral_
Environment
===========
tested in branch master and stable/train
So basically for which scenarios disk.local should/will get created?
tags: | added: libvirt |
Changed in nova: | |
assignee: | nobody → Rajesh Tailor (ratailor) |
I went on an archeological dig and assuming I didn't miss something: the short answer is that disk.local is an old/original representation of an ephemeral disk defined in the flavor and is no longer used.
There are two ways to specify ephemeral disk: in the flavor or in the block device mapping(s) in the server create request. The disk.local was for the former, when ephemeral disk was specified in the flavor and not in block device mapping(s). And originally ephemeral and swap disks from the flavor did not have block device mappings created for them.
Then there was a change a long time ago:
https:/ /review. opendev. org/c/openstack /nova/+ /83516
which changed things to create block device mappings for ephemeral and swap disks specified in the flavor, probably to move toward treating all cases in a more consistent manner.
After this, AFAICT any specified ephemeral disk would end up being considered as specified from block device mappings, so the code to create disk.local isn't reached anymore. There are always BDMs for ephemeral and swap, whether they're in the flavor or not.
I think you are right that there isn't a functionality bug here. To me it seems at worst what we have is some unused code, which doesn't hurt anything aside from being tech debt. And removing the code will take some care to make sure nothing else gets broken in the process.
Based on this, I'm marking this as Confirmed with Low priority.