Skip to content
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

discontinue support of OCI hook #92

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

enp0s3
Copy link
Member

@enp0s3 enp0s3 commented Feb 12, 2025

maintaining of the OCI hook becomes expensive - the hook is tightly coupled with the specific OCI runtime that was chosen to be used on the node. Moreover the hook cannot be adjusted on a per-pod basis when the pod is using a custom runtime class.
In addition the OCI hook is detached from the wasp-agent lifecycle. It means that extra effort needs to be put in order to clean the hook when the wasp-agent is unresponsive or when its deleted from the cluster.

if we consider to remove the hook we should compare two scenarios - with and w/o the hook. The difference is as follows:

(1) with the hook the transition is unlimited->limited swap usage. (2) w/o the hook the transition is zero->limited swap usage.

setting the limited swap is done by the limited swap controller which runs inside the wasp-agent daemonset. The time it takes to set the limited swap depends on the API latency (this design by itself can be improved).

by switching from (1) to (2) we actually don't introduce regression from workload stability perspective, because in both scenarios if the workload exceeds its allowed limited swap, it will be OOMkilled.

From node stability perspective switching to (2) is even safer.

scenario (2) puts in risk only the container itself that could be OOMkilled in the worst case, while in scenario (1) unlimited swap consumption can put the whole node in risk.

Regarding API latency the following steps can be taken: (*) We actually don't need the API server, we can work directly with the kubelet server.
(**) We can utilize NRI, thus opt-in for limited swap from inside the CRI lifecycle.

maintaining of the OCI hook becomes expensive - the hook
is tightly coupled with the specific OCI runtime that was
chosen to be used on the node. Moreover the hook cannot be
adjusted on a per-pod basis when the pod is using a custom
runtime class.
In addition the OCI hook is detached from the wasp-agent lifecycle.
It means that extra effort needs to be put in order to clean the hook
when the wasp-agent is unresponsive or when its deleted from the cluster.

if we consider to remove the hook we should compare two scenarios -
with and w/o the hook. The difference is as follows:

(1) with the hook the transition is unlimited->limited swap usage.
(2) w/o the hook the transition is zero->limited swap usage.

setting the limited swap is done by the limited swap controller which
runs inside the wasp-agent daemonset. The time it takes to set the limited
swap depends on the API latency (this design by itself can be improved).

by switching from (1) to (2) we actually don't introduce regression
from workload stability perspective, because in both scenarios if the
workload exceeds its allowed limited swap, it will be OOMkilled.

From node stability perspective switching to (2) is even safer.

scenario (2) puts in risk only the container itself that could
be OOMkilled in the worst case, while in scenario (1) unlimited
swap consumption can put the whole node in risk.

Regarding API latency the following steps can be taken:
(*) We actually don't need the API server, we can work
directly with the kubelet server.
(**) We can utilize NRI, thus opt-in for limited swap
from inside the CRI lifecycle.

Signed-off-by: Igor Bezukh <[email protected]>
Copy link

openshift-ci bot commented Feb 12, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from enp0s3. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@enp0s3
Copy link
Member Author

enp0s3 commented Feb 12, 2025

/cc @fabiand @Barakmor1

@openshift-ci openshift-ci bot requested review from Barakmor1 and fabiand February 12, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant