-
Notifications
You must be signed in to change notification settings - Fork 373
The virtcontainers network interface is not needed #1179
Comments
There's only one real implementer of the network interface and no real need to implement anything else. We can just go ahead and remove this abstraction. Fixes: kata-containers#1179 Signed-off-by: Samuel Ortiz <[email protected]>
There's only one real implementer of the network interface and no real need to implement anything else. We can just go ahead and remove this abstraction. Fixes: kata-containers#1179 Signed-off-by: Samuel Ortiz <[email protected]>
@sameo I'm not against the removal of the Go interface since, as you mentioned it, we're only using one single implementation. But I'm concerned about the unit tests, because the noop implementation is pretty convenient to test a bunch of code that would be complex to test if we had to mimic the real network behavior. WDYT? |
@sboeuf could you not test it with the equivalent of net==none? With the noop you were actually not exercising any real code paths right. It was just there to satisfy the interface? |
That's a good idea, and I didn't think about this as it's been introduced fairly recently. This might be enough for some cases.
Yes, exactly. |
There's only one real implementer of the network interface and no real need to implement anything else. We can just go ahead and remove this abstraction. Fixes: kata-containers#1179 Signed-off-by: Samuel Ortiz <[email protected]>
Great! I think we should remove, no reason to have an interface in case, and we can fix the tests. What will this mean with respect to semantic versioning? |
This is purely an internal interface, there is no reason to bump version for this kind of change. |
On pod delete, we were looking to read files that we had just deleted. In particular, stopSandbox for QEMU was called (we cleanup up vmpath), and then QEMU's save function was called, which immediately checks for the PID file. Let's only update the persist store for QEMU if QEMU is actually running. This'll avoid Error messages being displayed when we are stopping and deleting a sandbox: ``` level=error msg="Could not read qemu pid file" ``` I reviewed CLH, and it looks like it is already taking appropriate action, so no changes needed. Ideally we won't spend much time saving state to persist.json unless there's an actual error during stop/delete/shutdown path, as the persist will also be removed after the pod is removed. We may want to optimize this, as currently we are doing a persist store when deleting each container (after the sandbox is stopped, VM is killed), and when we stop the sandbox. This'll require more rework... tracked in: kata-containers/kata-containers#1181 Fixes: kata-containers#1179 Signed-off-by: Eric Ernst <[email protected]>
On pod delete, we were looking to read files that we had just deleted. In particular, stopSandbox for QEMU was called (we cleanup up vmpath), and then QEMU's save function was called, which immediately checks for the PID file. Let's only update the persist store for QEMU if QEMU is actually running. This'll avoid Error messages being displayed when we are stopping and deleting a sandbox: ``` level=error msg="Could not read qemu pid file" ``` I reviewed CLH, and it looks like it is already taking appropriate action, so no changes needed. Ideally we won't spend much time saving state to persist.json unless there's an actual error during stop/delete/shutdown path, as the persist will also be removed after the pod is removed. We may want to optimize this, as currently we are doing a persist store when deleting each container (after the sandbox is stopped, VM is killed), and when we stop the sandbox. This'll require more rework... tracked in: kata-containers/kata-containers#1181 Fixes: kata-containers#1179 Signed-off-by: Eric Ernst <[email protected]>
On pod delete, we were looking to read files that we had just deleted. In particular, stopSandbox for QEMU was called (we cleanup up vmpath), and then QEMU's save function was called, which immediately checks for the PID file. Let's only update the persist store for QEMU if QEMU is actually running. This'll avoid Error messages being displayed when we are stopping and deleting a sandbox: ``` level=error msg="Could not read qemu pid file" ``` I reviewed CLH, and it looks like it is already taking appropriate action, so no changes needed. Ideally we won't spend much time saving state to persist.json unless there's an actual error during stop/delete/shutdown path, as the persist will also be removed after the pod is removed. We may want to optimize this, as currently we are doing a persist store when deleting each container (after the sandbox is stopped, VM is killed), and when we stop the sandbox. This'll require more rework... tracked in: kata-containers/kata-containers#1181 Fixes: kata-containers#1179 Signed-off-by: Eric Ernst <[email protected]>
Description of problem
The following network interface:
is only implemented by the default network implementation and the noop one. The noop one is only there for testing purposes and at the same time there is no known need for another network model implementation.
Expected result
Remove the network interface and only use what's currently the default network interface implementation.
The text was updated successfully, but these errors were encountered: