Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

shimv2 does *not* respect path configurations set in the Makefile #2610

Closed
fidencio opened this issue Apr 14, 2020 · 0 comments · Fixed by #2617
Closed

shimv2 does *not* respect path configurations set in the Makefile #2610

fidencio opened this issue Apr 14, 2020 · 0 comments · Fixed by #2617
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.

Comments

@fidencio
Copy link
Member

Description of problem

When using shimv2 from an installation not using the canonical / recommended paths, shimv2 simply does not respect the configurations used.

Expected result

shimv2 should respect the very same make variables respected / supported by kata-runtime.

Actual result

As a result of the configurations not being respected, shimv2 bails out with:

Failed to create pod sandbox: rpc error: code = Unknown desc = CreateContainer failed: Cannot find usable config file (config file "/etc/kata-containers/configuration.toml" unresolvable: file /etc/kata-containers/configuration.toml does not exist, config file "/usr/share/defaults/kata-containers/configuration.toml" unresolvable: file /usr/share/defaults/kata-containers/configuration.toml does not exist): not found

I'm aware of the KATA_CONF_FILE workaround and this is what distros / users should use in case building / shipping kata in a non canonical path. However, not respecting what was set during build time does look like a bug.

@fidencio fidencio added bug Incorrect behaviour needs-review Needs to be assessed by the team. labels Apr 14, 2020
fidencio added a commit to fidencio/kata-runtime that referenced this issue Apr 15, 2020
When building kata runtime packagers can simply do something like
`make CONFDIR=/usr/share/kata-containers/defaults` and it'll make
runtime understand that `/usr/share/defaults/kata-containers/` shouldn't
be used as `defaultRuntimeConfiguration` and, instead, runtime will use
whatever as passed to `make` during build time.

This is a quite common approach, mainly for distros, as there's no
perfect agreement on directory layout and whatnot.

Kwowing that, let's also make `containerd-shim-kata-v2`, which reads the
configurations from `pkg/katautils/config-settings.go`, to have a
similar behaviour as `runtime` and respect a "build-time" configured
`defaultRuntimeConfiguration` and `defaultSysConfRuntimeConfiguration`
paths.

Fixes: kata-containers#2610

Signed-off-by: Fabiano Fidêncio <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Incorrect behaviour needs-review Needs to be assessed by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant