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

Cleanup multus config file 00-multus.conf when deleting daemonset #593

Closed
wants to merge 1 commit into from

Conversation

Mmduh-483
Copy link
Contributor

When multus daemonset is deleted the auto generated config file
00-multus.conf is left, when new pod created and uses that conf
cni file, it will fail because multus roles are removed

This patch cleanup multus conf file 00-multus to allow using previous
primary cni config file

Fixes #592

@coveralls
Copy link

coveralls commented Dec 14, 2020

Pull Request Test Coverage Report for Build 420789010

  • 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

images/entrypoint.sh Outdated Show resolved Hide resolved
When multus daemonset is deleted the auto generated config file
00-multus.conf is left, when new pod created and uses that conf
cni file, it will fail because multus roles are removed

This patch cleanup multus conf file 00-multus to allow using previous
primary cni config file

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

dougbtv commented Dec 14, 2020

I've got to think on this one, but... I think it might need to be parameterized.

if [ "$MULTUS_CONF_FILE" == "auto" ]; then
trap "rm -f $CNI_CONF_DIR/00-multus.conf" EXIT
fi

# Enter either sleep loop, or watch loop...
if [ "$MULTUS_CLEANUP_CONFIG_ON_EXIT" == true ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dougbtv "--cleanup-config-on-exit" is used to set "MULTUS_CLEANUP_CONFIG_ON_EXIT" which keep tracking that the file exists, which is confusing, do u want to change this param to something else, then use it to clean config file 00-multus.conf

@dougbtv
Copy link
Member

dougbtv commented Jan 7, 2021

Mmduh, currently we think that it might be a better route for these customizations to go into a custom build and/or a modified yaml file.

@dougbtv dougbtv closed this Jan 7, 2021
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.

Clean Up auto generated config
4 participants