Skip to contentSkip to conversation

Set right error after getaddrinfo fails bz 1287468

PATCH In review Rinku Kothiya 2 participants 4 messages Dec 9, 2015 – Jan 16, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 Set right error after getaddrinfo fails bz 1287468

From: Rinku Kothiya <[email protected]>

---
 nfs-utils-1.3.0-set-errno.patch | 29 +++++++++++++++++++++++++++++
 nfs-utils.spec                  | 23 ++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)
 create mode 100644 nfs-utils-1.3.0-set-errno.patch
nfs-utils-1.3.0-set-errno.patch new file +29 -0
new file mode 100644
index 0000000..7c9d381
@@ -0,0 +1,29 @@
+diff -up nfs-utils-1.3.0/support/export/hostname.c.orig nfs-utils-1.3.0/support/export/hostname.c
+--- nfs-utils-1.3.0/support/export/hostname.c.orig	2015-12-08 15:24:36.705047453 +0530
++++ nfs-utils-1.3.0/support/export/hostname.c	2015-12-08 15:25:46.614047453 +0530
+@@ -179,11 +179,11 @@
+ 	case 0:
+ 		return ai;
+ 	case EAI_SYSTEM:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
++		xlog(L_WARNING, "%s: failed to resolve %s: (%d) %m",
+ 				__func__, hostname, errno);
+ 		break;
+ 	default:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
++		xlog(L_WARNING, "%s: failed to resolve %s: %s",
+ 				__func__, hostname, gai_strerror(error));
+ 		break;
+ 	}
+diff -up nfs-utils-1.3.0/support/nfs/client.c.orig nfs-utils-1.3.0/support/nfs/client.c
+--- nfs-utils-1.3.0/support/export/client.c.orig	2015-12-08 17:08:45.469047453 +0530
++++ nfs-utils-1.3.0/support/export/client.c	2015-12-08 17:09:01.159047453 +0530
+@@ -277,7 +277,7 @@
+ 	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;
nfs-utils.spec +12 -11
index 2fe1cc5..e881914 100644
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.3.0
-Release: 0.22%{?dist}
+Release: 0.22%{?dist}_sfdc_01536441
 Epoch: 1
 
 # group all 32bit related archs
@@ -61,6 +61,7 @@ Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
 Patch102: nfs-utils-1.2.3-sm-notify-res_init.patch
 Patch103: nfs-utils-1.2.5-idmap-errmsg.patch
+Patch104: nfs-utils-1.3.0-set-errno.patch
 
 Group: System Environment/Daemons
 Provides: exportfs    = %{epoch}:%{version}-%{release}
@@ -101,16 +102,12 @@ Requires: gssproxy >= 0.3.0-0
 Conflicts: gssproxy < 0.3.0-10
 
 %description
-The nfs-utils package provides a daemon for the kernel NFS server and
-related tools, which provides a much higher level of performance than the
-traditional Linux NFS server used by most users.
-
-This package also contains the showmount program.  Showmount queries the
-mount daemon on a remote host for information about the NFS (Network File
-System) server on the remote host.  For example, showmount can display the
-clients which are mounted on that host.
-
-This package also contains the mount.nfs and umount.nfs program.
+This RPM has been provided by Red Hat for testing purposes only and is
+NOT supported for any other use. This RPM may contain changes that are
+necessary for debugging but that are not appropriate for other uses,
+or that are not compatible with third-party hardware or software. This
+RPM should NOT be deployed for purposes other than testing and
+debugging.
 
 %prep
 %setup -q
@@ -185,6 +182,7 @@ This package also contains the mount.nfs and umount.nfs program.
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
 
 # Remove .orig files
 find . -name "*.orig" | xargs rm -f
@@ -418,6 +416,9 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Tue Dec  8 2015 Rinku Kothiya <[email protected]> 1.3.0-0.22_sfdc_01536441
+- exportfs: Set the correct error type after getaddrinfo fails in host_addrinfo (bz 1287468)
+
 * Thu Dec  3 2015 Steve Dickson <[email protected]> 1.3.0-0.22
 - nfsidmap: Correct a failure to set key timeout values (bz 1161222)
 - exportfs: Restore the EAI_NONAME check in host_pton() (bz 1276099)
Signature · 1 line
1.9.3
#2 lore raw

PATCH 1/1 Set right error after getaddrinfo fails bz 1287468

From: Rinku Kothiya <[email protected]>

---
 nfs-utils-1.3.0-set-errno.patch | 29 +++++++++++++++++++++++++++++
 nfs-utils.spec                  | 23 ++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)
 create mode 100644 nfs-utils-1.3.0-set-errno.patch
nfs-utils-1.3.0-set-errno.patch new file +29 -0
new file mode 100644
index 0000000..7c9d381
@@ -0,0 +1,29 @@
+diff -up nfs-utils-1.3.0/support/export/hostname.c.orig nfs-utils-1.3.0/support/export/hostname.c
+--- nfs-utils-1.3.0/support/export/hostname.c.orig	2015-12-08 15:24:36.705047453 +0530
++++ nfs-utils-1.3.0/support/export/hostname.c	2015-12-08 15:25:46.614047453 +0530
+@@ -179,11 +179,11 @@
+ 	case 0:
+ 		return ai;
+ 	case EAI_SYSTEM:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
++		xlog(L_WARNING, "%s: failed to resolve %s: (%d) %m",
+ 				__func__, hostname, errno);
+ 		break;
+ 	default:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
++		xlog(L_WARNING, "%s: failed to resolve %s: %s",
+ 				__func__, hostname, gai_strerror(error));
+ 		break;
+ 	}
+diff -up nfs-utils-1.3.0/support/nfs/client.c.orig nfs-utils-1.3.0/support/nfs/client.c
+--- nfs-utils-1.3.0/support/export/client.c.orig	2015-12-08 17:08:45.469047453 +0530
++++ nfs-utils-1.3.0/support/export/client.c	2015-12-08 17:09:01.159047453 +0530
+@@ -277,7 +277,7 @@
+ 	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;
nfs-utils.spec +12 -11
index 2fe1cc5..e881914 100644
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.3.0
-Release: 0.22%{?dist}
+Release: 0.22%{?dist}_sfdc_01536441
 Epoch: 1
 
 # group all 32bit related archs
@@ -61,6 +61,7 @@ Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
 Patch102: nfs-utils-1.2.3-sm-notify-res_init.patch
 Patch103: nfs-utils-1.2.5-idmap-errmsg.patch
+Patch104: nfs-utils-1.3.0-set-errno.patch
 
 Group: System Environment/Daemons
 Provides: exportfs    = %{epoch}:%{version}-%{release}
@@ -101,16 +102,12 @@ Requires: gssproxy >= 0.3.0-0
 Conflicts: gssproxy < 0.3.0-10
 
 %description
-The nfs-utils package provides a daemon for the kernel NFS server and
-related tools, which provides a much higher level of performance than the
-traditional Linux NFS server used by most users.
-
-This package also contains the showmount program.  Showmount queries the
-mount daemon on a remote host for information about the NFS (Network File
-System) server on the remote host.  For example, showmount can display the
-clients which are mounted on that host.
-
-This package also contains the mount.nfs and umount.nfs program.
+This RPM has been provided by Red Hat for testing purposes only and is
+NOT supported for any other use. This RPM may contain changes that are
+necessary for debugging but that are not appropriate for other uses,
+or that are not compatible with third-party hardware or software. This
+RPM should NOT be deployed for purposes other than testing and
+debugging.
 
 %prep
 %setup -q
@@ -185,6 +182,7 @@ This package also contains the mount.nfs and umount.nfs program.
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
 
 # Remove .orig files
 find . -name "*.orig" | xargs rm -f
@@ -418,6 +416,9 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Tue Dec  8 2015 Rinku Kothiya <[email protected]> 1.3.0-0.22_sfdc_01536441
+- exportfs: Set the correct error type after getaddrinfo fails in host_addrinfo (bz 1287468)
+
 * Thu Dec  3 2015 Steve Dickson <[email protected]> 1.3.0-0.22
 - nfsidmap: Correct a failure to set key timeout values (bz 1161222)
 - exportfs: Restore the EAI_NONAME check in host_pton() (bz 1276099)
Signature · 1 line
1.9.3
#3 lore raw

PATCH 1/1 Set right error after getaddrinfo fails bz 1287468, Please find the same patch attached to this email as well

From: Rinku Kothiya <[email protected]>

---
 nfs-utils-1.3.0-set-errno.patch | 29 +++++++++++++++++++++++++++++
 nfs-utils.spec                  | 23 ++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)
 create mode 100644 nfs-utils-1.3.0-set-errno.patch
nfs-utils-1.3.0-set-errno.patch new file +29 -0
new file mode 100644
index 0000000..7c9d381
@@ -0,0 +1,29 @@
+diff -up nfs-utils-1.3.0/support/export/hostname.c.orig nfs-utils-1.3.0/support/export/hostname.c
+--- nfs-utils-1.3.0/support/export/hostname.c.orig	2015-12-08 15:24:36.705047453 +0530
++++ nfs-utils-1.3.0/support/export/hostname.c	2015-12-08 15:25:46.614047453 +0530
+@@ -179,11 +179,11 @@
+ 	case 0:
+ 		return ai;
+ 	case EAI_SYSTEM:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
++		xlog(L_WARNING, "%s: failed to resolve %s: (%d) %m",
+ 				__func__, hostname, errno);
+ 		break;
+ 	default:
+-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
++		xlog(L_WARNING, "%s: failed to resolve %s: %s",
+ 				__func__, hostname, gai_strerror(error));
+ 		break;
+ 	}
+diff -up nfs-utils-1.3.0/support/nfs/client.c.orig nfs-utils-1.3.0/support/nfs/client.c
+--- nfs-utils-1.3.0/support/export/client.c.orig	2015-12-08 17:08:45.469047453 +0530
++++ nfs-utils-1.3.0/support/export/client.c	2015-12-08 17:09:01.159047453 +0530
+@@ -277,7 +277,7 @@
+ 	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;
support/export/hostname.c renamed from support/export/hostname.c.orig +2 -2
diff -up nfs-utils-1.3.0/support/nfs/hostname.c.orig nfs-utils-1.3.0/support/nfs/hostname.c 
@@ -179,11 +179,11 @@
 	case 0:
 		return ai;
 	case EAI_SYSTEM:
