| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2022-05-19 | |||
| 13:43:04 | bauzas | gibi: sean-k-mooney: melwitt: gmann: I captured the agreement on my spec, can we move forward and accept it ? https://review.opendev.org/c/openstack/nova-specs/+/840217 | |
| 13:43:43 | gibi | bauzas: I let the others pull the trigger on that :) | |
| 13:44:47 | bauzas | :) | |
| 13:50:29 | sean-k-mooney | i can set +w if ther are no outstanding questions | |
| 13:50:47 | sean-k-mooney | im stil happy with it as it is so i was just waiting for gibi and melwitt to review | |
| 13:51:00 | sean-k-mooney | gibi: if your good to proceed ill send it on its way | |
| 13:51:02 | gibi | I accept it | |
| 13:51:04 | bauzas | cool, no rush | |
| 13:51:27 | gibi | so go and send it | |
| 13:51:38 | sean-k-mooney | done | |
| 13:52:27 | sean-k-mooney | gibi: im going to take a look at the pci spec again soon | |
| 13:52:43 | gibi | sean-k-mooney: thanks. only the pci alias part changed the rest is just fixing nits | |
| 13:52:48 | bauzas | Uggla: gibi: I don't see in https://etherpad.opendev.org/p/unshelve-to-host#L166 what we should do with original_az=None, host=hostB and AZ=something | |
| 13:53:01 | sean-k-mooney | ack | |
| 13:53:08 | bauzas | should we conflict or verify that the host is within the requested AZ ? | |
| 13:53:18 | bauzas | this was an open question in the spec review | |
| 13:53:32 | gibi | ahh good point I will add a line | |
| 13:53:41 | gibi | or you cabn | |
| 13:54:24 | gibi | I think that should be similar to AZ1 -> AZ2 + host1 case | |
| 13:54:40 | sean-k-mooney | bauzas: personally no | |
| 13:54:51 | sean-k-mooney | bauzas: i think we should let the scheduler handel that | |
| 13:55:14 | bauzas | sean-k-mooney: gibi: ok I added a line | |
| 13:55:17 | gibi | thanks | |
| 13:55:28 | sean-k-mooney | if its not we will get a no valid host but i was ok with leaving that to the patch review honestly | |
| 13:55:38 | sean-k-mooney | i dotn really mind checin in the api | |
| 13:55:44 | gibi | I'm OK to let the schedule reject it | |
| 13:55:47 | gibi | all these cases | |
| 13:55:56 | sean-k-mooney | but there are many other factors that could cause it to rejected | |
| 13:56:14 | sean-k-mooney | so schduler/placment is really the only thing that know if that is ok or not | |
| 13:56:40 | sean-k-mooney | like isolated_aggrate/tenating isolation filter/host aggreate metadta ectra | |
| 13:56:47 | bauzas | gibi: there could be a corner case tho | |
| 13:56:51 | gibi | yeah, we cloud do a check in the api and make a better error message but that is not strictly needed | |
| 13:57:09 | bauzas | gibi: if we leave the scheduler return NoValidHost, | |
| 13:57:24 | bauzas | the RequestSpec would have been modified before | |
| 13:57:32 | gibi | ohh true | |
| 13:57:33 | bauzas | so we're not idempotent | |
| 13:57:37 | sean-k-mooney | well we proably should not save it until after schduing | |
| 13:57:48 | gibi | yepp we need to rollback the change or not save it | |
| 13:58:02 | gibi | if that is not possible architecturally then lets do a check in the API | |
| 13:58:38 | sean-k-mooney | well we will need to cacht the novaild host and rollback in anycase if we do the save before | |
| 13:58:38 | bauzas | wai | |
| 13:58:39 | bauzas | wait | |
| 13:58:52 | bauzas | in order to verify that the host is in an AZ | |
| 13:59:04 | bauzas | we need to lookup its aggregate, right | |
| 13:59:09 | sean-k-mooney | yep | |
| 13:59:12 | bauzas | but, | |
| 13:59:17 | bauzas | this is cell-specific | |
| 13:59:21 | sean-k-mooney | no its not | |
| 13:59:23 | sean-k-mooney | its in the api db | |
| 13:59:32 | sean-k-mooney | the host aggreate are in teh api db | |
| 13:59:34 | bauzas | oh stupid me, you're right | |
| 13:59:55 | sean-k-mooney | the instance.az is in the cell db | |
| 13:59:58 | bauzas | we debated the place of the aggregates table for a while when we designed cells v2 | |
| 14:00:00 | sean-k-mooney | i think | |
| 14:00:09 | bauzas | sean-k-mooney: yes, instance.az | |
| 14:00:17 | bauzas | reqspec.az is in the API DB | |
| 14:00:23 | sean-k-mooney | ah yes | |
| 14:00:29 | sean-k-mooney | so we dont need instance.az | |
| 14:00:30 | bauzas | so, there is no cell downcall | |
| 14:00:35 | sean-k-mooney | yep | |
| 14:00:36 | bauzas | yup, we don't need it | |
| 14:00:48 | bauzas | so, this is cheap to verify it by the api service | |
| 14:01:12 | bauzas | in this case, I'm in favor of doing the lookup at the unshelve time | |
| 14:01:17 | bauzas | in the api service | |
| 14:01:28 | bauzas | and return synchronously a "sorry dude" | |
| 14:01:51 | bauzas | instead of trying to manage a late persistence or a rollback of the reqspec | |
| 14:02:51 | Uggla | agree, it sounds simpler. | |
| 14:03:27 | bauzas | and this is synchronous | |
| 14:04:26 | sean-k-mooney | bauzas: ok but we still need to handel rollback of the request spec if we fail to unshleve for any reason | |
| 14:04:53 | bauzas | sean-k-mooney: agreed | |
| 14:05:07 | bauzas | which wasn't the case now, right? | |
| 14:05:35 | sean-k-mooney | well i have not looked at he code to check | |
| 14:05:38 | bauzas | I see the .save() call, but I don't see the conductor managing the exception | |
| 14:05:45 | sean-k-mooney | do you have a link | |
| 14:05:57 | bauzas | yup, sec | |
| 14:06:04 | bauzas | https://github.com/openstack/nova/blob/master/nova/compute/api.py#L4470 | |
| 14:06:10 | sean-k-mooney | i guess we can also just document that the request spec will always be updted | |
| 14:06:18 | bauzas | sec, better with a permalink | |
| 14:06:19 | bauzas | https://github.com/openstack/nova/blob/4939318649650b60dd07d161b80909e70d0e093e/nova/compute/api.py#L4470 | |
| 14:06:21 | sean-k-mooney | i just generally effect failed operation to not change things | |
| 14:07:02 | sean-k-mooney | ya so right now it changing it uncondtionaly | |
| 14:07:05 | sean-k-mooney | i guess that fine | |
| 14:07:13 | sean-k-mooney | its also doing the validation now | |
| 14:07:17 | bauzas | https://github.com/openstack/nova/blob/4939318649650b60dd07d161b80909e70d0e093e/nova/conductor/manager.py#L1040-L1045 | |
| 14:07:18 | sean-k-mooney | https://github.com/openstack/nova/blob/4939318649650b60dd07d161b80909e70d0e093e/nova/compute/api.py#L4454= | |
| 14:07:20 | sean-k-mooney | in the api | |
| 14:07:34 | bauzas | the conductor is not handling the AZ case on the NoValidHost case | |
| 14:07:58 | sean-k-mooney | ya | |
| 14:07:59 | bauzas | so, now, if you unshelve to another AZ, and you fail, your instance gets pinned in the new AZ | |
| 14:08:07 | sean-k-mooney | yep | |
| 14:08:09 | bauzas | still shelved but pinned | |
| 14:08:25 | sean-k-mooney | so we either maintain that behavior | |
| 14:08:32 | sean-k-mooney | or we treat it as a bug | |
| 14:08:38 | sean-k-mooney | and fix that spereatly | |
| 14:08:53 | bauzas | good point | |
| 14:08:56 | bauzas | this is a bug | |
| 14:09:06 | sean-k-mooney | ok then we dont need to cover it in the spec | |
| 14:09:13 | bauzas | fixing it now would benefit to the unshelve to host implementation | |
| 14:09:23 | bauzas | but wait | |
| 14:09:30 | bauzas | the rollback isn't trivial | |