| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2020-04-09 | |||
| 10:30:31 | openstackgerrit | Ghanshyam Mann proposed openstack/nova master: Pass the target in os-services APIs policy https://review.opendev.org/676688 | |
| 10:31:42 | openstackgerrit | Ghanshyam Mann proposed openstack/nova master: Pass the target in os-services APIs policy https://review.opendev.org/676688 | |
| 10:40:01 | sean-k-mooney | bauzas: the hypens need to be converted to _ | |
| 10:42:54 | sean-k-mooney | bauzas: https://github.com/openstack/os-traits/blob/master/os_traits/__init__.py#L140-L156 | |
| 10:43:26 | sean-k-mooney | kashyap: yes | |
| 10:43:50 | sean-k-mooney | kashyap: suspend/resume is suspend to disk, pause/unpause is suspend to ram | |
| 10:44:20 | sean-k-mooney | kashyap: so not qutie the same as s3 vs s4 | |
| 10:44:44 | sean-k-mooney | but for pause we just stop the execution fo the qemu cpu without stoping the full qemu proces | |
| 10:45:07 | sean-k-mooney | where as suspend does a libvirt managed save dumping guest ram to a file on disk | |
| 10:45:45 | sean-k-mooney | from a guest os perspecitive its more or less looks the same unless you have pci passthough deivces | |
| 10:48:21 | bauzas | sean-k-mooney: ahah, thanks for the explanation ! | |
| 10:49:25 | bauzas | now I understand, I could have asked to create a trait like 'custom_nvidia-11' but then normalize_name() would ask Placement to create trait named 'CUSTOM_NVIDIA_11') | |
| 10:49:37 | sean-k-mooney | you can just take the mdev type and call that function and it should work | |
| 10:49:43 | sean-k-mooney | yes | |
| 10:50:17 | bauzas | I could even provide a name like 'custom_foo?.%^', it would just do 'CUSTOM_FOO____' | |
| 10:50:19 | sean-k-mooney | which means in your flavor you need to use 'CUSTOM_NVIDIA_11' or you will get no results form placement | |
| 10:50:52 | bauzas | sean-k-mooney: yeah, ok, good point | |
| 10:51:05 | bauzas | sean-k-mooney: I'm afraid placement api-ref doesn't mention it | |
| 10:51:20 | bauzas | not talking of the normalization | |
| 10:51:28 | sean-k-mooney | the vaild chariters | |
| 10:51:32 | bauzas | yup | |
| 10:51:39 | bauzas | this would clarify the expectations | |
| 10:51:46 | sean-k-mooney | so i think it wont normalise on your behalf | |
| 10:51:52 | bauzas | you could do whatever you want, but ask placement the right things | |
| 10:51:53 | sean-k-mooney | it will reject the creation fo the trait? | |
| 10:52:04 | bauzas | sean-k-mooney: that's the whole point, I dunno | |
| 10:52:26 | sean-k-mooney | ya i have never tried to check honestly | |
| 10:52:31 | bauzas | I dunno whether Placement API is strict with naming or just allows anything to come by and normalize it | |
| 10:52:44 | bauzas | with the latter, I have concerns | |
| 10:52:47 | bauzas | this is not RESTful | |
| 10:53:11 | bauzas | if I'm creating an object, I'm expecting the output of the creation is identical to the object I passed | |
| 10:53:21 | bauzas | from a semantics perspective | |
| 10:53:28 | bauzas | (or idempotent if you prefer) | |
| 10:55:27 | sean-k-mooney | they dont actully have a test case for it but from the doc text i would expect you will get a 400 | |
| 10:55:29 | sean-k-mooney | https://github.com/openstack/placement/blob/master/placement/tests/functional/gabbits/traits.yaml#L17-L34 | |
| 10:56:41 | openstackgerrit | Sylvain Bauza proposed openstack/nova master: Functional test with pGPUs https://review.opendev.org/717975 | |
| 10:56:47 | bauzas | sean-k-mooney: FWIW, the docs I wrote for vgpu multiple types only mentions trait names being capitalized and not having other chars but the ones wanted https://8ae97f93626416bcf134-be430d2f919a8698d2e96141ed3ac146.ssl.cf1.rackcdn.com/715490/10/check/openstack-tox-docs/b670504/docs/admin/virtual-gpu.html#optional-provide-custom-traits-for-multiple-gpu-types | |
| 10:57:09 | kashyap | sean-k-mooney: Yeap; noted - on suspend. Thanks | |
| 10:57:56 | bauzas | sean-k-mooney: yeah thanks for the gabbit, that proves the Placement API ref should be updated to mention such limitations | |
| 10:58:31 | sean-k-mooney | well gabbit should also be extened to test an invalid trait that is not normalised | |
| 10:58:51 | bauzas | sean-k-mooney: talking of https://docs.openstack.org/api-ref/placement/?expanded=update-resource-provider-traits-detail#update-resource-provider-traits | |
| 10:59:50 | bauzas | whoops, wrong link | |
| 11:00:19 | bauzas | sean-k-mooney: this one sorry https://docs.openstack.org/api-ref/placement/?expanded=update-traits-detail#traits | |
| 11:00:49 | bauzas | Error response codes: badRequest(400) 400 BadRequest if trait name is not prefixed with CUSTOM_ prefix. | |
| 11:00:54 | sean-k-mooney | bauzas: found it https://github.com/openstack/placement/blob/master/placement/schemas/common.py#L17-L22 | |
| 11:01:13 | bauzas | I wasn't crazy \o/ | |
| 11:01:15 | sean-k-mooney | they are using json schema for that validation https://github.com/openstack/placement/blob/master/placement/schemas/common.py#L17-L22 | |
| 11:01:17 | bauzas | stephenfin: ^ | |
| 11:01:43 | sean-k-mooney | with this scema https://github.com/openstack/placement/blob/master/placement/schemas/trait.py | |
| 11:01:44 | bauzas | I was betting this morning that it *wasn't* possible to create traits with hyphens in them | |
| 11:01:53 | stephenfin | <stephenfin> Sec, lemme drag it out | |
| 11:01:53 | stephenfin | ||
| 11:02:17 | stephenfin | With 1.33 they become alphanumeric, '_', and '-' with a length limit of 64. | |
| 11:02:51 | bauzas | you're talking of the group info | |
| 11:02:55 | bauzas | not the trait | |
| 11:03:13 | bauzas | https://github.com/openstack/placement/blob/master/placement/schemas/common.py#L20 | |
| 11:03:20 | sean-k-mooney | stephenfin: this is the important bit https://github.com/openstack/placement/blob/master/placement/schemas/common.py#L17-L22 | |
| 11:04:12 | sean-k-mooney | so it expands to " "^CUSTOM_[A-Z0-9_]+$" | |
| 11:04:38 | stephenfin | I'm confused. Isn't that exactly what I have? | |
| 11:04:40 | sean-k-mooney | so hyphen is not allowed in the name | |
| 11:04:47 | stephenfin | https://review.opendev.org/#/c/718461/4/nova/api/validation/extra_specs/traits.py@65 | |
| 11:04:59 | stephenfin | I don't allow hyphens in that trait name. I only allow them in the group | |
| 11:05:12 | sean-k-mooney | no | |
| 11:05:24 | sean-k-mooney | [a-zA-Z0-9_-] | |
| 11:05:28 | sean-k-mooney | the trailing - | |
| 11:05:32 | sean-k-mooney | allows hypenes | |
| 11:05:35 | stephenfin | that's the group name, not the trait name | |
| 11:05:42 | sean-k-mooney | oh sorry group | |
| 11:05:47 | stephenfin | trait{group}:CUSTOM_{trait} | |
| 11:05:53 | bauzas | stephenfin: tbc, I clarified https://review.opendev.org/#/c/718461/4 | |
| 11:05:56 | stephenfin | r'([a-zA-Z0-9_-]{1,64})?' applies to group | |
| 11:05:58 | bauzas | (my -1) | |
| 11:05:59 | sean-k-mooney | yep what you have is correct | |
| 11:06:04 | stephenfin | r'[A-Z0-9_]+' applies to trait | |
| 11:06:13 | bauzas | my only concern is with traits | |
| 11:06:27 | sean-k-mooney | bauzas: line 65 handels that | |
| 11:06:35 | sean-k-mooney | and that is correct | |
| 11:06:36 | bauzas | of what ? | |
| 11:06:47 | sean-k-mooney | https://review.opendev.org/#/c/718461/4/nova/api/validation/extra_specs/traits.py@65 | |
| 11:07:08 | sean-k-mooney | stephenfin: although i think bauzas was originally not talking about your validation stuff | |
| 11:07:16 | stephenfin | bauzas: replied | |
| 11:07:23 | bauzas | yeah, again my concern is just abotu https://review.opendev.org/#/c/718461/4/nova/tests/unit/api/validation/extra_specs/test_validators.py@33 | |
| 11:07:32 | openstackgerrit | Balazs Gibizer proposed openstack/python-novaclient master: Microversion 2.86 - Extra spec validation https://review.opendev.org/718057 | |
| 11:07:32 | openstackgerrit | Balazs Gibizer proposed openstack/python-novaclient master: Microversion 2.87 - Stable device boot from volume rescue https://review.opendev.org/714956 | |
| 11:07:36 | stephenfin | I think you're mixing up the {group} and {trait} parts of the validator | |
| 11:07:42 | bauzas | oh man | |
| 11:07:48 | bauzas | I'm getting headache | |
| 11:08:31 | sean-k-mooney | bauzas that is the list of namespaces | |
| 11:08:38 | sean-k-mooney | so the partern ther is the group name | |
| 11:08:40 | bauzas | yup, turned up my vote | |
| 11:08:47 | bauzas | anyway, lunch | |
| 11:08:50 | sean-k-mooney | stephenfin: could you use constnts for this | |
| 11:09:05 | sean-k-mooney | so in the test you can just refer to the constnat | |
| 11:09:25 | sean-k-mooney | that might make it clearer? | |
| 11:09:37 | sean-k-mooney | im not going to -1 over that but it might help | |
| 11:09:41 | stephenfin | Not really, because we "build" the regex so I have proper groups | |
| 11:10:04 | stephenfin | Also, I'm always reluctant to use constants in unit tests, because if you've a mistake in the constant then you propagate the mistake | |
| 11:10:49 | sean-k-mooney | ya that is a factor although i have seen many typos in unit test where the typo was not important | |
| 11:11:00 | sean-k-mooney | untill you change something | |
| 11:11:23 | sean-k-mooney | ok im going to go re review the vgpu stuff | |