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

Fix entrypoint fail to read capabilities in non chain plugin config #595

Merged

Conversation

Mmduh-483
Copy link
Contributor

entrypoint script fails with error when try reading capabilities in
non chain plugin config file when using "--multus-conf-file=auto"

Fixes #594

@coveralls
Copy link

coveralls commented Dec 14, 2020

Pull Request Test Coverage Report for Build 420577740

  • 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 70.797%

Totals Coverage Status
Change from base Build 413236067: 0.0%
Covered Lines: 1137
Relevant Lines: 1606

💛 - Coveralls

@@ -317,7 +317,7 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
import json,sys
conf = json.load(sys.stdin)
capabilities = {}
for capa in [p['capabilities'] for p in conf['plugins'] if 'capabilities' in p]:
for capa in [p['capabilities'] for p in conf.get('plugins', []) if 'capabilities' in p]:
Copy link
Contributor

@adrianchiris adrianchiris Dec 14, 2020

Choose a reason for hiding this comment

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

So, to my understanding this bit of code is used to get the list of capabilities the master plugin supports.

Shouldn't we support the case where the master plugin is not specified as a configuration list ?

Current proposed change will ignore capabilities if master plugin is specified in a non configuration list manner.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to cover master plugin

entrypoint script fails with error when try reading capabilities in
non chain plugin config file when using "--multus-conf-file=auto"

Signed-off-by: Mamduh Alassi <mamduhala@mellanox.com>
@dougbtv
Copy link
Member

dougbtv commented Dec 14, 2020

@Mmduh-483 💯 Thanks for picking this one up!!

@dougbtv dougbtv merged commit bd9f2e9 into k8snetworkplumbingwg:master Dec 14, 2020
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.

Entrypoint fails in non chain plugin config
4 participants