[nova] local LVM volume on compute hosts

Paul Harrison paul.harrison at manchester.ac.uk
Fri Jun 10 14:38:15 UTC 2022



> On 2022-06 -10, at 14:13, Paul Harrison <paul.harrison at manchester.ac.uk> wrote:
> 
> 
> 
>> On 2022-06 -08, at 08:26, Paul Harrison <paul.harrison at manchester.ac.uk <mailto:paul.harrison at manchester.ac.uk>> wrote:
>> 
>> 
>> 
>>> On 2022-06 -07, at 13:25, Sean Mooney <smooney at redhat.com <mailto:smooney at redhat.com>> wrote:
>>> 
>>> no there is noting else you need to configure but this option is not what you think it is.
>>> the images_type option contols what storage will be used for all non cinder storage.
>>> i.e. vms that are booted with out usign a boot volume.
>>> 
>>> 
> 
>>> 
>>> so your current config will make any non boot from volume nova instance use lvm storage to provision the vm root/swap/epmeral disks
>>> but will not prevent end users requesting cinder data voluems or boot volumes via the cli/api. if the opt in to cinder stoage that
>>> is what they will recive but if they use teh default storage provided by the flaovr then it will be local.
>> 
>> thanks for the explanation - it is a shame that there is not a more direct way in config to force local storage - looks like https://blueprints.launchpad.net/nova/+spec/use-libvirt-storage-pools <https://blueprints.launchpad.net/nova/+spec/use-libvirt-storage-pools> has never got enough votes for implementation.
>> 
>> 
> 
> I have discovered the reason why my original setup was not working (it would fail if I tried to force in the GUI, by specifying “no” to "create new volume”) - I think it was failing here
> 
> https://opendev.org/openstack/nova/src/commit/d86916360858daa06164ebc0d012b78d19ae6497/nova/virt/libvirt/imagebackend.py#L722 <https://opendev.org/openstack/nova/src/commit/d86916360858daa06164ebc0d012b78d19ae6497/nova/virt/libvirt/imagebackend.py#L722>
> 
> as the volume group device does not appear when there are no logical volumes in the group (in Centos 8 stream at least). So I forced the creation of that device by adding a dummy logical volume.
> 
> Anyway, the situation is now that I can create instances that will use compute node local LVM storage, if I start them from the GUI, but not from the command line.
> 
> I had a look at what the GUI sends to the /api/nova/servers/ endpoint
> 
> {"availability_zone":"nova","config_drive":false,"user_data":"","disk_config":"AUTO","instance_count":1,"name":"fromgui","scheduler_hints":{},"security_groups":["48648c10-ce91-4916-9347-d88fbdba9ce6"],"create_volume_default":true,"hide_create_volume":false,"source_id":"b2a3ca46-8b0b-4748-863f-6f3e11301872","flavor_id":"da28d141-3d05-4f0f-a188-229352ccf0a3","nics":[{"net-id":"5e7a171a-ceda-4051-abe6-0496e2e8e154","v4-fixed-ip":""}],"key_name":"cloud”}
> 
> However, I have not been able to find the set of command line switches for "openstack server create" that achieve the same effect - if someone knows, I would be grateful.
> 
> Thanks,
> 	Paul.
> 
> p.s. I was not really able to match up what the GUI sends with the API spec either. https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail#create-server <https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail#create-server>
> 
> 

Have just realised, taking the hint from the GUI - if I do not try to force anything disk/volume related on the CLI, it does what I want!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220610/04d88ac1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2893 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220610/04d88ac1/attachment.bin>


More information about the openstack-discuss mailing list