Tuesday, 2021-10-05

opendevreviewChristophe Useinovic proposed openstack/ceilometer master: Update compute.discovery to get nova domain meta  https://review.opendev.org/c/openstack/ceilometer/+/81250814:06
cuseinovicHi guys, First guerrit and patch. Can you tell me if it's good for you ? https://review.opendev.org/c/openstack/ceilometer/+/812508/14:21
cuseinovicplease :)14:21
mrungecuseinovic: thank you for the patch14:39
mrungecuseinovic: could you also please provide a test?14:39
cuseinovicZuul crash but i think I don't know if it's due to my fix https://zuul.opendev.org/t/openstack/build/096d40aa8d364ea588edd72a5acb0153/log/job-output.txt?severity=214:41
cuseinovichum with what kind of test ? with this ? https://docs.openstack.org/project-team-guide/project-setup/python.html#running-python-unit-tests14:42
mrungethe test is to make sure someone else would not break your change in a future change14:46
cuseinovicokey i will try to do that14:47
mrungeI wonder if it makes sense to make it configurable14:51
mrungethis seems to be dependent on libvirt versions14:54
cuseinovicyeah the patch it's for Wallby and next releases14:56
mrungefor example,. I have a newer version of libvirt on my train based deployment14:57
mrungeand also a newer version of qemu14:57
cuseinovicI though that libvirt version need to follow the nova version package like other packages of Openstack component15:00
cuseinovicBut this change affects code that should already be tested15:02
mrungeyou see it's not being tested, otherwise your patch would raise an issue15:04
mrungeokay, taking a step back, the namespace is defined here: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/config.py#L4015:08
cuseinovicokey, can you tell me how to test locally please ? :) 15:08
mrungeand the switch from version 1.0 to 1.1 was from victoria to wallaby15:09
mrungeuhm, for running tests: tox -l15:09
mrungetox -e (test_name)15:09
mrungeor just tox15:09
cuseinovicyeah exactly from V to W release15:11
cuseinovicok 15:11
mrungecuseinovic: thinking again about a potential test, it wouldn't make so much sense to hard-code a test to check for a hard-coded string, no?15:28
cuseinovicyes ofc15:29
mrungewith that, I'm good with the patch as is15:29
jpicto test such a function you have two solutions: either mock libvirt, ether spawn an actual libvirt process, both will be pretty heavy15:30
mrungethe string is hardcoded in nova15:30
mrungewith that, you15:30
mrunge'd have to spawn a vm with nova15:30
jpicor just mock libvirt and fake all that with unittest.mock15:32
jpicin both case you'll have to maintain the test ...15:33
opendevreviewChristophe Useinovic proposed openstack/ceilometer master: Update compute.discovery to get nova domain meta  https://review.opendev.org/c/openstack/ceilometer/+/81250815:36
jpiccuseinovic: what happened before you added this change exactly? did you get an Exception with a Traceback?15:37
cuseinovic@jpic it's was somehtink like this 15:40
cuseinovic2021-06-01 16:01:18.302 1835684 ERROR ceilometer.compute.discovery [-] Fail to get domain uuid aff042c9-c311-4944-bc42-09ccd5a90eb7 metadata, libvirtError: metadata not found: Requested metadata element is not present: libvirt.libvirtError: metadata not found: Requested metadata element is not present15:40
cuseinovici put the debug mode for ceilo 15:41
cuseinovici saw the problem when gnocchi didn't give me any informations, i check the container ceilometer-compute in debug mode and i see that15:42
cuseinovicI checked the libivrt file and the discovery.py and it's was not good15:43
cuseinovicmrunge: Thank for your review, do i need to do more step now ? 15:49
mrungecuseinovic: I am hoping the CI issue was just a fluke15:49
mrungeif that's the case, I'll +A the patch later today or tomorrow15:50
mrungein order to get it merged, we need to have CI passing. There may be a different patch required to get CI happy, and that has to merge before your patch15:51
cuseinovicok i see. Thanks for your reply and your answer 15:52
jpicok so maybe the patch should still try with 1.0 and expect libvirt.libvirtError of Requested metadata element is not present prior to trying with 1.116:20
jpicin which case a test is really going to be necessary, but I don't know if that's actually relevant, how long has 1.1 been deployed, what versions of nova is it compatible with, I don't know about these details16:21

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!