Earlier  
Posted Nick Remark
#openstack-nova - 2021-02-09
08:31:05 bauzas the docs says you have to segment
08:31:17 sean-k-mooney it would depend on if you had a mix of tenant networks and routed provider networks in teh same cloud
08:31:29 bauzas I need coffee
08:31:42 sean-k-mooney in any one netwok you have to either have all subnets connect to segments or none
08:31:43 bauzas because I think I'll suffer headache very soon
08:32:03 bauzas sean-k-mooney: back up a littler
08:32:13 bauzas sean-k-mooney: if you configure routed networks
08:32:13 sean-k-mooney if you have 2 networks 1 can be routed and the other not
08:32:17 bauzas right
08:32:36 bauzas technically, you can have net1 with segments and net2 with not
08:32:43 sean-k-mooney yep
08:32:52 bauzas hmmm
08:33:07 sean-k-mooney so i dont think we should be raising excpeiton if we dont find segments or networks
08:33:13 bauzas sean-k-mooney: indeed
08:33:19 sean-k-mooney unless you catch it
08:33:22 bauzas that's a good call
08:33:35 bauzas that said
08:33:51 bauzas we only call this method on the port or network that was provided by the user
08:34:11 bauzas but, as this is a user, they have no context whether the net is routed or not
08:34:25 sean-k-mooney mostly correct
08:34:30 sean-k-mooney they dont
08:34:38 sean-k-mooney but routed networks can only be created by admins
08:34:43 bauzas I know
08:34:49 sean-k-mooney so the end user just knows its a shared network
08:34:53 bauzas right
08:34:55 sean-k-mooney or one the admin made for them
08:35:15 bauzas so, you can end up with indeed asking for net2 which isn't configured
08:35:17 sean-k-mooney if they create there own networks in addtion to that they will not be routed
08:35:25 bauzas and in this case, we don't wanna fail
08:35:30 sean-k-mooney yep
08:35:44 bauzas we just won't require aggregates
08:35:48 sean-k-mooney we want to say oke we found no segments so this is not routed so all hosts are vlaid
08:35:59 sean-k-mooney so you could catch the exception at the top of the filter
08:36:10 sean-k-mooney and return true with no update to the placment query
08:36:18 bauzas yes and no, I have the choice
08:36:28 sean-k-mooney yes you do
08:36:51 bauzas either we consider this utils method should raise an exception as this is purely for routed networks
08:37:04 bauzas (and then, agreed, we have to catch the exception in the filter)
08:37:13 sean-k-mooney or it returns []/None
08:37:32 sean-k-mooney as if the extention was disabled
08:37:40 bauzas or, we consider this method as general, and yeah None or an empty list sounds reasonable
08:37:54 bauzas yeah, that's why I'm on the latter side
08:37:56 sean-k-mooney yep i personaly prefer avoiding excpetions
08:38:18 sean-k-mooney since this is not exceptional behavior
08:38:26 sean-k-mooney its a perfectly vaild outcome
08:38:52 sean-k-mooney for what its worth this is the only really question i had left on the seriese the rest looks good to me
08:38:54 bauzas last call, singular/plural on the output
08:39:24 sean-k-mooney well for get a segment by subnet its singualar as i noted in the comment
08:39:30 sean-k-mooney networks can be plural
08:39:38 sean-k-mooney you can retun both as list as you do now
08:39:47 sean-k-mooney or you can simply the other path as i suggested
08:39:58 bauzas well, ok
08:40:37 bauzas gibi: I won't provide a FUP, please bear with me with a second review loop when I'm done with sean-k-mooney's comments
08:41:59 gibi bauzas: ack
08:42:02 sean-k-mooney gibi: do you have any preferecne for ^ i dont really so ill leave it to bauzas to desice between the two choiced excption/return []/None and list or no list for get segment by subnet
08:42:04 gibi no problemo
08:42:23 bauzas no exception, I decided :)
08:42:24 gibi sean-k-mooney: I have to run, but I will read back before lunch
08:42:33 sean-k-mooney bauzas: works for me
08:42:34 gibi bauzas: as you see fit :)
08:43:26 sean-k-mooney bauzas: if you are removing the excpetion you might want to make the LOG.error a LOG.debug
08:44:23 sean-k-mooney anyway cool im going to get coffee
08:55:45 bauzas sean-k-mooney: quick call, I'm touching the get_network too but what gives you /segments?network_id=net1 if net1 isn't configured ?
08:55:55 bauzas I suppose an empty list ?
08:56:11 bauzas context https://review.opendev.org/c/openstack/nova/+/773976/3/nova/network/neutron.py#3523
08:57:19 bauzas I don't have a routed networks env at hand
09:03:04 sean-k-mooney sure we can have a call just need to get my headset
09:03:57 sean-k-mooney oh your asking what is the result
09:04:20 bauzas yup
09:04:33 sean-k-mooney i belive its an empty list
09:04:37 bauzas I assume we serve a 200 with an empty list
09:04:54 bauzas https://docs.openstack.org/api-ref/network/v2/index.html?expanded=list-subnets-detail,show-port-details-detail,show-subnet-details-detail,list-segments-detail#list-segments
09:05:17 bauzas it's just a filtering
09:05:21 bauzas filtering*
09:05:45 bauzas anyway, will upload and we'll see
09:05:50 sean-k-mooney the only error code it can return is 401 which is unautrised
09:05:56 sean-k-mooney so ya 200 with empty list
09:06:02 bauzas (saying this, because I'll stick with LOG.error on something else but a 200)
09:06:14 bauzas on the neutron method
09:06:26 sean-k-mooney https://docs.openstack.org/api-ref/network/v2/index.html?expanded=list-segments-detail#list-segments
09:06:43 sean-k-mooney looking at the doc its either a 200 or 401 and a 401 would not make sense here
09:07:36 bauzas sure
09:07:55 bauzas either way, will upload the patch once I'm done with fixing tests
09:10:19 sean-k-mooney yep its a list https://github.com/openstack/neutron/blob/master/neutron/services/segments/db.py#L167-L169
09:22:54 kashyap Is it just me, or the (relatively) new Gerrit is much slower?
09:23:33 kashyap I've noticed it over the last couple of weeks -- when I hit "Send" on a comment, it takes more than 4-5 seconds to commit
09:23:45 kashyap s/commit/submit/
09:24:05 sean-k-mooney its slower
09:24:22 sean-k-mooney its to do with storing the data in git apparently
09:25:10 sean-k-mooney its proably more the case with nova then other repos
09:25:21 sean-k-mooney since nova git repo is much bigger
09:40:40 sean-k-mooney we dont have the pci whitelist tags stored in the nova db... only in memory in the compute node
09:42:20 kashyap sean-k-mooney: I see, noted
09:42:27 sean-k-mooney i tought they were stored in extra_info ? did i imaging that?
09:48:00 openstackgerrit Sylvain Bauza proposed openstack/nova master: Add net and utils methods for getting routed netks and segments https://review.opendev.org/c/openstack/nova/+/773976
09:48:10 openstackgerrit Sylvain Bauza proposed openstack/nova master: Add a routed networks scheduler pre-filter https://review.opendev.org/c/openstack/nova/+/749068
09:50:13 songwenping_ sean-k-mooney: morning, i have manually set the [vnc]/auth_schema=["vnc"] and created a vm with a console without a password and it works in our product, but i have no idea about the tempest to test, would you give some specific guide, please?
09:51:42 openstackgerrit Sylvain Bauza proposed openstack/nova master: Add net & utils methods for routed nets & segments https://review.opendev.org/c/openstack/nova/+/773976
09:51:52 openstackgerrit Sylvain Bauza proposed openstack/nova master: Add a routed networks scheduler pre-filter https://review.opendev.org/c/openstack/nova/+/749068
09:51:56 bauzas gibi: uploaded the last revision, with just a cosmetic change on the fixtures (using the uuid sentinelà + setattr usage instead of copy/pasting 5 times compute create

Earlier   Later