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
hotunplug - reverse phase1 #9737
Conversation
Skipping CI for Draft Pull Request. |
7327506
to
e82d26a
Compare
c8a26a3
to
11e467a
Compare
11e467a
to
3023353
Compare
3023353
to
81de179
Compare
b567323
to
7029d2c
Compare
946e040
to
ea7241e
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlonaKaplan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This commit detects whether the ConfigStateCache contains pod interfaces that no longer have corresponing network in the VMI spec. If such networks are detected phase1 cleanup is invoked for each one of them. Future commits will implement the cleanup itself which will contain removal of the bridge, tap device and caches created by phase1. Signed-off-by: Alona Paz <alkaplan@redhat.com>
Remove from the volatile cache entries of interfaces that have `absent` state. Note: the file cache is not cleaned here, a follow-up commit will clean it during phase1 cleanup. Signed-off-by: Alona Paz <alkaplan@redhat.com>
The commit includes removal of bridge, tap and dummy nic if they exist. Follow up commits will take care of the caches files deletion. Notice: 1. The cleanup is general and not binding specific. Any link created by whatecer binding should be removed (although we curretnly support only bridge binding hotunplug). 2. Error removing one of the links doesn't block removal on the others. Signed-off-by: Alona Paz <alkaplan@redhat.com>
This commit takes care for cleaning the dmain interface and DHCP caches during UnplugPhase1. The PodInterface cache should be cleaned last. Since it is used as the indicator whether the cleanup should be done/not over yet. Signed-off-by: Alona Paz <alkaplan@redhat.com>
ConfigStateCache is just one of the frotends to the PodInterfaceCache file. PodInterfaceCache contains not only the state data but other data as well. Therefore, removal of a ConfigState entry shouldn't cause removal of the whole PodInterfaceCache file. Signed-off-by: Alona Paz <alkaplan@redhat.com>
Signed-off-by: Alona Paz <alkaplan@redhat.com>
The VM can hotplugged interface that weren't yet plugged to the pod, it is a valid scenario. Signed-off-by: Alona Paz <alkaplan@redhat.com>
This commit fixes several review comments. 1. combine hotunplug flow with the plug 2. remove form ConfigState the podIfaceName cache. On each hotunplug, configState will enter the virt-launcher net namespace. The expesive case is when unplugging an ordinal interface, then on each reconcile of the virt-handler the virt-launcher's net ns will be entered. But it is an edge case that doesn't worth such a complex solution. In a follow-up we should block/remove Absent state from such interfaces. Signed-off-by: Alona Paz <alkaplan@redhat.com>
e444352
to
b574ebd
Compare
rebased |
@AlonaKaplan: you cannot LGTM your own PR. In response to this:
Instructions 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. |
/retest |
/cherry-pick release-1.0 |
@AlonaKaplan: #9737 failed to apply on top of branch "release-1.0":
In response to this:
Instructions 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. |
/cherry-pick release-1.0 |
@AlonaKaplan: new pull request created: #9946 In response to this:
Instructions 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. |
What this PR does / why we need it:
The purpose of the PR is on hotunplug - to remove the interfaces created by phase1 (bridge, tap, dummy nic) and the caches (file and volatile).
Hotunplug is detected when the spec interfaces/networks doesn't contain a network that is stored in the configState cache.
In such case unplug phase1 will try to clean the bridge, tap, dummy nic and the caches in case they exist.
The PR doesn't include -
In case a network has caches but the preparation for some reason didn't start, hotunplug won't remove the cached since the indicator to the cleanup is that the configState is
PodIfaceNetworkPreparationStarted
orPodIfaceNetworkPreparationFinished
.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: