Skip to content
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

Use MULTUS_MASTER_CNI_FILE_NAME as MASTER_PLUGIN as is, if specified #696

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

cgchinmay
Copy link

Before change, specifying MULTUS_MASTER_CNI_FILE_NAME would not properly generate multus conf as the file path was wrong
Multus pod logs would show following error

kubectl logs -f pod/kube-multus-ds-8zs2t -n kube-system
2021-07-12T16:50:00+0000 Generating Multus configuration file using files in /host/etc/cni/net.d...
2021-07-12T16:50:00+0000 Using MASTER_PLUGIN: /host/etc/cni/net.d/10-aws.conflist -> this should take only filename and not entire path 
cat: /host/etc/cni/net.d//host/etc/cni/net.d/10-aws.conflist: No such file or directory -> Incorrect file path 
Traceback (most recent call last):
  File "/tmp/tmp.zngU7gWnzK", line 2, in <module>
    conf = json.load(sys.stdin)
  File "/usr/lib64/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

After change , multus conf can be correctly generated when MULTUS_MASTER_CNI_FILE_NAME is specified

kubectl logs -f pod/kube-multus-ds-bvdtp -n kube-system
2021-07-12T16:54:22+0000 Generating Multus configuration file using files in /host/etc/cni/net.d...
2021-07-12T16:54:22+0000 Using MASTER_PLUGIN: 10-aws.conflist
2021-07-12T16:54:22+0000 Nested capabilities string: "capabilities": {"portMappings": true},
2021-07-12T16:54:22+0000 Using /host/etc/cni/net.d/10-aws.conflist as a source to generate the Multus configuration
2021-07-12T16:54:22+0000 Config file created @ /host/etc/cni/net.d/00-multus.conf
{ "cniVersion": "0.3.1", "name": "multus-cni-network", "type": "multus", "capabilities": {"portMappings": true}, "kubeconfig": "/etc/cni/net.d/multus.d/multus.kubeconfig", "delegates": [ { "cniVersion": "0.3.1", "name": "aws-cni", "plugins": [ { "name": "aws-cni", "type": "aws-cni", "vethPrefix": "eni", "mtu": "9001", "pluginLogFile": "/var/log/aws-routed-eni/plugin.log", "pluginLogLevel": "DEBUG" }, { "type": "portmap", "capabilities": {"portMappings": true}, "snat": true } ] } ] }
2021-07-12T16:54:22+0000 Entering sleep (success)...

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1023717673

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 71.082%

Totals Coverage Status
Change from base Build 1011872125: 0.0%
Covered Lines: 1143
Relevant Lines: 1608

💛 - Coveralls

@cgchinmay
Copy link
Author

@s1061123 @dougbtv Can one of you review ? Thanks

Copy link
Member

@dougbtv dougbtv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for identifying this and fixing it up 👍

@dougbtv dougbtv merged commit a506d76 into k8snetworkplumbingwg:master Jul 16, 2021
@LittleFox94
Copy link

Any chance to have a new release with this in? Currently being bitten by the problem this fixes

@s1061123
Copy link
Member

We'll discuss about it in maintainer's meeting. Let's see...

@dougbtv
Copy link
Member

dougbtv commented Sep 17, 2021

@LittleFox94 thanks for the report! We've released v3.8 @ https://github.com/k8snetworkplumbingwg/multus-cni/releases/tag/v3.8 the image should be building as I type this comment 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants