Giter VIP home page Giter VIP logo

Comments (17)

kshafiee avatar kshafiee commented on June 11, 2024

@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.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

@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
image

We have below mechanism for this case

  1. By default, we select "weave" as the plugin. So if weave is installed, pod will comeup and use weave
  2. 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

image

Point 1 support is available in genie from the begining
Point 2 support is added as part of below contribution

from cni-genie.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

https://github.com/Huawei-PaaS/CNI-Genie/pull/69

from cni-genie.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

Pls let us know if any queries/support needed. If no issues, I shall close this after your check

from cni-genie.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

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
image

from cni-genie.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

@gopinatht , I retested this feature with etcd scenario and below is my observation

  1. 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)

  2. Set default plugin in conf file
    image

  3. Installed etcd using helm and observed all pods running with Ips acquired from flannel
    image

  4. Genie log details show that default is picked
    image

  5. Finally did helm upgrade and found it running, did not get above error

  6. 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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

@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.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

@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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

@gopinatht, Did u get a chance to verify this, hope it works for u

from cni-genie.

gopinatht avatar gopinatht commented on June 11, 2024

@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.

sushanthakumar avatar sushanthakumar commented on June 11, 2024

ok sure, btw genie helm chart in process of merge, below is the reference PR
helm/charts#5968

from cni-genie.

gopinatht avatar gopinatht commented on June 11, 2024

@sushanthakumar I see. Do you have an ETA on when the PR could be merged?

from cni-genie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.