-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control interface shall be created only for configured for it workloads #322
Comments
Currently working on this. |
The PR for the refactoring is #345. Summary of decisions for the refactoring: @krucod3: The ControlInterfaceInfo must be mocked because it is needed in the RuntimeManager where it is constructed within methods. This new call must be intercepted then. With the new control interface module structure together with mockall implementing a We decided to refactor to a single method to create an ControlInterface: its constructor With the new structure of the control_interface module there where lots of problems with imports of mocks and public API exports at the beginning. Especially, inside the new control_interface.rs module file (public api exports and imports are not allowed inside the same file as the compiler treats it as duplicated imports an throws errors). To ensure that the mock and the production structs are found and treated correctly and not have issues with the duplicated imports we decided to not have an public API export for Authorizer and ControlInterfaceInfo. An alternative would be to put the control_interface.rs implementation into another sub module called "control_interface_impl", then we can use public API exports and correct imports for mocks and production code within the impl, but this leads to unnecessary modules with naming sugar. At the end, achieved is a common and single interface of creating the control interface in different places where also logging can be handled differently in each client and a new module structure with renamed structures that are now more related to the ControlInterface. For the import paths and public API exports we had to make some compromise. |
All done here. |
Description
The basic idea here is to skip the creation of the control interface if the configuration of the workload does not contain a control interface field. Doing this will spare some green threads on Ankaios side and the creation of fifo pipes that will never be used, improving the overall performance and stability.
Goals
Final result
Summary
To be filled when the final solution is sketched.
Tasks
You can even split this into its own PR and reduce the chances of conflicts with main
The text was updated successfully, but these errors were encountered: