Tuesday, 2022-06-21

opendevreviewRafael Castillo proposed openstack/ansible-collections-openstack master: Updates security group rule for latest sdk  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84683000:09
gtemaslaweq, amotoki: https://review.opendev.org/c/openstack/openstacksdk/+/846618 is an attempt to enable vpnaas in devstack job to test SDK, but something is still missing. Can you pls have a look once you have time? 07:42
slaweqgtema: hi, I'm not at work today but I can take a look at it tomorrow morning 07:52
gtemathks a lot07:52
seongsoochoHi, After the review merged, the release note's test case failed.  I checked the output of ZuuL, but can't find the reason of failure. What do I do ? https://review.opendev.org/c/openstack/python-openstackclient/+/80742008:40
gtemahttps://c0050f3fce0b81a4166e-dcdb6cbb330bdac08ffee1284f86c919.ssl.cf5.rackcdn.com/807420/7/promote/promote-openstack-releasenotes/f60515b/job-output.txt08:41
gtemathis is the log. You can literally do nothing and we simply wait for next change to land and it will publish latest release notes08:42
fricklerftr this can happen when two promote jobs run in parallel, like seems to have been the case here https://zuul.opendev.org/t/openstack/builds?job_name=promote-openstack-releasenotes&project=openstack/python-openstackclient08:49
fricklerthe solution to wait for the next run to happen is the only one we have in place so far08:50
amotokigmann: thanks. I will look into it today.08:55
amotokigmann: sorry08:59
amotokigtema: thanks. I will look into your vpnaas zuul config today09:00
gtema:)09:00
gtemathanks09:00
opendevreviewStephen Finucane proposed openstack/python-openstackclient master: image: Simplify list image parser  https://review.opendev.org/c/openstack/python-openstackclient/+/84699410:26
*** ralonsoh_ is now known as ralonsoh13:00
noonedeadpunkhello there! I need some help with nasty thing I found. It happens in different services, like heat, and ofc reproducible with openstackclient. I bleieve it's because same approach is used in clients. So the issue is when having more then 1000 flavors, you can't create server with some of them when providing flavor name (not uuid).13:31
noonedeadpunkBasically it goes to absent support for pagination here https://opendev.org/openstack/osc-lib/src/branch/master/osc_lib/utils/__init__.py#L26913:31
gtemathat is the reason I am trying to switch all of those to SDK where things like that are handled generally13:32
noonedeadpunkBut what confuses me is going this path at the first place. I believe it's because usage of novaclient here https://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/compute/v2/server.py#L1336-L133713:32
noonedeadpunkand novaclient does not have find_flavor method. While openstacksdk does.13:33
gtemaagree, is messy currently13:34
gtemafeels like I need to restart work on switching OSC to use SDK13:34
noonedeadpunkSo basically I kind of lost what/where is better place to fix. As now ppl using heat just randomly fail based if flavor is in first 1000 ones or not...13:35
gtemawith heat it is going to be bit more problematic - it is an OSC plugin outside of the tree13:36
noonedeadpunkI guess it goes all to novaclient.... need to check though...13:36
gtemaand I do not even know why it would be relevant for heat13:37
gtemaif you mean heat in the backend - yes, it is deep in core of heat itself which lib it uses13:37
noonedeadpunkSo resource creation fails with smth like  `Error validating value '2C-4GB-50GB': No Flavor matching {'name': '2C-4GB-50GB'}. (HTTP 404)`13:38
noonedeadpunkAnd I could reproduce that with client...13:38
noonedeadpunkBut heat is another beast to fight here 13:39
gtemayes, then this is not what we can solve ourselves. It requires fix in novaclient13:39
noonedeadpunkbasically implementing flavors find there13:39
gtemaI would say it is "conincedence" that you can reproduce it in OSC 13:39
noonedeadpunkthen hopefully osc can pick that up and use...13:39
gtemacoincidence 13:39
gtemafrom osc pov we can fix that by switching to sdk. But in any way that problem would require novaclient fix13:40
gtemaor heat switching to SDK as well13:40
noonedeadpunkI was thinking about heat switching to sdk tbh :D13:40
noonedeadpunkBut I assume it's not easy thing to do.13:41
gtemayeah, all question of effort and available resources13:41
gtemawell, it is relatively easy, just lot work13:41
gtemait even already uses SDK inside: https://opendev.org/openstack/heat/src/branch/master/heat/engine/clients/os/openstacksdk.py13:42
gtemahttps://opendev.org/openstack/heat/src/branch/master/heat/engine/clients/os/nova.py - here you have novaclient usage13:42
gtemaso technically it is not that complex to exchange one client with another13:43
noonedeadpunkhm, from what I can see mine usecase looks not that bad https://opendev.org/openstack/heat/src/branch/master/heat/engine/clients/os/nova.py#L271-L28113:45
noonedeadpunkinteresting13:45
gtemayes, should be13:46
noonedeadpunkbut likely pagination just not present inside novaclient at all13:46
noonedeadpunklikely it's easiest thing to fix then13:46
noonedeadpunkthanks for your time gtema!13:47
gtemawelcome13:47
gtemaif I read code properly: https://opendev.org/openstack/python-novaclient/src/branch/master/novaclient/base.py#L41113:47
gtemaand that ends in https://opendev.org/openstack/python-novaclient/src/branch/master/novaclient/v2/flavors.py#L14813:48
gtemaand there is no word of pagination13:48
noonedeadpunkI should rather check how it's done in sdk :)13:49
gtemahttps://opendev.org/openstack/openstacksdk/src/branch/master/openstack/resource.py#L206813:50
gtemathis is basic find: it tries to use name as filter and otherwise fall back to listing all and grepping through, but list by default fetches all pages13:51
noonedeadpunkyeah, so it goes to implementing pagination in novaclient... ugh... what a disgusting thing to do13:54
noonedeadpunkor switch heat to sdk13:54
gtemaas was discussed multiple summits and endless chats - ideally we have single API client tool that handles things just properly13:55
gtemawe all would have less mess to take care of13:55
noonedeadpunkYeah, so switching heat sounds like more proper solution I can be occupied with for next several days for sure.13:56
gtemaI would rather say - weeks13:57
noonedeadpunkyeah...13:58
noonedeadpunkAnd I can't even return back to finishing https://review.opendev.org/c/openstack/python-openstackclient/+/828708 :(13:59
gtemaLOL, it is as usual13:59
noonedeadpunkok. at least now I see several ways of going forward. All of them needs time14:00
gtema:)14:00
gtemagenerally you should not have so many flavors ;-)14:00
noonedeadpunkand time to land as that's smth that won't be backported14:00
noonedeadpunk1715 to be percise. Now I'm thinking that I indeed can write super simple thing to clean out unused ones....14:01
gtemaglad I gave you another idea. You can also increase nova pagination limit14:02
noonedeadpunkI'm not sure where is that. I belive it should be in api-paste.ini?14:04
noonedeadpunkand tbh 1000 is fair amount...14:04
gtemasure, but still it is an option14:05
noonedeadpunkyup, thanks again !14:05
gtemawlcm14:05
opendevreviewArtem Goncharov proposed openstack/ansible-collections-openstack master: Switch project_info to new SDK  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84578214:14
opendevreviewArtem Goncharov proposed openstack/openstacksdk master: Implement supplementary list filtering  https://review.opendev.org/c/openstack/openstacksdk/+/84572614:27
opendevreviewArtem Goncharov proposed openstack/openstacksdk master: Respect filters in list_projects  https://review.opendev.org/c/openstack/openstacksdk/+/84577614:28
noonedeadpunksorry, another thing.... Shouldn't list(conn.compute.servers(details=True))[0].flavor be an object rather then a simple dict?14:55
noonedeadpunkI bet I asked that though several years ago....14:56
noonedeadpunklikely has smth to do with api version...14:56
gtemaan object in SDK implements dict interface14:57
noonedeadpunkas that is empty https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/compute/v2/server.py#L11114:57
noonedeadpunkso basically there's no way to get flavor id or flavor name out of server?14:58
gtemaand here we may land in the microversions mess. Normally it is filled, but depending on the supported microversion you have one thing or another14:58
gtemahttps://docs.openstack.org/api-ref/compute/?expanded=show-server-details-detail#show-server-details14:58
noonedeadpunkI guess I need to set higher microversion explicitly....14:58
gtemawith SDK you do not do this at all, SDK negotiates max supported MV by both sides14:59
gtemabut if server is old - it will not help14:59
gtemaflavor should be filled, and was filled once I looked at it last time14:59
noonedeadpunkok, yes, now I recall that15:00
gtemamaybe you look whether server returns this (you can do "openstack.enable_logging(debug=True)" to see requests15:00
noonedeadpunkah, it was likely openstackclient that always use min version15:00
gtemaright15:00
gtemaand once "server show" is switched to use SDK it will use latest MV by default15:01
noonedeadpunkSo yes, as of 2.47 there's no way to get flavor uuid15:01
noonedeadpunknot sdk/client problem, which is good15:03
gtemaLOL15:03
noonedeadpunkfwiw, in use there's only 237 flavors out of 1700 :D16:01
*** diablo_rojo is now known as Guest280123:03

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