Earlier  
Posted Nick Remark
#openstack-nova - 2025-03-24
15:45:01 sean-k-mooney basiclly emulate the OTU flow
15:45:32 sean-k-mooney i know you know that by the way im just trying to state the repoducer clearly
15:46:44 sean-k-mooney gabit is expressive enough to encode that but its not very deep coverage hench why you probly will want to try using the placement fixutre and writign a new functional test
15:46:59 dansmith yeah I'm very aware of what I need to do, I'm just surprised that there is so little coverage of this _area_ in placement
15:47:33 sean-k-mooney ill fully adming i have never been that deep on the implemation side of placement
15:47:39 sean-k-mooney only the usage of it
15:47:48 sean-k-mooney so i havent really looked tat the testing in any detail
15:47:52 dansmith okay I figured you and gibi are the most familiar, but maybe not
15:47:55 dansmith ack
15:48:25 sean-k-mooney gibi and melwitt i think. api wise yes but ptyhon wise less so on my part
15:48:50 sean-k-mooney im willing to review placement code but i generally need to learn the context every time i do
15:49:28 gibi dansmith: I would expect more than one over capacity test case. let me take a look
15:49:56 sean-k-mooney i think tis is the only functional testing of allctions https://github.com/openstack/placement/blob/master/placement/tests/functional/test_allocation.py
15:50:02 sean-k-mooney i.e. in python
15:50:10 dansmith I definitely want to do this in python functional tests and not gabbits, FWIW
15:51:20 sean-k-mooney dansmith: this is the one you wer referint too for the db level right https://github.com/openstack/placement/blob/master/placement/tests/functional/db/test_allocation.py#L519
15:51:51 sean-k-mooney a number of those functional tests are really like 5 tests in one
15:52:00 dansmith yup
15:52:24 dansmith yup, referring, but not sure yup in terms of coverage
15:52:30 dansmith the capacity check is very complex :)
15:53:20 sean-k-mooney https://github.com/search?q=repo%3Aopenstack/placement%20InvalidAllocationCapacityExceeded&type=code not that i realy turst github search but only 3 hits total
15:53:49 sean-k-mooney codesearch agrees
15:54:18 sean-k-mooney that excetion is not used elsewhere in the codebase
15:55:54 sean-k-mooney i guess there is also InvalidInventoryCapacity
15:56:18 sean-k-mooney but i think thats raised when you modify the inventory
15:56:38 dansmith right
15:56:52 gibi this file has some POST allocation tests https://github.com/openstack/placement/blob/master/placement/tests/functional/gabbits/allocations-post.yaml
15:57:19 gibi but I understand you want moe
15:57:20 gibi more
15:57:43 sean-k-mooney right and that does https://github.com/openstack/placement/blob/master/placement/tests/functional/gabbits/allocations-post.yaml#L212-L236
15:58:27 dansmith gibi: yeah it's not just allocation, it's allocation with the capacity check
15:58:35 dansmith *failing
15:59:16 gibi this also has some coverage https://github.com/openstack/placement/blob/master/placement/tests/functional/db/test_allocation.py but I'm not against adding more :)
16:04:17 dansmith that's really the only place in python, but yeah
16:07:05 gibi in cases when I'm not sure what is covered and not covered I tend to go in and break the code in certain cases to see if it caught be tests. Maybe there are test cases in wrongly named test files hiding
16:27:03 sean-k-mooney gibi: i dont think placement has the saem level fo in depth testing that nova has in genral. gabit is greate but often it was used instead of unit and functional testin instead of in addtion to them
16:27:57 sean-k-mooney one of the test case that i looked at was teh sole testing in the commit that added a new microverions
16:28:11 sean-k-mooney there may have been other changes in teh serise
16:28:39 sean-k-mooney but if that really was the only commit to implemnt the microversion it shows that gabbit testing was considered enough coverage for an api change
16:37:35 dansmith gibi: yeah I was going to create a reproducer for the issue and then break it to make sure it starts working.. so I guess we'll see if something stops when I do :)
16:44:27 simondodsley hi - i'm looking for advice on how to disable `discard` on a single cinder volume that is coming from a cinder driver where `discard` is hardcoded to be `True`. A customer is having issues with multiattach volumes that they want to use for Windows clustering, in that the SCSI page 83h doesn't appear to be passing through the SCSI reservation settings.
16:45:29 simondodsley I read that `nodiscard` may resolve this, but can't work out how to do the override. Overriding the whole backend for a test would be an option, but as I say the cinder driver has `disacrd` hardcoded. Is there somethin in nova that can help?
16:46:40 sean-k-mooney simondodsley: so windwos clustering required the vm to be create with a volume configured to use type=lun which cant be set durign attach only vm creation
16:46:47 dansmith yep, was just going to say ^
16:47:01 sean-k-mooney we shoudl probaly fix that at some point
16:47:13 sean-k-mooney but anyway i am not sure if you can overried that with our libvirt section
16:47:17 dansmith is that enough to enable it? I thought not
16:47:25 sean-k-mooney we have a cofnig option for discard but i tought it was for nova provisioend storage
16:47:27 dansmith I thought lun was the only way
16:47:43 sean-k-mooney no i think you need lun for scsi v3
16:47:49 simondodsley so how do we set the type=lun at vm creation?
16:47:57 sean-k-mooney i just ment that even behond that im not sure if you can overried discard form nova
16:49:03 sean-k-mooney simondodsley: so the only discard cofnig im awre of in nova is https://docs.openstack.org/nova/latest/configuration/config.html#libvirt.hw_disk_discard which woudl turn it off for the host but that says "nova managed disks"
16:49:18 dansmith sean-k-mooney: I think if they want the guest to use discard and have that make it all the way to the actual physical device they need to use lun, no?
16:49:47 sean-k-mooney dansmith: well that what will happen if discard is enabeld on the cinder volume in the connection info
16:49:54 dansmith I thought libvirt discard would only hit the qemu storage driver, like ceph or qcow2
16:50:19 sean-k-mooney dansmith: i guess there are two diffent things happenign here
16:50:51 sean-k-mooney simondodsley made the assertion that truning of discard migh help with the scsi command making it to the backend. i think we both agree it not related to that
16:51:05 dansmith tight
16:51:11 dansmith *right :)
16:51:25 sean-k-mooney simondodsley: so if you look at the server create api https://docs.openstack.org/api-ref/compute/#create-server
16:52:10 sean-k-mooney there is an option device_type filed in the request
16:52:17 sean-k-mooney in the block device mappings
16:52:50 sean-k-mooney sorry that might not be the correct filed
16:53:03 sean-k-mooney i think you want block_device_mapping_v2.disk_bus i will neeed to check the other doc
16:53:25 sean-k-mooney https://docs.openstack.org/nova/latest/user/block-device-mapping.html
16:53:40 sean-k-mooney ok no so you want disk_bus=scsi and deivce_type=lun
16:54:02 sean-k-mooney """disk_bus and device_type - low level details that some hypervisors (currently only libvirt) may support. Some example disk_bus values can be: ide, usb, virtio, scsi, while device_type may be disk, cdrom, floppy, lun. This is not an exhaustive list as it depends on the virtualization driver, and may change as more support is added. Leaving these empty is the most common
16:54:04 sean-k-mooney thing to do."""
16:54:48 simondodsley ok - so how would that be forced from the comand line, or the gui?
16:55:01 sean-k-mooney you cant do it form horizon
16:55:12 sean-k-mooney from the cli you an do it when creating the block device mapppings
16:55:32 sean-k-mooney https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/server.html#server-create
16:55:54 sean-k-mooney you have to use teh --block-device parmater instead of --volume
16:55:59 simondodsley awesome - i see - thank you. We will give that a try
16:55:59 sean-k-mooney https://docs.openstack.org/python-openstackclient/latest/cli/command-objects/server.html#cmdoption-openstack-server-create-block-device
16:57:46 sean-k-mooney simondodsley: when dan fixed this he added some tempest test that validate this is functional with lvm and multi attache. although obviosly not with a windows workload
16:58:02 sean-k-mooney simondodsley: but we do have coverage of creating a vme with a mutiatch volume in lun mode
16:58:42 sean-k-mooney https://github.com/openstack/tempest/blob/f4a8698b97a5433b8e64df408aace2fb14c2cb22/tempest/api/compute/volumes/test_attach_volume.py#L469
16:58:45 simondodsley and this will ensure that SCSI page 83 will be passed through correctly?
16:59:21 sean-k-mooney do you ahve a refence to that defintiion. it will ensure that scsiv3 command are aviable to the guest
16:59:29 sean-k-mooney without that you onlyhave access to v2 commands
17:02:37 sean-k-mooney simondodsley: by the way we only fixed this fucntionaly in recent version of nova
17:02:47 sean-k-mooney i think form dalmation on
17:03:02 simondodsley oh - so it won't work on caracal
17:03:34 simondodsley how did anyone every use windows clustering before this fix then?
17:03:37 sean-k-mooney i can check when we fixed it but no livbirt changed it api because qemu stop supproting the serial atibute with type lun a few years ago
17:03:58 sean-k-mooney windows supprot clustierning with other ways of doing synconisation
17:04:12 sean-k-mooney i.e. not file system absed it has 3-4 modes
17:04:27 sean-k-mooney so either they used one of the other mode or they didnt do it with libvirt
17:04:51 sean-k-mooney i.e. they were usihg hyperv or vmware or ironic
17:04:52 simondodsley this is the error from windows - `Physical disk {} does not have the inquiry data (SCSI page 83h VPD descriptor) that is required by failover clustering. Status: The request is not supported`
17:05:09 sean-k-mooney yep
17:05:18 dansmith that's what lun should fix
17:05:32 simondodsley but it only from dalmation...
17:05:47 sean-k-mooney or really old libvirt
17:05:52 dansmith simondodsley: also, clustered windows is not cloudy and openstack really focuses on cloudy workloads :)
17:06:08 simondodsley i know that, but tell customers :D
17:06:08 dansmith so that's why it's recent
17:06:12 dansmith just saying.

Earlier   Later