Add make target to fetch the default kernel#33
Conversation
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
|
I feel like if the user specifies the fetch kernel flag they are effectively saying yes. Do you think it’s necessary to take prompt? |
|
Well, today there was no way for a headless user to say that they didnt want the default kernel to be configured on system start. And using of the same Since we need to provide 3 possible options, we couldnt treat the parameter as a boolean flag - which is the reason for needing the 'yes' or 'no' |
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Signed-off-by: Aditya Ramani <a_ramani@apple.com>
|
Updated the behavior to switch back to using a flag that defaults to a nil value - which uses the interactive mode. The description reflects the new behavior |
jglogan
left a comment
There was a problem hiding this comment.
See comments, feel free to merge as is and changes can go into a small follow-up, or ping me after changes and I'll approve again.
| print("No default kernel configured.") | ||
| print("Install the recommended default kernel from [\(kernelDependency.source)]? [Y/n]: ", terminator: "") | ||
| if !installDependencies { | ||
| var shouldInstallKernel = false |
There was a problem hiding this comment.
a discussion for a follow-up maybe:
Better to assume --enable-kernel-install or --disable-kernel-install if system start isn't run from an interactive terminal?
My feeling is that that is too magical. It's simpler to have it just as it is now, with yes/no/default to interactive, and that the following sort of usage is accepted (though flags would be the recommended approach):
echo y | container system startSigned-off-by: Aditya Ramani <a_ramani@apple.com>
97eba30 to
a6b039f
Compare
Replaces the `--install-dependencies` flag with the `(enable/disable)-kernel-install` flag. If the flag is not passed - the default behavior is prompting the user for a response. Also adds a make target `install-kernel` ``` ➜ bin/container system start Verifying apiserver is running... Installing base container filesystem... No default kernel configured. Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: n Please use the `container system kernel set --recommended` command to configure the default kernel ➜ bin/container system start --disable-kernel-install Verifying apiserver is running... ➜ bin/container system start --enable-kernel-install Verifying apiserver is running... Installing kernel... ➜ bin/container system start --help USAGE: container system start ... [--enable-kernel-install] [--disable-kernel-install] ... --enable-kernel-install/--disable-kernel-install Specify if the default kernel should be installed or not. ``` --------- Signed-off-by: Aditya Ramani <a_ramani@apple.com>
Replaces the
--install-dependenciesflag with the(enable/disable)-kernel-installflag. If the flag is not passed - the default behavior is prompting the user for a response.Also adds a make target
install-kernel