Configure CDI registry only on start#7419
Conversation
|
Hi @bart0sh. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
f1c6cca to
3e6a272
Compare
3e6a272 to
15eae63
Compare
|
/cc @mikebrow |
|
/cc @kzys @MikeZappa87 |
|
/cc @AkihiroSuda @fuweid |
As WithCDI is CRI-only API it makes sense to move it out of oci module. This move can also fix possible issues with this API when CRI plugin is disabled. Signed-off-by: Ed Bartosh <[email protected]>
Currently CDI registry is reconfigured on every WithCDI call, which is a relatively heavy operation. This happens because cdi.GetRegistry(cdi.WithSpecDirs(cdiSpecDirs...)) unconditionally reconfigures the registry (clears fs notify watch, sets up new watch, rescans directories). Moving configuration to the criService.initPlatform should result in performing registry configuration only once on the service start. Signed-off-by: Ed Bartosh <[email protected]>
Added logging of found CDI devices. Fixed test failures caused by the change. Signed-off-by: Ed Bartosh <[email protected]>
15eae63 to
643dc16
Compare
Signed-off-by: Ed Bartosh <[email protected]>
def093a to
347397c
Compare
Currently CDI registry is reconfigured on every WithCDI call, which is a relatively heavy operation.
This happens because cdi.GetRegistry(cdi.WithSpecDirs(cdiSpecDirs...)) unconditionally reconfigures the registry (clears fs notify watch, sets up new watch, rescans directories).
Moving configuration to the criService.initPlatform should result in performing registry configuration only once on the service start.