| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2023-06-28 | |||
| 09:22:44 | plibeau1 | sean-k-mooney: hello thx for your help on https://review.opendev.org/c/openstack/nova/+/861172 I have follow your recommendation if you have time to give me your feedback | |
| 09:38:09 | sean-k-mooney | ack i just skimmed it and it looks ok but ill try and find time to review it again later today | |
| 09:38:52 | sean-k-mooney | looks like it passed zuul so this is not breaking anything so thats good | |
| 09:51:47 | opendevreview | John Garbutt proposed openstack/nova master: WIP: Make compute node rebalance safter https://review.opendev.org/c/openstack/nova/+/887151 | |
| 11:20:27 | opendevreview | John Garbutt proposed openstack/nova master: Limit nodes by ironic shard key https://review.opendev.org/c/openstack/nova/+/886980 | |
| 11:24:19 | opendevreview | John Garbutt proposed openstack/nova master: Limit nodes by ironic shard key https://review.opendev.org/c/openstack/nova/+/886980 | |
| 11:26:14 | opendevreview | John Garbutt proposed openstack/nova master: Add nova-manage ironic-compute-node-move https://review.opendev.org/c/openstack/nova/+/886989 | |
| 11:26:14 | opendevreview | John Garbutt proposed openstack/nova master: WIP: Make compute node rebalance safter https://review.opendev.org/c/openstack/nova/+/887151 | |
| 13:14:44 | ykarel | sean-k-mooney, hi can you please revisit https://review.opendev.org/c/openstack/nova/+/868419 | |
| 13:34:02 | sean-k-mooney | oh yes i touhgt we had merged that already | |
| 14:00:12 | opendevreview | John Garbutt proposed openstack/nova master: Make compute node rebalance safter https://review.opendev.org/c/openstack/nova/+/887151 | |
| 21:14:00 | opendevreview | Dan Smith proposed openstack/nova master: DNM: Test reimage-timeout change https://review.opendev.org/c/openstack/nova/+/887112 | |
| 21:14:23 | dansmith | ugh, looks like we meant to register the reimage timeout in the compute group but ended up with it in DEFAULT | |
| #openstack-nova - 2023-06-29 | |||
| 07:12:11 | opendevreview | Amit Uniyal proposed openstack/os-vif stable/yoga: set default qos policy https://review.opendev.org/c/openstack/os-vif/+/886710 | |
| 07:26:19 | Uggla_ | bauzas, did you had a chance to look at my serie again ? | |
| 07:57:35 | opendevreview | Amit Uniyal proposed openstack/os-vif stable/yoga: set default qos policy https://review.opendev.org/c/openstack/os-vif/+/886710 | |
| 08:22:31 | opendevreview | Kashyap Chamarthy proposed openstack/nova master: Bump MIN_{LIBVIRT,QEMU} for "Bobcat" https://review.opendev.org/c/openstack/nova/+/887255 | |
| 08:23:57 | kashyap | Cc: sean-k-mooney --^ (No rush :)) | |
| 08:27:19 | kashyap | (Maybe I can remove still one more constant. Me looks) | |
| 09:43:59 | opendevreview | Amit Uniyal proposed openstack/os-vif stable/xena: set default qos policy https://review.opendev.org/c/openstack/os-vif/+/886716 | |
| 11:50:04 | opendevreview | Yamato Tanaka proposed openstack/python-novaclient master: Do exact-matching when finding one instance by name https://review.opendev.org/c/openstack/python-novaclient/+/887268 | |
| 13:49:23 | dvo-plv | Hello, All. I'm currently writing functional test, my result should be expected fail. How should I handle this properly? | |
| 13:56:48 | dvo-plv | Should I set just @unittest.expectedFailure, or I need to create some additional note? | |
| 15:32:04 | melwitt | dvo-plv: are you doing the func test as part of a bug fix? if so what we usually do is put the func test first and assert the wrong behavior with a code comment explaining what bug it's about, then stack the fix patch on top and as part of it change the assert in the func test to assert the correct behavior and remove the code comment about the buggy behavior. and if the func test is for a regression, it should go under | |
| 15:32:04 | melwitt | nova/tests/functional/regressions/ | |
| 15:34:02 | dvo-plv | No, this is not a bug. This is a test for new feature | |
| 15:34:14 | dvo-plv | test is based on this Sean's comment https://review.opendev.org/c/openstack/nova/+/876075/14/nova/scheduler/request_filter.py#285 | |
| 15:34:45 | dvo-plv | I need to catch configuration conflict between image and flavor, during the resize and rebuils | |
| 15:36:16 | melwitt | dvo-plv: ok I see. for that you can do like self.assertRaises(exception, func, arg, arg, arg, ...) if you want to assert that the proper exception is raised in a particular situation | |
| 15:38:17 | melwitt | in the test. expectedFailure is more for a test that we have to disable because something is wrong and remove the decorator whenever the problem is fixed. there's only a couple of examples in the code like https://github.com/openstack/nova/blob/d56d1a828df512136645aa257082bc929a4e353d/nova/tests/functional/libvirt/test_shared_resource_provider.py#L36 | |
| 16:42:51 | dvo-plv | okay, i see thank you | |
| 16:46:08 | opendevreview | Alexey Stupnikov proposed openstack/nova master: Add functional tests to reproduce bug #1994983 https://review.opendev.org/c/openstack/nova/+/863416 | |
| 17:54:19 | dvo-plv | melwitt, Maybe you can ghelp me how to handle this output | |
| 17:54:23 | dvo-plv | (Pdb) n | |
| 17:54:23 | dvo-plv | AssertionError: Notification instance.resize.end hasn't been received. Received: | |
| 17:54:23 | dvo-plv | [] | |
| 17:54:53 | dvo-plv | It does not catch with asserraises | |
| 17:54:54 | dvo-plv | (Pdb) x = self.assertRaises(exception.FlavorImageConflict,self._resize_server(server, new_flavor_id)) | |
| 17:54:54 | dvo-plv | *** AssertionError: Notification instance.resize.end hasn't been received. Received: | |
| 17:54:54 | dvo-plv | [] | |
| 17:57:15 | melwitt | dvo-plv: it should be self.assertRaises(exception.FlavorImageConflict, self._resize_server, server, new_flavor_id) https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRaises in case you're curious | |
| 18:00:01 | dvo-plv | I alredy tried this way | |
| 18:00:03 | dvo-plv | (Pdb) ex = self.assertRaises(exception.FlavorImageConflict,self._resize_server,server,new_flavor_id) | |
| 18:00:03 | dvo-plv | *** AssertionError: Notification instance.resize.end hasn't been received. Received: | |
| 18:00:03 | dvo-plv | [] | |
| 18:00:03 | dvo-plv | (Pdb) ex | |
| 18:00:03 | dvo-plv | *** NameError: name 'ex' is not defined | |
| 18:00:14 | dvo-plv | it does not generate output for handing | |
| 18:01:44 | dvo-plv | I expected this output | |
| 18:01:45 | dvo-plv | File "/opt/stack/nova/nova/virt/hardware.py", line 1971, in get_packed_virtqueue_constraint | |
| 18:01:45 | dvo-plv | raise exception.FlavorImageConflict( | |
| 18:01:45 | dvo-plv | nova.exception.FlavorImageConflict: Flavor vhrvsprsjopvuncogcmp has hw:virtio_packed_ring extra spec explicitly set to False, conflicting with image fake-image-custom-property which has hw_virtio_packed_ring explicitly set to True. | |
| 18:03:07 | melwitt | can you link your code or pastebin it? it sounds like you might be missing a notifications fixture/mock | |
| 18:04:48 | dvo-plv | it calls this method https://review.opendev.org/c/openstack/nova/+/876075/14/nova/virt/hardware.py | |
| 18:04:58 | dvo-plv | via this https://review.opendev.org/c/openstack/nova/+/876075/14/nova/scheduler/request_filter.py | |
| 18:06:03 | melwitt | I mean the code of your func test. it's hard to tell what's wrong without seeing it | |
| 18:06:50 | dvo-plv | def test_resize_virtio_packed_ring_image_flavor_conflict(self): | |
| 18:06:50 | dvo-plv | """Ensure that packed_virtqueue_filter filter will reject resize | |
| 18:06:50 | dvo-plv | due to image property and flavor extra spec conflict | |
| 18:06:50 | dvo-plv | """ | |
| 18:06:50 | dvo-plv | # Decorate compute 1 and compute2 resource provider with trait. | |
| 18:06:52 | dvo-plv | rp_uuid1 = self._get_provider_uuid_by_host(self.compute1.host) | |
| 18:06:53 | dvo-plv | rp_uuid2 = self._get_provider_uuid_by_host(self.compute2.host) | |
| 18:06:55 | dvo-plv | self._set_provider_traits(rp_uuid1, ['COMPUTE_NET_VIRTIO_PACKED']) | |
| 18:06:57 | dvo-plv | self._set_provider_traits(rp_uuid2, ['COMPUTE_NET_VIRTIO_PACKED']) | |
| 18:06:59 | dvo-plv | # Create image with enabled Virtio Packed Ring property | |
| 18:07:01 | dvo-plv | image = self._create_image(metadata={'hw_virtio_packed_ring': 'true'}) | |
| 18:07:03 | dvo-plv | flavor_id = self._create_flavor(extra_spec={}) | |
| 18:07:05 | dvo-plv | # Create server using only image with property | |
| 18:07:07 | dvo-plv | server = self._create_server(flavor_id=flavor_id, | |
| 18:07:09 | dvo-plv | image_uuid=image['id'], | |
| 18:07:11 | dvo-plv | expected_state='ACTIVE', | |
| 18:07:13 | dvo-plv | networks='none') | |
| 18:07:16 | melwitt | please use pastebin for pastes 😆 | |
| 18:07:16 | melwitt | please use pastebin for pastes 😆 | |
| 18:07:17 | dvo-plv | server = self._wait_for_state_change(server, 'ACTIVE') | |
| 18:07:19 | dvo-plv | # Create flavor with disabled Virtio Packed Ring in the extra spec | |
| 18:07:21 | dvo-plv | new_flavor_id = self._create_flavor(extra_spec={'hw:virtio_packed_ring': 'false'}) | |
| 18:07:23 | dvo-plv | import rpdb | |
| 18:07:25 | dvo-plv | debugger = rpdb.Rpdb(port=12345) | |
| 18:07:27 | dvo-plv | debugger.set_trace() | |
| 18:07:29 | dvo-plv | ex = self.assertRaises(exception.FlavorImageConflict, self._resize_server, server, new_flavor_id) | |
| 18:09:09 | dvo-plv | https://paste.opendev.org/show/bD8BWCnpsUY8Rr7c6Hc7/ | |
| 18:10:01 | dvo-plv | I implemented this test here | |
| 18:10:05 | dvo-plv | (functional) stack@server72:/opt/stack/nova$ tox -e functional -- nova.tests.functional.test_servers.TraitsBasedSchedulingTest.test_resize_virtio_packed_ring_image_flavor_conflict | |
| 18:13:32 | melwitt | oh, right sorry 😣 bc this is a func test you will rather have to look at the returned http status code and message. sec | |
| 18:13:32 | melwitt | oh, right sorry 😣 bc this is a func test you will rather have to look at the returned http status code and message. sec | |
| 18:14:38 | dvo-plv | I saw this option in the other examples | |
| 18:14:39 | dvo-plv | self.assertEqual(403, ex.response.status_code) | |
| 18:14:50 | dvo-plv | but i can not get status code | |
| 18:17:27 | dvo-plv | https://paste.opendev.org/show/bOdkEFYHa3h24nBD5Ws1/ | |
| 18:17:30 | dvo-plv | this is test output | |
| 18:17:33 | melwitt | yeah, I think you can't use the _resize_server helper function in this case bc it will only return you the server object and bc it will wait for expected notifications https://github.com/openstack/nova/blob/master/nova/tests/functional/integrated_helpers.py#L530 which are not all going to happen in your case | |
| 18:17:54 | melwitt | since you're testing for an error condition | |
| 18:19:12 | melwitt | so you'll want to unwrap that i.e. call self.api.post_server_action directly, like this https://github.com/openstack/nova/blob/master/nova/tests/functional/test_servers.py#L347 | |
| 18:19:22 | dvo-plv | I see, I will try to figure out without this wrapper, thank you | |
| 18:22:27 | melwitt | in the func tests the error exception will always be client.OpenStackApiException with the details encapsulated inside of it as it's imitating a rest API caller who will receive only an error from the client, not the internal exception that nova raised | |
| 18:25:19 | dvo-plv | okay, I believe it will help me, thank you | |
| 18:54:23 | dvo-plv | maybe I need something else for my case ? | |
| 18:54:59 | dvo-plv | I updated my test in this way | |