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

config: Error if image+initrd specified #319

Merged
merged 1 commit into from
May 21, 2018

Conversation

jodh-intel
Copy link
Contributor

If you build and install the runtime, the config file will contain an
entry for both an initrd= and an image= entry.

The Developer Guide explains that the user must disable one but it is
easy to forget.

Modified the runtime to fail if both an image and an initrd are
specified. Also added a new test for this scenario.

Fixes #318.

Signed-off-by: James O. D. Hunt [email protected]

If you build and install the runtime, the config file will contain an
entry for both an `initrd=` and an `image=` entry.

The Developer Guide explains that the user must disable one but it is
easy to forget.

Modified the runtime to fail if both an image and an initrd are
specified. Also added a new test for this scenario.

Fixes kata-containers#318.

Signed-off-by: James O. D. Hunt <[email protected]>
@jodh-intel
Copy link
Contributor Author

Hi @bergwolf, @sboeuf, @egernst - ptal.

We've seen a few folks with this issue so this will make the problem immediately obvious.

@codecov
Copy link

codecov bot commented May 18, 2018

Codecov Report

Merging #319 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
+ Coverage   63.87%   63.89%   +0.02%     
==========================================
  Files          87       87              
  Lines        8620     8623       +3     
==========================================
+ Hits         5506     5510       +4     
+ Misses       2530     2529       -1     
  Partials      584      584
Impacted Files Coverage Δ
cli/config.go 89.05% <100%> (+0.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be82c7f...8b56573. Read the comment docs.

@devimc
Copy link

devimc commented May 18, 2018

IMO runtime shouldn't fail if both are specified, we should take one and print a warning

@devimc
Copy link

devimc commented May 18, 2018

if you ask me which one is the best, I'll tell you initrd because it supports a bash bomb 😄

Copy link

@devimc devimc left a comment

Choose a reason for hiding this comment

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

lgtm

@devimc devimc merged commit 8347f4d into kata-containers:master May 21, 2018
zklei pushed a commit to zklei/runtime that referenced this pull request Jun 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants