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

Fallback to file for runtime config #777

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

elezar
Copy link
Member

@elezar elezar commented Nov 7, 2024

This change ensures that we fall back to the previous behaviour of reading the existing config from the specified config file if extracting the current config from the command line fails. This fixes use cases where the containerd / crio executables are not available.

@elezar elezar self-assigned this Nov 7, 2024
@elezar elezar added the must-backport The changes in PR need to be backported to at least one stable release branch. label Nov 7, 2024
@tariq1890
Copy link
Contributor

tariq1890 commented Nov 7, 2024

I think we need the same fallback logic here as well

@elezar
Copy link
Member Author

elezar commented Nov 7, 2024

I think we need the same fallback logic here as well

You're right. I have updated the implementation. I also missed the logic in the Setup calls.

containerd.WithUseLegacyConfig(co.useLegacyConfig),
containerd.WithContainerAnnotations(co.containerAnnotationsFromCDIPrefixes()...),
)
cfg, err := getConfig(o, co)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cfg, err := getConfig(o, co)
cfg, err := getRuntimeConfig(o, co)

This change ensures that we fall back to the previous behaviour of
reading the existing config from the specified config file if extracting
the current config from the command line fails. This fixes use cases where
the containerd / crio executables are not available.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar merged commit b142091 into NVIDIA:main Nov 8, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
must-backport The changes in PR need to be backported to at least one stable release branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants