Hi everybody,
The series far from being complete. But it finally passes the first simple
tests so I think it's time to get the first feedback.
The series started out with the request to be able to rebuild the initramfs for
all installed kernels. As 'reset-crashkernel' already had a --kernel=ALL option
I didn't want to introduce a second way to do the same thing. My problem was
the way --kernel=ALL was implemented, especially its hard dependency on grubby
which might not be installed on all systems. This lead to basically a rewrite
of the crashkernel handling with now (hopefully) simpler, better to understand
code.
An other problem I had with the former implementation of --kernel=ALL was that
the command line parser was self-written. This made the UI much more rigid than
it had to be. So I changed it to use getopt instead. In order to prevent
unnecessary duplicate code I also wrote a framework around it (which might be a
little bit over engineered for what we need but once I started I refused to
give up plus it gives bash-completion almost for free, which is nice ;-)).
While at it I also added some basic options most users expect, like --help.
Finally I've merged multiple commands to make the UI (hopefully) a little bit
cleaner and more intuitive. For example I've never understood why 'status' only
retuned a simple yes/no but not other important information about the current
state like 'git status' does.
As stated in the beginning there is still a lot to do. In particular:
* Test cases still need to be adjusted (and new ones added).
* The documentation needs to be reviewed and adjusted.
* The patches don't consider Pingfans 64k work, yet. So they will need some
adjustments (they are currently based on
29fe563 ("kdump.conf: redirect unknown architecture warning to stderr"))
* I've noticed a bug in the bash completion where subsubcommands aren't
completed correctly.
* And of course the series need a lot more testing. For the moment I've only
made some very simple sanity checks. So I would be surprised if the code
isn't still riddled with bugs...
Anyway, this is quite a big change and opinions on what a good UI is are very
subjective. That's why I want to get feedback early before I waste too much
time on something which isn't wanted.
Happy to hear your opinion (good and bad).
Thanks
Philipp
Philipp Rudo (26):
kdumpctl: Fix various shellcheck findings
kdump-lib: make is_zstd_command_available more generic
kdump-lib: simplify _get_kdump_kernel_version
kdumpctl: drop _get_current_running_kernel_path
kdumpctl: drop condrestart subcommand
kdumpctl: make all subcommands execute exactly one function
kdumpctl: Restructure subcommand handling and and usage
kdumpctl: simplify _update_kernel_cmdline
kdumpctl: Prevent option --fadump on non-PPC in reset_crashkernel
kdumpctl: Stop updating grub config in reset_crashkernel
kdumpctl: Simplify fadump handling in reset_crashkernel
kdumpctl: Use getopt for option parsing in reset_crashkernel
kdumpctl: Add simple bash-completion for kdumpctl
kdumpctl: Make --kernel a global option
kdumpctl: Add global -h/--help option
kdumpctl: Add --kver option
kdumpctl: Reduce dependencies from grubby for --kernel
kdumpctl: merge reset_crashkernel_{after_update,for_installed_kernel}
kdumpctl: Allow --kernel with 'start' and 'rebuild'
kdumpctl: Add --quiet/--verbose option
kdumpctl: Rework the 'status' subcommand
kdumpctl: Merge _upgrade_crashkernel into the upgrade hook
kdumpctl: Drop special handling for CoreOS in reset_crashkernel
kdumpctl: Determine "old" value within _update_kernel_cmdline
kdumpctl: Introduce new crashkernel subcommand
REMOVEME: add test subsubcommands
92-crashkernel.install | 2 +-
kdump-lib.sh | 27 +-
kdumpctl | 1094 ++++++++++++++++++++++++--------------
kdumpctl.bash-completion | 125 +++++
kexec-tools.spec | 16 +-
mkdumprd | 2 +-
mkfadumprd | 2 +-
7 files changed, 865 insertions(+), 403 deletions(-)
create mode 100755 kdumpctl.bash-completion
--
2.40.1