Now when dump target is not specified, separate disk can't be mounted on "path", e.g /var/crash. However if target is specified, whatever the default fail action is set, mkdumprd should go ahead and not be failed.
In check_block_dump_target(), the check only on disk is not complete, NFS and ssh need be filtered too. So introduce is_user_configured_dump_target to check this.
Signed-off-by: Baoquan He bhe@redhat.com --- kdump-lib.sh | 14 ++++++++++++++ mkdumprd | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 384f7b4..de32650 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -52,6 +52,20 @@ get_user_configured_dump_disk() return }
+is_user_configured_dump_target() +{ + local _target + + if is_ssh_dump_target || is_nfs_dump_target; then + return 0 + fi + + _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}') + [ -n "$_target" ] && return 0 + + return 1 +} + get_root_fs_device() { local _target diff --git a/mkdumprd b/mkdumprd index bb1e01e..84f1e18 100644 --- a/mkdumprd +++ b/mkdumprd @@ -363,8 +363,7 @@ check_block_dump_target() local _target local _mntpoint
- _target=$(get_user_configured_dump_disk) - [ -n "$_target" ] && return + is_user_configured_dump_target && return
_target=$(get_root_fs_device) if [ -b "$_target" ]; then
On Mon, Mar 24, 2014 at 05:15:28PM +0800, Baoquan He wrote:
Now when dump target is not specified, separate disk can't be mounted on "path", e.g /var/crash. However if target is specified, whatever the default fail action is set, mkdumprd should go ahead and not be failed.
In check_block_dump_target(), the check only on disk is not complete, NFS and ssh need be filtered too. So introduce is_user_configured_dump_target to check this.
Bao,
I can't figure out from above description that what's the problem. Can you please modify changelogs and first explain well that what's the problem you are fixing and then explain how you are fixing that problem.
Thanks Vivek
Signed-off-by: Baoquan He bhe@redhat.com
kdump-lib.sh | 14 ++++++++++++++ mkdumprd | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 384f7b4..de32650 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -52,6 +52,20 @@ get_user_configured_dump_disk() return }
+is_user_configured_dump_target() +{
- local _target
- if is_ssh_dump_target || is_nfs_dump_target; then
return 0
- fi
- _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}')
- [ -n "$_target" ] && return 0
- return 1
+}
get_root_fs_device() { local _target diff --git a/mkdumprd b/mkdumprd index bb1e01e..84f1e18 100644 --- a/mkdumprd +++ b/mkdumprd @@ -363,8 +363,7 @@ check_block_dump_target() local _target local _mntpoint
- _target=$(get_user_configured_dump_disk)
- [ -n "$_target" ] && return
is_user_configured_dump_target && return
_target=$(get_root_fs_device) if [ -b "$_target" ]; then
-- 1.8.5.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Mon, Mar 24, 2014 at 05:15:28PM +0800, Baoquan He wrote:
Now when dump target is not specified, separate disk can't be mounted on "path", e.g /var/crash. However if target is specified, whatever the default fail action is set, mkdumprd should go ahead and not be failed.
In check_block_dump_target(), the check only on disk is not complete, NFS and ssh need be filtered too. So introduce is_user_configured_dump_target to check this.
Signed-off-by: Baoquan He bhe@redhat.com
kdump-lib.sh | 14 ++++++++++++++ mkdumprd | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 384f7b4..de32650 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -52,6 +52,20 @@ get_user_configured_dump_disk() return }
+is_user_configured_dump_target() +{
- local _target
- if is_ssh_dump_target || is_nfs_dump_target; then
return 0
- fi
- _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}')
- [ -n "$_target" ] && return 0
Hi Bao,
We have helper functions to recognize ssh and nfs dump targets. I think let us introduce two more helper functions to recognize fs and raw dump targets and use these here and in get_user_configured_dump_disk() function.
Say, is_fs_dump_target() and is_raw_dump_target().
Otherwise this patch looks good to me.
Thanks Vivek
- return 1
+}
get_root_fs_device() { local _target diff --git a/mkdumprd b/mkdumprd index bb1e01e..84f1e18 100644 --- a/mkdumprd +++ b/mkdumprd @@ -363,8 +363,7 @@ check_block_dump_target() local _target local _mntpoint
- _target=$(get_user_configured_dump_disk)
- [ -n "$_target" ] && return
is_user_configured_dump_target && return
_target=$(get_root_fs_device) if [ -b "$_target" ]; then
-- 1.8.5.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Mon, Mar 24, 2014 at 10:07:50AM -0400, Vivek Goyal wrote:
On Mon, Mar 24, 2014 at 05:15:28PM +0800, Baoquan He wrote:
Now when dump target is not specified, separate disk can't be mounted on "path", e.g /var/crash. However if target is specified, whatever the default fail action is set, mkdumprd should go ahead and not be failed.
In check_block_dump_target(), the check only on disk is not complete, NFS and ssh need be filtered too. So introduce is_user_configured_dump_target to check this.
Signed-off-by: Baoquan He bhe@redhat.com
kdump-lib.sh | 14 ++++++++++++++ mkdumprd | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 384f7b4..de32650 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -52,6 +52,20 @@ get_user_configured_dump_disk() return }
+is_user_configured_dump_target() +{
- local _target
- if is_ssh_dump_target || is_nfs_dump_target; then
return 0
- fi
- _target=$(egrep "^ext[234]|^xfs|^btrfs|^minix|^raw" /etc/kdump.conf 2>/dev/null |awk '{print $2}')
- [ -n "$_target" ] && return 0
Hi Bao,
We have helper functions to recognize ssh and nfs dump targets. I think let us introduce two more helper functions to recognize fs and raw dump targets and use these here and in get_user_configured_dump_disk() function.
Say, is_fs_dump_target() and is_raw_dump_target().
Bao,
You can do above cleanup in your other patch series. For the time being NFS dumps are completely broken, so I want that to be fixed first. So I am acking this patch and make the suggested changes in your other patch series.
Acked-by: Vivek Goyal vgoyal@redhat.com
Chao, can you please pull in this patch.
Thanks Vivek
On 03/24/14 at 12:53pm, Vivek Goyal wrote:
Hi Bao,
We have helper functions to recognize ssh and nfs dump targets. I think let us introduce two more helper functions to recognize fs and raw dump targets and use these here and in get_user_configured_dump_disk() function.
Say, is_fs_dump_target() and is_raw_dump_target().
Bao,
You can do above cleanup in your other patch series. For the time being NFS dumps are completely broken, so I want that to be fixed first. So I am acking this patch and make the suggested changes in your other patch series.
OK, will repost with this change.
Because is_user_configured_dump_target() is introduced in the path clean up patchset, I thought maybe we can revert this harsh patch later, and then merge path clean patchset.
But it's also OK to build patch clean patchset based on this patch.
Thanks Baoquan
Acked-by: Vivek Goyal vgoyal@redhat.com
Chao, can you please pull in this patch.
Thanks Vivek _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec