On Tue, Jun 17, 2014 at 03:07:56PM +0800, WANG Chao wrote:
This patchset introduce a new kdump emergency service. It will override the
existing emergency.service. When fatal error occurs, this emergency service
will be triggered and systemd will isolate to emergency path.
I think also mention the problem description here. I think you are doing
this patch series in response to a problem. And IIRC, problem was that
now upon failure kdump script might not be called at all and it might
not be able to execute default action.
IIRC, system tries to run emergency shell but we have disabled emergecny
shell so it hangs.
So let us first describe the problem and then explain how you are plannig
to solve. And how creating a separate emergency service helps.
That way if we are reading it back 6 months down the line, we will get
all the context back easily.
Also make sure all that text shows up in your first patch when you commit
it in git tree.
This kdump emergency service can will read kdump.conf and act according to the
configired "default action" (reboot/poweroff/halt/shell/dump_to_rootfs).
Along with this patchset, kdump-capture.service is introduced as a service unit
to run kdump.sh. When kdump-capture.service fails, systemd will isolate to
kdump emergency service. I copied all the dependencies from
dracut-pre-pivot.service to kdump-capture.service so that kdump.sh will be
called at the correct time window.
Address several comments from Vivek:
- split [patch 1] into 1/6 and 2/6
- remove several unnecessary lines in service unit.
- modify the description of kdump-capture.service
- introduce another kdump lib kdump-lib-2.sh used in 2nd kernel.
WANG Chao (6):
mkdumprd: mount dump target under /sysroot in 2nd kernel
mkdumprd: append "x-initrd.mount" to the mount options.
cleanup: extract functions from kdump.sh to kdump-lib-2.sh
Introduce kdump error handling service
Introduce kdump capture service
disable dracut-emergency.service the whole time
dracut-kdump-capture.service | 23 ++++++
dracut-kdump-emergency.service | 23 ++++++
dracut-kdump-error-handler.sh | 10 +++
dracut-kdump-lib-2.sh | 160 ++++++++++++++++++++++++++++++++++++++++
dracut-kdump.sh | 161 +----------------------------------------
dracut-module-setup.sh | 8 +-
kdump-lib.sh | 6 +-
kexec-tools.spec | 9 ++-
mkdumprd | 25 ++++---
9 files changed, 253 insertions(+), 172 deletions(-)
create mode 100644 dracut-kdump-capture.service
create mode 100644 dracut-kdump-emergency.service
create mode 100755 dracut-kdump-error-handler.sh
create mode 100755 dracut-kdump-lib-2.sh