-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[multus] added support for mixed type of container engine #9224
Conversation
Hi @mr-yaky. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. 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. |
Hi @mr-yaky , please rebase this PR on latest state of the master branch to be able to pass the CI tests. |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a new support for multus.
I kicked the existing multus CI job, let's see the result after that.
Just one question to understand this clearly.
/ok-to-test
@@ -52,6 +59,7 @@ spec: | |||
{% if container_manager == 'crio' %} | |||
- name: run | |||
mountPath: {{ multus_cni_run_dir }} | |||
mountPropagation: HostToContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not get the reason why here needs to specify mountPropagation: HostToContainer
here.
Can I get the point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @oomichi
set_fact: | ||
container_manager_types: "{{ ansible_play_hosts_all|map('extract', hostvars, ['container_manager'])|list|unique }}" | ||
run_once: true | ||
when: inventory_hostname == groups['kube_control_plane'][0] | ||
|
||
- name: Multus | Copy manifest templates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This task was failed like https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/2957405780#L3428
TASK [network_plugin/multus : Multus | Copy manifest templates] ****************
task path: /builds/kargo-ci/kubernetes-sigs-kubespray/roles/network_plugin/multus/tasks/main.yml:21
Wednesday 31 August 2022 05:09:30 +0000 (0:00:00.114) 0:11:25.330 ******
Wednesday 31 August 2022 05:09:30 +0000 (0:00:00.114) 0:11:25.330 ******
fatal: [instance-2 -> {{ groups['kube_control_plane'][0] }}]: FAILED! => {"msg": "The conditional check 'item.engine in container_manager_types' failed. The error was: error while evaluating conditional (item.engine in container_manager_types): 'container_manager_types' is undefined\n\nThe error appears to be in '/builds/kargo-ci/kubernetes-sigs-kubespray/roles/network_plugin/multus/tasks/main.yml': line 21, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Multus | Copy manifest templates\n ^ here\n"}
The root problem seems 'container_manager_types' is undefined
At the above line 17, container_manager_types is set only if inventory_hostname == groups['kube_control_plane'][0]
So we might need to add the same condition to the line 35.
@oomichi I think you can try to run your test again. I have checked with all 3 main playbooks cluster/upgrade-cluster/scale and it works for our cluster. So, please try one more type. |
@mr-yaky |
@oomichi Done. PR has rebased. |
Thanks for updating. /lgtm |
@oomichi Is it possible to get this on the next upstream release to don't apply our own patches each time ? |
BTW this PR tested with 2.19.x and 2.20.x released and it works good for us. |
Also missed this one, sorry guys especially @mr-yaky |
@floryut if we can merge it to upstream we will be very thankful. We are still waiting on this. |
Thanks for this work @mr-yaky ! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristicalin, mr-yaky 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 |
…-sigs#9224) * [multus] added support for mixed type of container engine * [multus] fixed for using with cluster/upgrade-cluster/scale playbooks
…-sigs#9224) * [multus] added support for mixed type of container engine * [multus] fixed for using with cluster/upgrade-cluster/scale playbooks
…-sigs#9224) * [multus] added support for mixed type of container engine * [multus] fixed for using with cluster/upgrade-cluster/scale playbooks
…-sigs#9224) * [multus] added support for mixed type of container engine * [multus] fixed for using with cluster/upgrade-cluster/scale playbooks
@cristicalin I have reworked this PR completely according to your request and recommendations on the previous closed one. This is tested on our cluster, I have added only
{{ image_arch }}
because our tests were with 2.18.1 version of kubespray. So, I have adopted it also for the version from head.What type of PR is this?
/kind feature
What this PR does / why we need it:
Kubespray should support mixed type of container engine, eg: docker+crio etc. This is very useful for large clusters during migrations to different container engines and when we need more time to test and adopt everything.
Which issue(s) this PR fixes:
The current Multus support has following issues:
Special notes for your reviewer:
kubespray.io/container_manager="" label with container engine type must be set manually by using group_vars and additional groups in your inventory, for example:
Does this PR introduce a user-facing change?: