Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15:Update
kdump.21349
kdump-prepend-IP-address.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-prepend-IP-address.patch of Package kdump.21349
Date: Wed Jun 14 14:39:15 2017 +0200 From: Petr Tesarik <ptesarik@suse.com> Subject: Prepend IP address to remote target subdirectory References: FATE#321844 Upstream: v0.8.17 Git-commit: d8f0f0cb4450776b0765ddb0441a5d5669a78062 Check the target route directly from save_dump and take the preferred source IP address into the subdirectory name. Signed-off-by: Petr Tesarik <ptesarik@suse.com> diff --git a/kdumptool/savedump.cc b/kdumptool/savedump.cc index 9938b6f..14e66b3 100644 --- a/kdumptool/savedump.cc +++ b/kdumptool/savedump.cc @@ -40,6 +40,7 @@ #include "vmcoreinfo.h" #include "identifykernel.h" #include "email.h" +#include "routable.h" using std::string; using std::list; @@ -114,8 +115,17 @@ void SaveDump::execute() std::istringstream iss(config->KDUMP_SAVEDIR.value()); FilePath elem; while (iss >> elem) { - RootDirURL url(elem.appendPath(subdir), m_rootdir); - urlv.push_back(url); + RootDirURL url(elem, m_rootdir); + if (url.getProtocol() != URLParser::PROT_FILE) { + Routable rt(url.getHostname()); + if (!rt.check(config->KDUMP_NET_TIMEOUT.value())) { + cerr << "WARNING: Dump target not reachable" << endl; + elem.appendPath(string("unknown-") + subdir); + } else + elem.appendPath(rt.prefsrc() + '-' + subdir); + } else + elem.appendPath(subdir); + urlv.push_back(RootDirURL(elem, m_rootdir)); } m_transfer = getTransfer(urlv);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor