| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2022-05-26 | |||
| 11:13:12 | sean-k-mooney | i think its the latter | |
| 11:13:24 | sean-k-mooney | we have 2 or 3 ways to do anti afinity in nova | |
| 11:13:25 | kevko | you can set az in octavia ...an if you have az created from two datacentres ... server group and anti affinity will not work ..there is big chance that nova just schedule to two hosts ..but in same datacentre | |
| 11:13:35 | sean-k-mooney | and some requrie it all in one request and other allow it to be exteded. | |
| 11:14:11 | sean-k-mooney | kevko: right so ocativa could have an az anti affintiy policy in its api | |
| 11:14:18 | kevko | currently I think there is only one way to do it ... have 1 az from two hosts from two different datacentres ... but this is no way ..because we have hundreds of amphoraes :( | |
| 11:15:51 | sean-k-mooney | so what i would expect is you would creat at least 1 AZ per datacenter right | |
| 11:16:00 | sean-k-mooney | and then create a singel server group | |
| 11:16:05 | sean-k-mooney | with anti affintiy | |
| 11:16:32 | sean-k-mooney | and then in 2 differnet calls to nova create the vms for datacenter A and B | |
| 11:17:41 | kevko | it's not true i think | |
| 11:18:06 | sean-k-mooney | im describing the change you need to make to ocativa not how it works today | |
| 11:18:07 | kevko | anti-affinity works per host ...so there could be situation that in one datacentre instance will be scheduled on two hosts | |
| 11:18:21 | sean-k-mooney | kevko: correct | |
| 11:18:24 | kevko | yeah, | |
| 11:18:35 | sean-k-mooney | that is why you need ot use differnt AZ in the two diffenrt calls to nova | |
| 11:18:48 | kevko | octavia has availability_zone as one parameter in configuration | |
| 11:19:15 | sean-k-mooney | right if you want to supprot this you need to supprot this at the octavia api | |
| 11:19:15 | kevko | if this can be list and setup list of AZs where AZ is 2 hosts from two datacentres ... it will be work i think | |
| 11:19:18 | sean-k-mooney | not config driven | |
| 11:19:32 | sean-k-mooney | kevko: az in nova are nto the same as AZs in aws | |
| 11:19:41 | sean-k-mooney | the are jsut metadtaa on a a host aggreate. | |
| 11:20:01 | sean-k-mooney | there is not gurantee or expectiaon of a sperate falut domain | |
| 11:20:18 | sean-k-mooney | and conversily there is not guranteeor or expecation fo network connectivy between them | |
| 11:20:28 | sean-k-mooney | that is all determin by how you deploy your cloud | |
| 11:21:28 | kevko | yeah i know that it is only metadata defined for host (or how to say :P ...i really don't know how it looks like in deep) | |
| 11:21:48 | sean-k-mooney | its a strign defiend on a host aggareate | |
| 11:21:55 | sean-k-mooney | and then host are mapped to aggreates | |
| 11:23:33 | kevko | what about regions ? | |
| 11:23:38 | kevko | can be helpfull ? | |
| 11:23:42 | sean-k-mooney | the do not existin in nova | |
| 11:23:51 | sean-k-mooney | they are a keystone only construct | |
| 11:24:00 | kevko | yeah ... correct | |
| 11:24:03 | kevko | cells ? | |
| 11:24:24 | sean-k-mooney | cells are internal to nova | |
| 11:24:36 | sean-k-mooney | and not expsoed at the api to end users | |
| 11:24:47 | sean-k-mooney | they are a way to shared the db and message bus | |
| 11:24:52 | kevko | yeah i know .. | |
| 11:24:58 | sean-k-mooney | and are explictly not for fault tollerance | |
| 11:25:08 | sean-k-mooney | but they can kind fo help in a way | |
| 11:25:15 | kevko | so currently i don't have way how to deal with it | |
| 11:25:45 | sean-k-mooney | we coudl support az anti affintiy in nova | |
| 11:25:56 | sean-k-mooney | but we have rejected it in the past the last 2 times it came up | |
| 11:27:24 | sean-k-mooney | kevko: filters and weigher can be added out fo tree by the way | |
| 11:28:18 | sean-k-mooney | but all instnace will be mapped ot an az even if oenis not requested | |
| 11:28:49 | sean-k-mooney | so really if you want to use AZs to map to datacenters | |
| 11:29:19 | sean-k-mooney | then octavia need to accpet the AZ as an api parameter when creating loadblancers | |
| 11:29:48 | sean-k-mooney | and if you want ti to supprot spreaing loadbalncer between azs then it allso need to supprot doing that iself really | |
| 11:30:56 | sean-k-mooney | since AZ are not really visable to neutron by the way there is no guarentee at teh api level that a newton network can span azs | |
| 11:31:45 | opendevreview | sean mooney proposed openstack/os-vif master: [trivial] update job template to zed https://review.opendev.org/c/openstack/os-vif/+/843432 | |
| 11:33:31 | kevko | why it was rejected ? | |
| 11:33:41 | kevko | this would be super usefull | |
| 11:42:11 | sean-k-mooney | https://github.com/openstack/nova/blob/master/doc/source/contributor/project-scope.rst#no-more-orchestration= | |
| 11:44:14 | sean-k-mooney | kevko: it came up on the ptg in the past i can see if there was a draft spec | |
| 11:44:44 | sean-k-mooney | kevko: https://review.opendev.org/c/openstack/nova-specs/+/756380 | |
| 11:45:35 | sean-k-mooney | kevko: as i noted here https://review.opendev.org/c/openstack/nova-specs/+/756380/5#message-ba89445e7b2b033fe39f9bbd32a49271e4780e75= | |
| 11:45:49 | sean-k-mooney | doing this in a filter or weigher is far far too late | |
| 11:46:02 | sean-k-mooney | as the az is alreay asigned at that point | |
| 11:46:57 | sean-k-mooney | kevko: so the only way to do it today woudl be to have an AZ span both datacenters and then use somethign else to model the datacenters and provide anti afinity | |
| 11:47:22 | kevko | hmm | |
| 11:47:23 | kevko | understand | |
| 11:47:43 | sean-k-mooney | you coudl do that with metadata on host aggrats and then a weigher or filter that used that datacenter metadata | |
| 11:49:02 | sean-k-mooney | so 1 AZ that spans both datacheners 1 host aggreate per datacenter and a filter/weigher that used a datacenter tag on the host aggreate + server group infor to implment antiafinity | |
| 11:49:36 | sean-k-mooney | but its much simpelr to have 1 AZ per datacenter and have octaivr just schdule differnt loadbanceer to differnt AZs | |
| 11:49:59 | kevko | and this is not possible :/ | |
| 11:50:00 | sean-k-mooney | its cleaner form an api level and more efficnt form a schdulign perspecitve | |
| 11:50:08 | kevko | because octavia has only one AZ to configure | |
| 11:50:19 | sean-k-mooney | right you woudl have to change octavia | |
| 11:50:39 | sean-k-mooney | so im suggestign you make a featur equest to octavia instead of nova | |
| 11:50:47 | kevko | yeah | |
| 11:50:52 | kevko | thank you ! | |
| 11:50:58 | kevko | you are always replying ;-) | |
| 11:52:01 | sean-k-mooney | perhaps i reply too much on ocation | |
| 11:52:35 | sean-k-mooney | but when people have ligtimate usecase i try to help them find a solution | |
| 11:52:48 | sean-k-mooney | you do i just dont think the clean solution is in nova | |
| 11:53:29 | sean-k-mooney | for older release you coud do this as i descibe with an out of tree weigher/filter if you have 1 AZ and multiple host aggreates but thats messy for a number of reasons | |
| 11:56:11 | kevko | still thank you | |
| 12:16:34 | opendevreview | Miguel proposed openstack/nova master: Pin autopep8 to 1.5.5 in tox https://review.opendev.org/c/openstack/nova/+/843443 | |
| 12:26:40 | kevko | sean-k-mooney last question : Can i import octaviaclient in my own custom nova filter ? :P | |
| 12:26:58 | sean-k-mooney | its your filter so :) | |
| 12:27:08 | sean-k-mooney | upstrem no | |
| 12:27:29 | sean-k-mooney | filters are not ment to make any db or api calls in general | |
| 12:27:49 | sean-k-mooney | filters run per host so we really dont want to do that on large clouds | |
| 12:28:32 | kevko | hmm, ok | |
| 12:28:53 | kevko | can I write filter which will check security group assigned ? | |
| 12:29:18 | sean-k-mooney | security groups? or server groups | |
| 12:31:28 | kevko | both :D | |
| 12:32:16 | kevko | i mean, if it is possible to check server groups it will be better, if no .. security group is same also | |
| 12:32:58 | sean-k-mooney | for server groups you can use the existin filter as a refernce | |
| 12:33:00 | sean-k-mooney | https://github.com/openstack/nova/blob/master/nova/scheduler/filters/affinity_filter.py#L82-L165= | |
| 12:33:09 | sean-k-mooney | but you cant add new policies | |
| 12:33:34 | sean-k-mooney | so you cant jsut add an AZ-anti-affinity policy | |
| 12:34:48 | sean-k-mooney | kevko: we dont have any example of the security gorups but if its in teh request spec then yes | |
| 12:35:15 | kevko | i will have to try | |
| 12:35:33 | sean-k-mooney | kevko: filters are passed 2 objects the hoststate object and a request spec object | |
| 12:35:35 | sean-k-mooney | https://github.com/openstack/nova/blob/master/nova/objects/request_spec.py#L42= | |
| 12:35:51 | sean-k-mooney | kevko: which has security groups https://github.com/openstack/nova/blob/master/nova/objects/request_spec.py#L98= | |
| 12:36:00 | sean-k-mooney | but only the security groups used for nova created ports | |
| 12:36:22 | sean-k-mooney | it will not have the security groups of neutron ports that are passed in as uuids | |
| 12:36:22 | kevko | but no server group :/ | |