-		xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
+		xlog(L_WARNING, "%s: failed to resolve %s: (%d) %m",
 				__func__, hostname, errno);
 		break;
 	default:
-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
+		xlog(L_WARNING, "%s: failed to resolve %s: %s",
 				__func__, hostname, gai_strerror(error));
 		break;
 	}
support/export/client.c renamed from support/export/client.c.orig +1 -1
diff -up nfs-utils-1.3.0/support/nfs/client.c.orig nfs-utils-1.3.0/support/nfs/client.c 
@@ -277,7 +277,7 @@
 	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;
#4 lore raw
In reply to Rinku Kothiya
Quoted 11 lines · Rinku Kothiya

From: Rinku Kothiya <[email protected]>

---
 nfs-utils-1.3.0-set-errno.patch | 29 +++++++++++++++++++++++++++++
 nfs-utils.spec                  | 23 ++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)
 create mode 100644 nfs-utils-1.3.0-set-errno.patch

We finally got this committed! ;-)

steved

Quoted 98 lines
nfs-utils-1.3.0-set-errno.patch new file +29 -0
new file mode 100644
index 0000000..7c9d381
@@ -0,0 +1,29 @@
+diff -up nfs-utils-1.3.0/support/export/hostname.c.orig nfs-utils-1.3.0/support/export/hostname.c
+--- nfs-utils-1.3.0/support/export/hostname.c.orig    2015-12-08 15:24:36.705047453 +0530
++++ nfs-utils-1.3.0/support/export/hostname.c    2015-12-08 15:25:46.614047453 +0530
+@@ -179,11 +179,11 @@
+     case 0:
+         return ai;
+     case EAI_SYSTEM:
+-        xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
++        xlog(L_WARNING, "%s: failed to resolve %s: (%d) %m",
+                 __func__, hostname, errno);
+         break;
+     default:
+-        xlog(D_GENERAL, "%s: failed to resolve %s: %s",
++        xlog(L_WARNING, "%s: failed to resolve %s: %s",
+                 __func__, hostname, gai_strerror(error));
+         break;
+     }
+diff -up nfs-utils-1.3.0/support/nfs/client.c.orig nfs-utils-1.3.0/support/nfs/client.c
+--- nfs-utils-1.3.0/support/export/client.c.orig    2015-12-08 17:08:45.469047453 +0530
++++ nfs-utils-1.3.0/support/export/client.c    2015-12-08 17:09:01.159047453 +0530
+@@ -277,7 +277,7 @@
+     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;
nfs-utils.spec +12 -11
index 2fe1cc5..e881914 100644
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.3.0
-Release: 0.22%{?dist}
+Release: 0.22%{?dist}_sfdc_01536441
 Epoch: 1
 
 # group all 32bit related archs
@@ -61,6 +61,7 @@ Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
 Patch102: nfs-utils-1.2.3-sm-notify-res_init.patch
 Patch103: nfs-utils-1.2.5-idmap-errmsg.patch
+Patch104: nfs-utils-1.3.0-set-errno.patch
 
 Group: System Environment/Daemons
 Provides: exportfs    = %{epoch}:%{version}-%{release}
@@ -101,16 +102,12 @@ Requires: gssproxy >= 0.3.0-0
 Conflicts: gssproxy < 0.3.0-10
 
 %description
-The nfs-utils package provides a daemon for the kernel NFS server and
-related tools, which provides a much higher level of performance than the
-traditional Linux NFS server used by most users.
-
-This package also contains the showmount program.  Showmount queries the
-mount daemon on a remote host for information about the NFS (Network File
-System) server on the remote host.  For example, showmount can display the
-clients which are mounted on that host.
-
-This package also contains the mount.nfs and umount.nfs program.
+This RPM has been provided by Red Hat for testing purposes only and is
+NOT supported for any other use. This RPM may contain changes that are
+necessary for debugging but that are not appropriate for other uses,
+or that are not compatible with third-party hardware or software. This
+RPM should NOT be deployed for purposes other than testing and
+debugging.
 
 %prep
 %setup -q
@@ -185,6 +182,7 @@ This package also contains the mount.nfs and umount.nfs program.
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
+%patch104 -p1
 
 # Remove .orig files
 find . -name "*.orig" | xargs rm -f
@@ -418,6 +416,9 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Tue Dec  8 2015 Rinku Kothiya <[email protected]> 1.3.0-0.22_sfdc_01536441
+- exportfs: Set the correct error type after getaddrinfo fails in host_addrinfo (bz 1287468)
+
 * Thu Dec  3 2015 Steve Dickson <[email protected]> 1.3.0-0.22
 - nfsidmap: Correct a failure to set key timeout values (bz 1161222)
 - exportfs: Restore the EAI_NONAME check in host_pton() (bz 1276099)