Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
nfs-utils.12300
0170-exportfs-changes-handling-of-unresolvable-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0170-exportfs-changes-handling-of-unresolvable-entries.patch of Package nfs-utils.12300
From 076dd803330d93819c6e7862f515a8fa3997a83b Mon Sep 17 00:00:00 2001 From: Henrique Martins <linux@martins.cc> Date: Tue, 4 Nov 2014 15:12:16 -0500 Subject: [PATCH] exportfs: changes handling of unresolvable entries The patch to nfs/exportfs to allow nfsd to start when there are some, but not all, unresolvable entries in /etc/exports. Signed-off-by: Henrique Martins <linux@martins.cc> Signed-off-by: Steve Dickson <steved@redhat.com> --- support/export/client.c | 2 +- support/export/export.c | 11 +++++++++-- support/export/hostname.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) --- a/support/export/client.c +++ b/support/export/client.c @@ -277,7 +277,7 @@ client_lookup(char *hname, int canonical if (htype == MCL_FQDN && !canonical) { ai = host_addrinfo(hname); if (!ai) { - xlog(L_ERROR, "Failed to resolve %s", hname); + xlog(L_WARNING, "Failed to resolve %s", hname); goto out; } hname = ai->ai_canonname; --- a/support/export/export.c +++ b/support/export/export.c @@ -86,15 +86,22 @@ export_read(char *fname) struct exportent *eep; nfs_export *exp; + int volumes = 0; + setexportent(fname, "r"); while ((eep = getexportent(0,1)) != NULL) { exp = export_lookup(eep->e_hostname, eep->e_path, assume_canonical); - if (!exp) - export_create(eep, assume_canonical); + if (!exp) { + exp = export_create(eep, assume_canonical); + if (exp) + volumes++; + } else warn_duplicated_exports(exp, eep); } endexportent(); + if (volumes == 0) + xlog(L_WARNING, "No file systems exported!"); } /* Based on mnt_table_parse_dir() in --- a/support/export/hostname.c +++ b/support/export/hostname.c @@ -175,11 +175,11 @@ host_addrinfo(const char *hostname) case 0: return ai; case EAI_SYSTEM: - xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m", + xlog(D_PARSE, "%s: failed to resolve %s: (%d) %m", __func__, hostname, errno); break; default: - xlog(D_GENERAL, "%s: failed to resolve %s: %s", + xlog(D_PARSE, "%s: failed to resolve %s: %s", __func__, hostname, gai_strerror(error)); break; }
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