Comments (17)
@gopinatht as far as I know we are already addressing this issue. I.e., if there is no annotations, the default plugin is used. If there is annotations, but with cni:"" the plugin is selected smartly by genie. @sushanthakumar please confirm that this is in fact the expected behavior. Thx!
from cni-genie.
@kshafiee Many thanks for the quick response. If you do not mind me asking, do you know what version this issue was addressed in? We are using the 1.8 version of genie.
from cni-genie.
@gopinatht , As u mentioned, there are many cases in which user want to select some default plugin and not so specific about which plugin to use. When user keep annotation as blank (like shown below), it is assumed that user wants to use default plugin
We have below mechanism for this case
- By default, we select "weave" as the plugin. So if weave is installed, pod will comeup and use weave
- In case user want to use some other plugin as default plugin, it can be mentioned in genie conf file as below. Once this is mentioned, that plugin will be used as default for subsequent pods, user need not bother. This config can be updated/modified at any point of time and will reflect in future run
Point 1 support is available in genie from the begining
Point 2 support is added as part of below contribution
from cni-genie.
https://github.com/Huawei-PaaS/CNI-Genie/pull/69
from cni-genie.
Pls let us know if any queries/support needed. If no issues, I shall close this after your check
from cni-genie.
One more thing I want to mention is defining "annotations:" is also not needed to indicate deafult plugin, it can simply be like below also without mention of annotation
from cni-genie.
@sushanthakumar Many thanks for the detailed response. I will test this approach with default_plugin
and get back to you in a day.
from cni-genie.
@sushanthakumar I can confirm that using the default_plugin
approach solved our problem. I will close this case for now and reopen it if I see more problems.
Thanks again for the help.
from cni-genie.
@sushanthakumar I found a bug in the way annotations are handled with CNI genie. If a pod contains annotations
but no cni
annotation, the default_plugin
is not used.
For instance, after installing CNI genie, we tried to install the etcd operator helm chart with the following commands:
helm install --name voltha-etcd --set etcdCluster.size=1 stable/etcd-operator
helm upgrade --set etcdCluster.size=1 --set customResources.createEtcdClusterCRD=true \
voltha-etcd stable/etcd-operator
We get the error:
Warning FailedCreatePodSandBox 2m (x12 over 2m) kubelet, k8s-01 Failed create pod sandbox: rpc error: code = Unknown desc = NetworkPlugin cni failed to set up pod "etcd-cluster-0000_default" network: CNI Genie Add IP internal error: CNI Genie error at ParsePodAnnotations: CNI Genie failed to retrieve CNS list from cAdvisor = unable to get "get all containers info" from "http://127.0.0.1:4194/api/v1.3/containers": Post http://127.0.0.1:4194/api/v1.3/containers: dial tcp 127.0.0.1:4194: connect: connection refused, result: %!!(MISSING)s(<nil>)
It looks like CNIGenie is trying to query CAdvisor for a possible network if the cni
annotation is not given. CNIGenie should really be using the default_plugin
provided.
from cni-genie.
@gopinatht , I retested this feature with etcd scenario and below is my observation
-
Installed genie using the link kubectl apply -f https://raw.githubusercontent.com/Huawei-PaaS/CNI-Genie/master/conf/1.8/genie-complete.yaml (Recently we updated the link to support new features but that should not matter for deafult plugin feature)
-
Installed etcd using helm and observed all pods running with Ips acquired from flannel
-
Finally did helm upgrade and found it running, did not get above error
-
I also checked for normal pods (not the above etcd) which are having annotations but not cni genie annotations and saw them using default plugin.
Can u pls check once whether my steps are anything different from yours. You can try genie install from above link.
Anyway, if still this issue is occurring under any usecase/scenarios, we can definitely check further as default plugin is one common usecase scenario
thanks
from cni-genie.
@gopinatht , I was going through recently handled issues and found that issue u mentioned is referenced in below issue
https://github.com/Huawei-PaaS/CNI-Genie/issues/100
and it is fixed as part of PR https://github.com/Huawei-PaaS/CNI-Genie/pull/102
That is the reason I am not facing that issue in this latest version
So you can install genie using latest link and i guess it should resolve issue
so u can have a check and feedback us
thanks
from cni-genie.
@sushanthakumar Many thanks for the thorough research!
How do I get the latest version? The last release seems to be from May 22nd 2018. Should I just build from source?
from cni-genie.
@gopinatht , No need to build from source as u just want to use it.
u can use "kubectl apply -f https://raw.githubusercontent.com/Huawei-PaaS/CNI-Genie/master/conf/1.8/genie-complete.yaml" and install it
This yaml has "imagePullPolicy: Always", so it will get u latest image and install which will satisfy ur scenario
For subsequent installation u can set "imagePullPolicy: IfNotPresent" to avoid downloading everytime
U can also note that we can set multiple plugins as default also (as shown below)
"default_plugin": "flannel,weave"
If any queries/ suggestions/improvements related to any genie feature, pls feel free to mention, thanks
from cni-genie.
@gopinatht, Did u get a chance to verify this, hope it works for u
from cni-genie.
@sushanthakumar Thanks for the followup. I have not been able to test yet. I plan to test this week. I am creating a helm chart to deploy Genie and a custom network we use.
I will close this case for now.
I will let you know how the test goes once I have the results. Thanks again for your help.
from cni-genie.
ok sure, btw genie helm chart in process of merge, below is the reference PR
helm/charts#5968
from cni-genie.
@sushanthakumar I see. Do you have an ETA on when the PR could be merged?
from cni-genie.
Related Issues (20)
- Better support for ARM / Hybrid architecture clusters HOT 2
- How to uninstall Genie plugin HOT 5
- multi ip pod does not work with aws and calico
- CNI Genie can fail to call CNI release during a SandboxChanged/FailedCreatePodSandBox restart HOT 2
- "genie-network-admission-controller" must be running on master nodes only? What if we're deploying on managed kubernetes?
- datadog trace agent not working with genie plugin installed
- DCO is missing for the CNI-Genie project HOT 2
- First scheduled pod starts using the wrong CNI HOT 2
- Installing Genie CNI into AWS EKS with Kubernetes 1.18 fails. HOT 6
- Can not delete pod when create pod failed
- Not working on EKS 1.19 nodes
- go.mod file not found in current directory or any parent directory HOT 4
- Can CNI be defined in Deployment and StatefulSet also?
- Support for NodePort service on secondary POD interfaces
- r HOT 1
- [CNCF] Annual Review requested from the TOC
- Add support for Cilium to CNI-Genie
- CNCF TOC annual review due HOT 1
- Security Slam 2023 Participation
- Update this repo with correct project website link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cni-genie.